Hi Daniel<br><br>This is significantly different to the Solaris output. Linux gives a few extra fields, and leaves out a few that Solaris has.<br>We may need to play with this to find some common ground.<br>Alternatively, we just accept and embrace the differences, and add a few extra graphs.<br>
We then set a SUBTEST string within the case statement.<br>The loop will then be <br>for subtest in $SUBTEST<br><br>The output I used was as below.<br>Make yours look similar, and we have a winner.<br><br>The output then gets massaged a little with this set of commands (commented for clarity)<br>
<span style="font-family: courier new,monospace;"> cat $TEMPFILE.raw | awk "NR>$LINE" \ # take only the last set</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> | sed "s/,/ /g" \ # make it space seperated </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> | awk '{ print $NF" "$0 }' \ # move device name to front</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> | awk '{ $NF="";print }' > $TEMPFILE.data # Dump the device name at the end</span><br>
<br><span style="font-family: courier new,monospace;">iostat -xrn 2 2</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">extended device statistics</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">r/s,w/s,kr/s,kw/s,wait,actv,wsvc_t,asvc_t,%w,%b,device</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">1.4,3.9,93.0,68.8,0.0,0.2,0.0,47.0,0,3,vdc0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.2,0,0,vdc1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">1.4,4.0,92.8,68.8,0.0,0.3,0.0,61.0,0,4,vdc2</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,blackbox:/data/scratch</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,infdomB1:/export/DRhome</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.7,0,0,infdomB1:/export/home</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,9.1,0,0,infdomD2:/data/software</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">extended device statistics</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">r/s,w/s,kr/s,kw/s,wait,actv,wsvc_t,asvc_t,%w,%b,device</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,vdc0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,vdc1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,vdc2</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,blackbox:/data/scratch</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,infdomB1:/export/DRhome</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,infdomB1:/export/home</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,infdomD2:/data/software</span><br><br>From man iostat<br> -n Display names in descriptive format. For exam-<br> ple, cXtYdZ, rmt/N, server:/export/path.<br>
-r Display data in a comma-separated format.<br> -x Report extended disk statistics. <br><br><br> Output<br> The output of the iostat utility includes the following<br> information.<br>
<br> device name of the disk<br><br> r/s reads per second<br><br> w/s writes per second<br><br> kr/s kilobytes read per second<br> The average I/O size during the interval can be<br>
computed from kr/s divided by r/s.<br><br> kw/s kilobytes written per second<br> The average I/O size during the interval can be<br> computed from kw/s divided by w/s.<br>
<br> wait average number of transactions waiting for service<br> (queue length)<br> This is the number of I/O operations held in the<br> device driver queue waiting for acceptance by the<br>
device.<br><br> actv average number of transactions actively being ser-<br> viced (removed from the queue but not yet com-<br> pleted)<br><br> This is the number of I/O operations accepted, but<br>
not yet serviced, by the device.<br><br> svc_t average response time of transactions, in mil-<br> liseconds<br> The svc_t output reports the overall response<br>
time, rather than the service time, of a device.<br> The overall time includes the time that transac-<br> tions are in queue and the time that transactions<br> are being serviced. The time spent in queue is<br>
shown with the -x option in the wsvc_t output<br> column. The time spent servicing transactions is<br> the true service time. Service time is also shown<br> with the -x option and appears in the asvc_t out-<br>
put column of the same report.<br><br> %w percent of time there are transactions waiting for<br> service (queue non-empty)<br><br> %b percent of time the disk is busy (transactions in<br>
progress)<br><br> wsvc_t average service time in wait queue, in mil-<br> liseconds<br><br> asvc_t average service time of active transactions, in<br> milliseconds<br>
<br> wt the I/O wait time is no longer calculated as a<br> percentage of CPU time, and this statistic will<br> always return zero.<br><br>Cheers<br> Vernon<br><br><br><br><br>
<div class="gmail_quote">On Wed, Sep 15, 2010 at 10:27 PM, Daniel Bourque <span dir="ltr"><<a href="mailto:dbourque@weatherdata.com">dbourque@weatherdata.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
here is a sample run. <br>
$ iostat -xd 5 2<br>
Linux 2.6.18-92.1.22.el5PAE (<a href="http://host.bla.com" target="_blank">host.bla.com</a>) 09/15/2010<br>
<br>
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util<br>
sda 0.00 0.00 0.00 0.00 0.07 0.00 92.89 0.00 4.31 3.78 0.00<br>
sdb 23.63 8.98 21.65 27.30 14.39 120.96 2.77 0.10 1.95 1.55 7.59<br>
dm-0 0.00 0.00 0.11 3.01 2.27 24.08 8.44 0.04 11.50 1.04 0.32<br>
dm-1 0.00 0.00 0.34 1.80 6.38 14.38 9.71 0.02 10.15 1.59 0.34<br>
dm-2 0.00 0.00 0.00 0.33 0.01 2.62 8.00 0.00 7.70 3.09 0.10<br>
dm-3 0.00 0.00 0.47 28.77 33.15 90.77 4.24 0.06 2.03 0.17 0.51<br>
dm-4 0.00 0.00 0.00 0.00 0.00 0.00 8.00 0.00 18.27 2.54 0.00<br>
dm-5 0.00 0.00 44.45 2.42 111.93 123.38 5.02 0.02 0.37 1.59 7.45<br>
drbd0 0.00 0.00 44.45 128.36 111.89 51.42 4.88 0.10 3.45 3.94 13.17<br>
<br>
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util<br>
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00<br>
sdb 0.00 35.40 3.80 69.20 32.00 821.20 11.69 0.04 0.59 0.52 3.76<br>
dm-0 0.00 0.00 0.20 2.80 3.20 22.40 8.53 0.00 1.13 1.13 0.34<br>
dm-1 0.00 0.00 0.00 1.80 0.00 14.40 8.00 0.00 0.00 0.00 0.00<br>
dm-2 0.00 0.00 0.00 0.60 0.00 4.80 8.00 0.00 0.00 0.00 0.00<br>
dm-3 0.00 0.00 0.00 2.00 0.00 16.00 8.00 0.00 0.00 0.00 0.00<br>
dm-4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00<br>
dm-5 0.00 0.00 3.60 97.40 28.80 761.00 7.82 0.04 0.40 0.34 3.40<br>
drbd0 0.00 0.00 3.60 94.80 28.80 758.40 8.00 0.09 0.96 0.56 5.48<br>
<br>
<br>
I whish the maintainer of iostat would add a friendly name option, it would not be so hard to code a device-mapper -> LVM translation using "dmsetup ls" , problem is you can only run that command as root. ( guess you could add a sudo rule... )<br>
<br>
anyways, if you don't find the time to work on this, just just provide a sample output of solaris's /usr/bin/iostat -xrn and I'll post the changes needed to the list.<br>
<br>
Thank !<br>
<br>
<br>
Dan<br>
<br>
<br>
<br>
Vernon Everett wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
Could give it a go.<br>
Send me the output of iostat -x 2 2 for your favourite OS(s)<br>
<br>
Where I am now, I only have Solaris, hence the bias.<br>
<br>
Cheers<br>
V<br>
<br>
<br></div><div class="im">
On Wed, Sep 15, 2010 at 5:22 AM, Daniel Bourque <<a href="mailto:dbourque@weatherdata.com" target="_blank">dbourque@weatherdata.com</a> <mailto:<a href="mailto:dbourque@weatherdata.com" target="_blank">dbourque@weatherdata.com</a>>> wrote:<br>
<br>
Sorry I can't reply to the thread for some reason i quit receiving<br>
the emails, I checked the archive and noticed the replies to my<br>
former thread. ( thanks ! )<br>
<br>
Vernon, since I don't run solaris here, only linux and some tru64,<br>
the -r ( csv output ) and -n ( friendly names ) options makes it<br>
hard to use your shell script since they either don't exists or<br>
don't work the same. Can you perhaps provide a same output of<br>
"iostat -xrn" and along with formated text you pass to hobbit in<br>
your check.<br>
<br>
I can then provide a snippet of code for linux, which would<br>
provide the equivalent output. So you could just add a case in the<br>
shell script.<br>
<br>
<br>
case `uname` in<br>
Linux)<br>
/usr/bin/iostat -x $DURATION 2 | wonderful stuff > $TEMPFILE.raw<br>
;;<br>
SunOS)<br>
/usr/bin/iostat -xrn $DURATION 2 > $TEMPFILE.raw<br>
;;<br>
esac<br>
<br>
<br>
<br>
-- Dan<br>
<br>
<br>
To unsubscribe from the xymon list, send an e-mail to<br></div>
<a href="mailto:xymon-unsubscribe@xymon.com" target="_blank">xymon-unsubscribe@xymon.com</a> <mailto:<a href="mailto:xymon-unsubscribe@xymon.com" target="_blank">xymon-unsubscribe@xymon.com</a>><br>
<br>
<br>
<br>
</blockquote><div><div></div><div class="h5">
<br>
To unsubscribe from the xymon list, send an e-mail to<br>
<a href="mailto:xymon-unsubscribe@xymon.com" target="_blank">xymon-unsubscribe@xymon.com</a><br>
<br>
<br>
</div></div></blockquote></div><br>