Update fio2gnuplot
authorThomas Findelkind <thomas@thomas-findelkind.de>
Thu, 17 Sep 2015 17:42:34 +0000 (19:42 +0200)
committerThomas Findelkind <thomas@thomas-findelkind.de>
Thu, 17 Sep 2015 17:42:34 +0000 (19:42 +0200)
Should fix the "No log file..." with default pattern -b and -i and
 user generated a log file per thread/numjob with per_numjobs_log=1

tools/plot/fio2gnuplot

index 1aef047aa53aadc54f5563033615f4c157313658..1009ae0aee3812e0acd4d89833517ebf30504abe 100755 (executable)
@@ -458,7 +458,15 @@ def main(argv):
     fio_data_file=find_file('.',pattern)
     if len(fio_data_file) == 0:
            print "No log file found with pattern %s!" % pattern
-           sys.exit(1)
+           # Try numjob log file format if per_numjob_logs=1
+            if (pattern == '*_bw.log'):
+                fio_data_file=find_file('.','*_bw.*.log')
+            if (pattern == '*_iops.log'):
+                fio_data_file=find_file('.','*_iops.*.log')
+            if len(fio_data_file) == 0:
+                sys.exit(1)
+            else:
+                print "Using log file per job format instead"
     else:
            print "%d files Selected with pattern '%s'" % (len(fio_data_file), pattern)