slitaz-forge rev 334

makegraphs: swap readsect and writesect :-/
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Sep 29 11:26:56 2012 +0200 (2012-09-29)
parents 1b8983846ae9
children 3d61397d3367
files chub/web/lib/makegraphs mirror/info/bin/makegraphs tank/web/lib/makegraphs
line diff
     1.1 --- a/chub/web/lib/makegraphs	Fri Sep 28 15:59:26 2012 +0200
     1.2 +++ b/chub/web/lib/makegraphs	Sat Sep 29 11:26:56 2012 +0200
     1.3 @@ -164,6 +164,7 @@
     1.4  	rate=$(echo | awk "BEGIN { printf \"%.0e\\n\",$err/$done }")
     1.5  	[ $err -eq 0 ] &&  rate="0"
     1.6  #		--right-axis-label "I/O state %"
     1.7 +	 # BUG workaround: swap readsect and writesect :-/
     1.8  	rrdtool graph "$rrdgraph/disk-$period.png" --start -1$period \
     1.9  		$rrdgraphargs -t "disk access per $period $info" \
    1.10  		--logarithmic --lower-limit 1 -v "Sectors/second" --units=si \
    1.11 @@ -177,9 +178,9 @@
    1.12  		"CDEF:errpct=100,err,req,/,*" \
    1.13  		"CDEF:donepct=100,done,req,/,*" \
    1.14  		"CDEF:errrate=err,done,/" \
    1.15 -		'AREA:readpct#0000FF:sectors read from disk' \
    1.16 +		'AREA:readpct#0000FF:sectors written from disk' \
    1.17  		"COMMENT:I/O error rate $rate" \
    1.18 -		'STACK:writepct#00FF00:sectors written to disk' \
    1.19 +		'STACK:writepct#00FF00:sectors read to disk' \
    1.20  		'LINE2:donepct#FFFF00:% I/O complete' \
    1.21  		'LINE2:errpct#FF0000:% I/O error\j'
    1.22  	else
    1.23 @@ -190,8 +191,8 @@
    1.24  		DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE \
    1.25  		"CDEF:readpct=100,read,$maxdisk,/,*" \
    1.26  		"CDEF:writepct=100,write,$maxdisk,/,*" \
    1.27 -		'AREA:readpct#0000FF:sectors read from disk' \
    1.28 -		'STACK:writepct#00FF00:sectors written to disk'
    1.29 +		'AREA:readpct#0000FF:sectors written from disk' \
    1.30 +		'STACK:writepct#00FF00:sectors read to disk'
    1.31  	fi
    1.32  }
    1.33  
     2.1 --- a/mirror/info/bin/makegraphs	Fri Sep 28 15:59:26 2012 +0200
     2.2 +++ b/mirror/info/bin/makegraphs	Sat Sep 29 11:26:56 2012 +0200
     2.3 @@ -152,6 +152,7 @@
     2.4  		  sed "s|Disk $2: \(.*\), .*|\1|") ]"
     2.5  	if [ -e /sys/block/${2#/dev/}/device/iodone_cnt ]; then
     2.6  #		--right-axis-label "I/O state %"
     2.7 +	# BUG workaround: swap readsect and writesect :-/
     2.8  	rrdtool graph "$rrdgraph/disk-$period.png" --start -1$period \
     2.9  		$rrdgraphargs -t "disk access per $period $info" \
    2.10  		--logarithmic --lower-limit 1 -v "Sectors/second" --units=si \
    2.11 @@ -164,8 +165,8 @@
    2.12  		"CDEF:writepct=100,write,$maxdisk,/,*" \
    2.13  		"CDEF:errpct=100,err,req,/,*" \
    2.14  		"CDEF:donepct=100,done,req,/,*" \
    2.15 -		'AREA:readpct#0000FF:sectors read from disk' \
    2.16 -		'STACK:writepct#00FF00:sectors written to disk' \
    2.17 +		'AREA:readpct#0000FF:sectors written from disk' \
    2.18 +		'STACK:writepct#00FF00:sectors read to disk' \
    2.19  		'LINE2:donepct#FFFF00:I/O complete' \
    2.20  		'LINE2:errpct#FF0000:I/O error\j'
    2.21  	else
    2.22 @@ -176,8 +177,8 @@
    2.23  		DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE \
    2.24  		"CDEF:readpct=100,read,$maxdisk,/,*" \
    2.25  		"CDEF:writepct=100,write,$maxdisk,/,*" \
    2.26 -		'AREA:readpct#0000FF:sectors read from disk' \
    2.27 -		'STACK:writepct#00FF00:sectors written to disk'
    2.28 +		'AREA:readpct#0000FF:sectors written from disk' \
    2.29 +		'STACK:writepct#00FF00:sectors read to disk'
    2.30  	fi
    2.31  }
    2.32  
     3.1 --- a/tank/web/lib/makegraphs	Fri Sep 28 15:59:26 2012 +0200
     3.2 +++ b/tank/web/lib/makegraphs	Sat Sep 29 11:26:56 2012 +0200
     3.3 @@ -164,6 +164,7 @@
     3.4  	rate=$(echo | awk "BEGIN { printf \"%.0e\\n\",$err/$done }")
     3.5  	[ $err -eq 0 ] &&  rate="0"
     3.6  #		--right-axis-label "I/O state %"
     3.7 +	# BUG workaround: swap readsect and writesect :-/
     3.8  	rrdtool graph "$rrdgraph/disk-$period.png" --start -1$period \
     3.9  		$rrdgraphargs -t "disk access per $period $info" \
    3.10  		--logarithmic --lower-limit 1 -v "Sectors/second" --units=si \
    3.11 @@ -177,9 +178,9 @@
    3.12  		"CDEF:errpct=100,err,req,/,*" \
    3.13  		"CDEF:donepct=100,done,req,/,*" \
    3.14  		"CDEF:errrate=err,done,/" \
    3.15 -		'AREA:readpct#0000FF:sectors read from disk' \
    3.16 +		'AREA:readpct#0000FF:sectors written from disk' \
    3.17  		"COMMENT:I/O error rate $rate" \
    3.18 -		'STACK:writepct#00FF00:sectors written to disk' \
    3.19 +		'STACK:writepct#00FF00:sectors read to disk' \
    3.20  		'LINE2:donepct#FFFF00:% I/O complete' \
    3.21  		'LINE2:errpct#FF0000:% I/O error\j'
    3.22  	else
    3.23 @@ -190,8 +191,8 @@
    3.24  		DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE \
    3.25  		"CDEF:readpct=100,read,$maxdisk,/,*" \
    3.26  		"CDEF:writepct=100,write,$maxdisk,/,*" \
    3.27 -		'AREA:readpct#0000FF:sectors read from disk' \
    3.28 -		'STACK:writepct#00FF00:sectors written to disk'
    3.29 +		'AREA:readpct#0000FF:sectors written from disk' \
    3.30 +		'STACK:writepct#00FF00:sectors read to disk'
    3.31  	fi
    3.32  }
    3.33