Whamcloud - gitweb
Added scripts to parse output per Peter Braam
authorcliffw <cliffw>
Thu, 22 Jun 2006 23:31:52 +0000 (23:31 +0000)
committercliffw <cliffw>
Thu, 22 Jun 2006 23:31:52 +0000 (23:31 +0000)
lustre-iokit/obdfilter-survey/README
lustre-iokit/obdfilter-survey/obparse.pl [new file with mode: 0644]
lustre-iokit/sgpdd-survey/README
lustre-iokit/sgpdd-survey/parse.pl [new file with mode: 0644]

index cea897a..68c4726 100644 (file)
@@ -139,3 +139,6 @@ numbers of I/Os in flight.
 It is also extremely useful to record average disk I/O sizes during each
 test.  These numbers help find pathologies in file the file system block
 allocator and the block device elevator.
 It is also extremely useful to record average disk I/O sizes during each
 test.  These numbers help find pathologies in file the file system block
 allocator and the block device elevator.
+
+The included obparse.pl script is an example of processing the output files to
+a .csv format.
diff --git a/lustre-iokit/obdfilter-survey/obparse.pl b/lustre-iokit/obdfilter-survey/obparse.pl
new file mode 100644 (file)
index 0000000..2b83b8d
--- /dev/null
@@ -0,0 +1,48 @@
+#!/usr/bin/perl -w
+
+# parses obdfilter output from our script goop
+# arg 0 input filename
+# arg 1 is 'w' 'r'
+
+$file = $ARGV[0];
+
+$type = $ARGV[1];
+print "$file\n";
+
+
+open ( PFILE, "$file") or die "Can't open results";
+while ( <PFILE> ) {
+       chomp;
+       @line = split( /\s+/ );
+       if ( $type eq 'w' ) {
+               # print "$line[5] $line[7] $line[9]\n";
+               # if( $line[9]) {
+               $out{$line[7]}{$line[9]} = $line[11];   
+               # }
+       } elsif ( $type eq 'r' ) {
+               # if( $line[18]) {
+               # print "$line[5] $line[7] $line[18]\n";
+               $out{$line[7]}{$line[9]} = $line[21];   
+        } else {
+               # if( $line[18]) {
+               # print "$line[5] $line[7] $line[18]\n";
+               $out{$line[7]}{$line[9]} = $line[16];   
+       }
+}
+
+       foreach $crg ( sort { $a <=> $b }  ( keys %out )) {
+               print "$crg";
+               @list = ( sort { $a <=> $b } ( keys %{ $out{$crg} } ));
+                foreach $thr ( @list ) {
+                       # These are the headers
+                        print ",$thr";
+                }
+                print "\n";
+                print "$crg";
+                foreach $tthr ( @list ) {
+                        print ",$out{$crg}{$tthr}";
+                }
+               print "\n";
+       }
+       
+
index 67dd23b..171d7fc 100644 (file)
@@ -75,3 +75,6 @@ with varying queue depth.  If the series (varying numbers of concurrent
 regions) all seem to land on top of each other, it shows the device is
 phased by seeks at the given record size.
 
 regions) all seem to land on top of each other, it shows the device is
 phased by seeks at the given record size.
 
+
+The included script, parse.pl will process output files and create .csv files fo spreadsheet import
+
diff --git a/lustre-iokit/sgpdd-survey/parse.pl b/lustre-iokit/sgpdd-survey/parse.pl
new file mode 100644 (file)
index 0000000..84b2225
--- /dev/null
@@ -0,0 +1,44 @@
+#!/usr/bin/perl -w
+
+# arg 0 is filename
+# arg 1 is 'w' or 'r' for reading or writing
+
+$file = $ARGV[0];
+
+$type = $ARGV[1];
+print "$file\n";
+
+
+open ( PFILE, "$file") or die "Can't open results";
+while ( <PFILE> ) {
+       chomp;
+       @line = split( /\s+/ );
+       if ( $type eq 'w' ) {
+               # print "$line[5] $line[7] $line[9]\n";
+               if( $line[9]) {
+               $out{$line[5]}{$line[7]} = $line[9];    
+               }
+       } else {
+               if( $line[18]) {
+               # print "$line[5] $line[7] $line[18]\n";
+               $out{$line[5]}{$line[7]} = $line[18];   
+               }
+       }
+}
+
+       foreach $crg ( sort { $a <=> $b }  ( keys %out )) {
+               print "$crg";
+               @list = ( sort { $a <=> $b } ( keys %{ $out{$crg} } ));
+                foreach $thr ( @list ) {
+                       # These are the headers
+                        print ",$thr";
+                }
+                print "\n";
+                print "$crg";
+                foreach $tthr ( @list ) {
+                        print ",$out{$crg}{$tthr}";
+                }
+               print "\n";
+       }
+       
+