Browse code

Merge "fix sar reporting in the gate"

Jenkins authored on 2014/02/01 02:32:52
Showing 1 changed files
... ...
@@ -25,10 +25,10 @@ def is_data_line(line):
25 25
 
26 26
 
27 27
 def parse_line(line):
28
-    m = re.search('(\d\d:\d\d:\d\d \w\w)(\s+((\S+)\s*)+)', line)
28
+    m = re.search('(\d\d:\d\d:\d\d( \w\w)?)(\s+((\S+)\s*)+)', line)
29 29
     if m:
30 30
         date = m.group(1)
31
-        data = m.group(2).rstrip()
31
+        data = m.group(3).rstrip()
32 32
         return date, data
33 33
     else:
34 34
         return None, None
... ...
@@ -47,6 +47,10 @@ header = ""
47 47
 data_line = ""
48 48
 printed_header = False
49 49
 current_ts = None
50
+
51
+# print out the first sysstat line regardless
52
+print process.stdout.readline()
53
+
50 54
 while True:
51 55
     nextline = process.stdout.readline()
52 56
     if nextline == '' and process.poll() is not None: