Changeset ae3b4cc9ae0d85924827ee7b812a6759f989b036

Show
Ignore:
Timestamp:
05/30/10 02:03:52 (4 years ago)
Author:
Jason Dixon <jdixon@omniti.com>
git-committer:
Jason Dixon <jdixon@omniti.com> 1275185032 +0000
git-parent:

[36040508a092f9900eee7f713f630504bd77b9ea]

git-author:
Jason Dixon <jdixon@omniti.com> 1275185032 +0000
Message:

use extended statistics for Linux, prefix with disk name

git-svn-id: https://labs.omniti.com/resmon/branches/resmon2@394 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Core/Iostat.pm

    r7c54048 rae3b4cc  
    101101 
    102102Number of transport errors. 
     103 
     104=item rrqm_sec 
     105 
     106The number of read requests merged per second that were queued to the device. 
     107 
     108=item wrqm_sec 
     109 
     110The number of write requests merged per second that were queued to the device. 
     111 
     112=item rsec_sec 
     113 
     114The number of sectors read from the device per second. 
     115 
     116=item wsec_sec 
     117 
     118The number of sectors written to the device per second. 
     119 
     120=item avgrq_size 
     121 
     122The average size (in sectors) of the requests that were issued to the device. 
     123 
     124=item avgqu_size 
     125 
     126The average queue length of the requests that were issued to the device. 
     127 
     128=item await_msec 
     129 
     130The average time (in milliseconds) for I/O requests issued to the device to be served. 
     131 
     132=item svctm_msec 
     133 
     134The average service time (in milliseconds) for I/O requests that were issued to the device. 
     135 
     136=item util_pct 
     137 
     138Percentage of CPU time during which I/O requests were issued to the device. 
    103139 
    104140=item kb_xfrd 
     
    154190        } 
    155191    } elsif ($osname eq 'linux') { 
    156         my $output = run_command("$iostat_path $disk"); 
    157         my ($line) = grep(/$disk\s*/, split(/\n/, $output)); 
    158         if ($line =~ /^$disk\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s+(\d+).*/) { 
     192        my $interval = 5; 
     193        my $count = 2; 
     194        my $output = run_command("$iostat_path -x $disk $interval $count"); 
     195        my ($line) = (grep(/$disk\s*/, split(/\n/, $output)))[1]; 
     196        if ($line =~ /^$disk\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+).*/) { 
    159197            return { 
    160                 'xfrs_sec' => [$1, 'i'], 
    161                 'reads_sec' => [$2, 'i'], 
    162                 'writes_sec' => [$3, 'i'] 
     198                "${disk}_rrqm_sec" => [$1, 'n'], 
     199                "${disk}_wrqm_sec" => [$2, 'n'], 
     200                "${disk}_reads_sec" => [$3, 'n'], 
     201                "${disk}_writes_sec" => [$4, 'n'], 
     202                "${disk}_rsec_sec" => [$5, 'n'], 
     203                "${disk}_wsec_sec" => [$6, 'n'], 
     204                "${disk}_avgrq_size" => [$7, 'n'], 
     205                "${disk}_avgqu_size" => [$8, 'n'], 
     206                "${disk}_await_msec" => [$9, 'n'], 
     207                "${disk}_svctm_msec" => [$10, 'n'], 
     208                "${disk}_util_pct" => [$11, 'n'] 
    163209            }; 
    164210        } else {