[mrtg] Graphing IO Wait Times, with 4 samples.

Eric Hernandez navyeh at yahoo.com
Thu Aug 23 23:51:05 CEST 2007


Dear mrtg Group:
   
  I am using a script to graph IO Wait time on my database server. It works i am sampling the 2 and 3 sec interval from top. 
   
  However, I want to add the 4 and 5 sec sample to my graph how can i do this?
   
  Target[io_mysql]: `/usr/bin/ssh database server /usr/local/nagios/libexec/io_mrtg.sh`
Options[io_mysql]: nopercent,growright,gauge,noinfo
Title[io_mysql]:  IO Wait Times for AA-MySQL
PageTop[io_mysql]: <h1>IO Wait Times for AA-MySQL</h1>
MaxBytes[io_mysql]: 8000000
YLegend[io_mysql]: IO Wait Times for AA-MySQL
ShortLegend[io_mysql]: IO Wait Times for AA-MySQL
LegendI[io_mysql]: 2 Second
LegendO[io_mysql]: 3 second
Colours[io_mysql]: BLUE#1000ff,VIOLET#ff00ff,RED#bb0000,GREEN#006600

  this is whats in io_mrtg.sh
  #!/bin/sh
TERM=linux
export TERM
top -b -n3 |grep "wa,"|awk '{print $10}'|awk '{sub(/%/, "");print}'|awk '{sum = $1 * 100; print sum}'|sed '1d'
   
  it outputs like so
710
270

  I want to change it to this...
   top -b -n5 |grep "wa,"|awk '{print $10}'|awk '{sub(/%/, "");print}'|awk '{sum = $1 * 100; print sum}'|sed '1d'
320
170
230
40
   
  and graph all four values on the same graph,
   
  please advise thanks...
   
  -Eric


       
---------------------------------
Pinpoint customers who are looking for what you sell. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20070823/74cfe3cc/attachment-0001.html 


More information about the mrtg mailing list