Script execution

This commit is contained in:
2019-04-02 15:55:00 +02:00
parent 6acbd14919
commit 90a81c425f

View File

@@ -69,8 +69,8 @@ def get_errors(command = "%", start = None, end = None):
return ret
def get_cmd_records(command = "%", start = None, end = None):
sql = "SELECT * FROM . WHERE Command LIKE '"+ command +"'"
def get_cmd_records(command = "%", start = None, end = None, result= "%%"):
sql = "SELECT * FROM . WHERE Command LIKE '"+ command +"' AND Result LIKE '"+ result +"'"
sql = _add_sql_time(sql, start, end)
results = stmt.executeQuery(sql)
ret = []
@@ -124,11 +124,11 @@ def print_cmd_stats(command = "%", start = None, end = None):
print "%5d %s" % (error[0], error[1])
print "-----------------------------------------------------------"
def print_cmd_records(command = "%", start = None, end = None):
def print_cmd_records(command = "%", start = None, end = None, result= "%%"):
print "-----------------------------------------------------------"
print "Records from ", start , " to ", end
info = get_cmd_records(command, start, end)
print "Command: " , command , " Records: ", len(info)
info = get_cmd_records(command, start, end, result)
print "Command: " , command , " Result: ", result " Records: ", len(info)
for col in STAT_COLUMN_NAMES:
print col+ "; " ,
@@ -185,6 +185,6 @@ print_stats(cmds, start, end)
for cmd in cmds:
print_cmd_stats (cmd, start, end)
print_cmd_records("recover%", start, end)
print_cmd_records("recover%", start, end, "error")
conn.close()