Exemple #1
0
    "do_empty"      : opt.do_empty,
    "do_all"        : opt.do_all,
    "quiet"         : opt.quiet
}

# We do database disk usage by default.
try:
    diskusage.show_database_usage(servers[0], datadir, args, options)
except UtilError, e:
    print "ERROR:", e.errmsg
    exit(1)

# Look for the general and query logs and report
if opt.do_logs or opt.do_all:
    try:
        diskusage.show_logfile_usage(servers[0], options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

# 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:
Exemple #2
0
    "do_empty": opt.do_empty,
    "do_all": opt.do_all,
    "quiet": opt.quiet
}

# We do database disk usage by default.
try:
    diskusage.show_database_usage(servers[0], datadir, args, options)
except UtilError, e:
    print "ERROR:", e.errmsg
    exit(1)

# Look for the general and query logs and report
if opt.do_logs or opt.do_all:
    try:
        diskusage.show_logfile_usage(servers[0], options)
    except UtilError, e:
        print "ERROR:", e.errmsg
        exit(1)

# 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: