Closedown

This commit is contained in:
2019-04-02 15:52:19 +02:00
parent f00ac54ebb
commit 6acbd14919

View File

@@ -69,13 +69,12 @@ def get_errors(command = "%", start = None, end = None):
return ret
def get_cmd_info(command = "%", start = None, end = None):
def get_cmd_records(command = "%", start = None, end = None):
sql = "SELECT * FROM . WHERE Command LIKE '"+ command +"'"
sql = _add_sql_time(sql, start, end)
results = stmt.executeQuery(sql)
ret = []
while results.next():
print "X"
rec={}
for col in STAT_COLUMN_NAMES:
rec[col]= results.getString(col)
@@ -125,16 +124,22 @@ def print_cmd_stats(command = "%", start = None, end = None):
print "%5d %s" % (error[0], error[1])
print "-----------------------------------------------------------"
def print_cmd_info(command = "%", start = None, end = None):
info = get_cmd_info(command, start, end)
for col in STAT_COLUMN_NAMES:
print col,
print
for cmd in info:
for col in STAT_COLUMN_NAMES:
print cmd[col].strip(),
print
def print_cmd_records(command = "%", start = None, end = None):
print "-----------------------------------------------------------"
print "Records from ", start , " to ", end
info = get_cmd_records(command, start, end)
print "Command: " , command , " Records: ", len(info)
for col in STAT_COLUMN_NAMES:
print col+ "; " ,
print
for cmd in info:
s = ""
for col in STAT_COLUMN_NAMES:
s = s + cmd[col]+ "; "
print s
print "-----------------------------------------------------------"
def print_stats(commands = None, start = None, end = None):
print "-----------------------------------------------------------"
@@ -180,6 +185,6 @@ print_stats(cmds, start, end)
for cmd in cmds:
print_cmd_stats (cmd, start, end)
print_cmd_info("recover%", start, end)
print_cmd_records("recover%", start, end)
conn.close()