# rrds/proc-diskio - disk IO stats via /proc/stat on linux
# CVS $Id: procdiskio,v 1.3 2003/03/20 18:09:45 remstats Exp $
# from remstats version @@VERSION@@
# Copyright 2003 by Thomas Erskine <@@AUTHOR@@>

source	unix-status
step	300

data	rios=proc_disk_rio DERIVE:600:0:10000	procdiskio
data	wios=proc_disk_wio DERIVE:600:0:10000	procdiskio
data	rblks=proc_disk_rblk DERIVE:600:0:1000000	procdiskio
data	wblks=proc_disk_wblk DERIVE:600:0:1000000	procdiskio

archives day-avg week-avg month-avg 3month-avg year-avg day-max week-max month-max 3month-max year-max
times	day yesterday week month 3month year

graph	ios desc="This is collected by the unix-status-collector.  It is Linux specific.  It works by reading and parsing the contents of /proc/stat.  It looks for either the older (2.2.x kernels) disk_rio, disk_wio, disk_rblk or disk_wblk records, or the newer (2.4.x kernels) disk_io records.  In either case, it extracts the counts of I/O operations (Reads and Writes) for this graph and the count of blocks transferred for the blocks graph."
		--title '##HOST## - Disk I/O Ops (##GRAPHTIME##)'
		--lower-limit 0
		--vertical-label ops/s
		DEF:rios=##DB##:rios:AVERAGE
		DEF:wios=##DB##:wios:AVERAGE
		CDEF:missing=rios,UN,INF,UNKN,IF
		'AREA:rios###COLOR1##:reads'
		'STACK:wios###COLOR2##:writes'
		'GPRINT:rios:AVERAGE:reads (avg=%.0lf%s\g'
		'GPRINT:rios:MAX: max=%.0lf%s\g'
		'GPRINT:rios:LAST: cur=%.0lf%s)\l'
		'GPRINT:wios:AVERAGE:writes (avg=%.0lf%s\g'
		'GPRINT:wios:MAX: max=%.0lf%s\g'
		'GPRINT:wios:LAST: cur=%.0lf%s)'
		'AREA:missing###MISSING##:missing'

graph	blocks desc="This is collected by the unix-status-collector.  It is Linux specific.  It works by reading and parsing the contents of /proc/stat.  It looks for either the older (2.2.x kernels) disk_rio, disk_wio, disk_rblk or disk_wblk records, or the newer (2.4.x kernels) disk_io records.  In either case, it extracts the counts of I/O operations for the ios graph and the count of blocks transferred (Reads and Writes) for this graph."
		--title '##HOST## - Disk I/O Blocks (##GRAPHTIME##)'
		--lower-limit 0
		--vertical-label blocks/s
		DEF:rblks=##DB##:rblks:AVERAGE
		DEF:wblks=##DB##:wblks:AVERAGE
		CDEF:missing=rblks,UN,INF,UNKN,IF
		'AREA:rblks###COLOR1##:reads'
		'STACK:wblks###COLOR2##:writes'
		'GPRINT:rblks:AVERAGE:reads (avg=%.0lf%s\g'
		'GPRINT:rblks:MAX: max=%.0lf%s\g'
		'GPRINT:rblks:LAST: cur=%.0lf%s)\l'
		'GPRINT:wblks:AVERAGE:writes (avg=%.0lf%s\g'
		'GPRINT:wblks:MAX: max=%.0lf%s\g'
		'GPRINT:wblks:LAST: cur=%.0lf%s)'
		'AREA:missing###MISSING##:missing'

