fix sar reporting in the gate
the sar filter made an assumption of time display including an AM/PM... which isn't true in all environments. Hence the blank sysstat screen in the gate runs of late. This fixes that, and displays the first line which includes header version to make sure we are functioning. Change-Id: I537e0bf2127efaf337c4792bc23d938145c8990d
This commit is contained in:
parent
465653e25f
commit
6114a518de
@ -25,10 +25,10 @@ def is_data_line(line):
|
||||
|
||||
|
||||
def parse_line(line):
|
||||
m = re.search('(\d\d:\d\d:\d\d \w\w)(\s+((\S+)\s*)+)', line)
|
||||
m = re.search('(\d\d:\d\d:\d\d( \w\w)?)(\s+((\S+)\s*)+)', line)
|
||||
if m:
|
||||
date = m.group(1)
|
||||
data = m.group(2).rstrip()
|
||||
data = m.group(3).rstrip()
|
||||
return date, data
|
||||
else:
|
||||
return None, None
|
||||
@ -47,6 +47,10 @@ header = ""
|
||||
data_line = ""
|
||||
printed_header = False
|
||||
current_ts = None
|
||||
|
||||
# print out the first sysstat line regardless
|
||||
print process.stdout.readline()
|
||||
|
||||
while True:
|
||||
nextline = process.stdout.readline()
|
||||
if nextline == '' and process.poll() is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user