changeset 31:72e04923c4d4

Plot MAX load values to avoid graph length caps We store MAX when summarising. If we plot AVERAGE then <=1h works but >1h is blank. If we plot MAX then it automatically falls back to AVERAGE for <=1h!
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Feb 2021 15:34:54 +0000
parents dc0cf6bc9fbe
children ccc8f0903d2e
files load-graph
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/load-graph	Sun Jan 03 19:32:26 2021 +0000
+++ b/load-graph	Sat Feb 27 15:34:54 2021 +0000
@@ -17,29 +17,29 @@
 cpu_lines=()
 
 for ((i=1; i<=cpu_count; i++)); do
-	cpu_lines+=("DEF:core${i}=$HOME/.load.rrd:core${i}:AVERAGE")
+	cpu_lines+=("DEF:core${i}=$HOME/.load.rrd:core${i}:MAX")
 	cpu_lines+=("LINE1:core${i}#99000040:\"Core-${i}\"")
 done
 
 rrdtool graph /tmp/load-percent.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" --title "CPU/GPU load" \
 	--vertical-label "Usage (%)" \
 	${cpu_lines[@]} \
-	DEF:CPU=$HOME/.load.rrd:core_avg:AVERAGE \
-	DEF:GPU=$HOME/.load.rrd:GPU:AVERAGE \
+	DEF:CPU=$HOME/.load.rrd:core_avg:MAX \
+	DEF:GPU=$HOME/.load.rrd:GPU:MAX \
 	LINE2:CPU#990000:"CPU" \
 	LINE2:GPU#009900:"GPU" \
 && rrdtool graph /tmp/load-type.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" --title "CPU task types" \
 	--vertical-label "Usage (%)" \
-	DEF:user=$HOME/.load.rrd:user:AVERAGE \
-	DEF:system=$HOME/.load.rrd:system:AVERAGE \
-	DEF:iowait=$HOME/.load.rrd:iowait:AVERAGE \
+	DEF:user=$HOME/.load.rrd:user:MAX \
+	DEF:system=$HOME/.load.rrd:system:MAX \
+	DEF:iowait=$HOME/.load.rrd:iowait:MAX \
 	AREA:iowait#888888:"I/O Wait" \
 	STACK:system#6666FF:"System" \
 	STACK:user#CCCC66:"User" \
 && rrdtool graph /tmp/load-memory.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" --title "Memory" \
 	--vertical-label "Usage (%)" \
-	DEF:mem_used=$HOME/.load.rrd:mem_used:AVERAGE \
-	DEF:mem_buffers=$HOME/.load.rrd:mem_buffers:AVERAGE \
+	DEF:mem_used=$HOME/.load.rrd:mem_used:MAX \
+	DEF:mem_buffers=$HOME/.load.rrd:mem_buffers:MAX \
 	AREA:mem_used#888888:"Used" \
 	STACK:mem_buffers#cccccc:"Buffers" \
 && eog /tmp/load-*.png