Changeset 1487
- Timestamp:
- 02/20/08 15:47:32 (4 years ago)
- Files:
-
- people/ssm/plugins/iostat/iostat_latency (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
people/ssm/plugins/iostat/iostat_latency
r1486 r1487 26 26 ############################## 27 27 ## Configuration 28 my %graphconfig = ('gr ph_title' => 'Disk stats',28 my %graphconfig = ('graph_title' => 'Disk stats', 29 29 'graph_args' => '--base 1000 -l 0', 30 30 'graph_vlabel' => 'Seconds', … … 84 84 foreach my $device (sort(keys(%stats))) { 85 85 if ($stats{$device}{'type'} eq 'disk') { 86 my $label = $stats{$device}{'label'}; 86 87 foreach my $operation ("read", "write") { 87 88 if($stats{$device}{'active'}) { 88 89 # Label 89 90 printf("%s_%s_time.label %s\n", 90 $ device, $operation, join("_", $device, $operation));91 $label, $operation, join(":", $device, $operation)); 91 92 # Info 92 93 if ($stats{$device}{'info'}) { 93 printf("%s_%s_time.info %s\n", $ device, $operation,94 printf("%s_%s_time.info %s\n", $label, $operation, 94 95 $stats{$device}{'info'}); 95 96 } … … 107 108 # Data configuration 108 109 foreach my $device (sort(keys(%stats))) { 110 my $label = $stats{$device}{'label'}; 109 111 if ($stats{$device}{'type'} eq 'disk') { 110 112 foreach my $operation ("read", "write") { 111 113 if($stats{$device}{'active'}) { 112 printf("%s_%s_time.value %f\n", $ device, $operation,114 printf("%s_%s_time.value %f\n", $label, $operation, 113 115 &iotime(\%stats, $device, $operation)); 114 116 } … … 157 159 my $device = shift(@line); 158 160 159 $device =~ s,[^\w],_,g; 161 my $label = $device; 162 $label =~ s,[^\w],_,g; 160 163 161 164 if(scalar(@line) == $DISK) { 162 165 $diskstats{$device} = { 163 'type' => 'disk', 166 'type' => 'disk', 167 'label' => $label, 164 168 'major' => $major, 165 169 'minor' => $minor,
