Changeset 1487

Show
Ignore:
Timestamp:
02/20/08 15:47:32 (4 years ago)
Author:
ssm
Message:

Fix typos, clean up labels

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • people/ssm/plugins/iostat/iostat_latency

    r1486 r1487  
    2626############################## 
    2727## Configuration 
    28 my %graphconfig = ('grph_title' => 'Disk stats',  
     28my %graphconfig = ('graph_title' => 'Disk stats',  
    2929                   'graph_args' => '--base 1000 -l 0', 
    3030                   'graph_vlabel' => 'Seconds', 
     
    8484    foreach my $device (sort(keys(%stats))) { 
    8585        if ($stats{$device}{'type'} eq 'disk') { 
     86            my $label = $stats{$device}{'label'}; 
    8687            foreach my $operation ("read", "write") {  
    8788                if($stats{$device}{'active'}) { 
    8889                    # Label 
    8990                    printf("%s_%s_time.label %s\n",  
    90                            $device, $operation, join("_", $device, $operation)); 
     91                           $label, $operation, join(":", $device, $operation)); 
    9192                    # Info 
    9293                    if ($stats{$device}{'info'}) { 
    93                         printf("%s_%s_time.info %s\n", $device, $operation, 
     94                        printf("%s_%s_time.info %s\n", $label, $operation, 
    9495                               $stats{$device}{'info'}); 
    9596                    } 
     
    107108    # Data configuration 
    108109    foreach my $device (sort(keys(%stats))) { 
     110        my $label = $stats{$device}{'label'}; 
    109111        if ($stats{$device}{'type'} eq 'disk') { 
    110112            foreach my $operation ("read", "write") {  
    111113                if($stats{$device}{'active'}) { 
    112                     printf("%s_%s_time.value %f\n", $device, $operation, 
     114                    printf("%s_%s_time.value %f\n", $label, $operation, 
    113115                           &iotime(\%stats, $device, $operation)); 
    114116                    } 
     
    157159        my $device = shift(@line); 
    158160 
    159         $device =~ s,[^\w],_,g; 
     161        my $label = $device; 
     162        $label =~ s,[^\w],_,g; 
    160163 
    161164        if(scalar(@line) == $DISK) { 
    162165            $diskstats{$device} = { 
    163                 'type' => 'disk', 
     166                'type'  => 'disk', 
     167                'label' => $label, 
    164168                'major' => $major, 
    165169                'minor' => $minor,