[mrtg] Re: Disk I/O stats

Greg.Volk at edwardjones.com Greg.Volk at edwardjones.com
Tue Feb 26 14:54:24 MET 2002


> 
> 1014690000 99 99 100 100
> 1014689700 99 99 99 99
> 1014689400 99 99 100 100
> 1014689100 99 99 100 100
> 1014688800 99 99 99 99
> 1014688500 99 99 100 100
> 1014688200 100 100 100 100
> 1014687900 99 99 100 100
> 1014687600 99 99 100 100
> 1014687300 100 100 100 100
> 1014687000 99 99 100 100
> 
> Any idea what options I need to make this work, I'm pretty sure my awk
> command is correct.
> 

Weird. What does the raw output from your awk command look like? 
I use the following script to obtain disk read/write counters:


#!/bin/sh
##diskio.sh - Display read and write disk io counters for use with mrtg.
##this script requires /proc/stat and has been tested on linux 2.2.13
##Usage - ./diskio.sh
##
/bin/cat /proc/stat | grep disk_rio | awk ' { printf("%d\n", $2) } '
/bin/cat /proc/stat | grep disk_wio | awk ' { printf("%d\n", $2) } '
echo `/usr/bin/uptime | /usr/bin/awk ' { print $3 " " $4 " " $5 } ' | /usr/bin/sed s/,//g`
echo /etc/HOSTNAME
##end of script


The output is as follows:

> ./diskio.sh sda
71286067
138311955
98 days 16:20
mrtg-1
>


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list