コード例 #1
0
ファイル: mysqldiskusage.py プロジェクト: Arrjaan/Cliff
# Look for the binary logs and report
if opt.do_binlog or opt.do_all:
    try:
        options["log_type"] = 'binary log'
        diskusage.show_log_usage(servers[0], datadir, options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

# Look for the relay logs and report
if opt.do_relaylog or opt.do_all:
    try:
        options["log_type"] = 'relay log'
        diskusage.show_log_usage(servers[0], datadir, options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

# Look at the inoodb tablespace information are report
if opt.do_innodb or opt.do_all:
    try:
        diskusage.show_innodb_usage(servers[0], datadir, options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

if not opt.quiet:
    print "#...done."

exit()
コード例 #2
0
# Look for the binary logs and report
if opt.do_binlog or opt.do_all:
    try:
        options["log_type"] = 'binary log'
        diskusage.show_log_usage(servers[0], datadir, options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

# Look for the relay logs and report
if opt.do_relaylog or opt.do_all:
    try:
        options["log_type"] = 'relay log'
        diskusage.show_log_usage(servers[0], datadir, options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

# Look at the inoodb tablespace information are report
if opt.do_innodb or opt.do_all:
    try:
        diskusage.show_innodb_usage(servers[0], datadir, options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

if not opt.quiet:
    print "#...done."

exit()