comparison load-graph @ 30:dc0cf6bc9fbe

Add titles to graphs
author IBBoard <dev@ibboard.co.uk>
date Sun, 03 Jan 2021 19:32:26 +0000
parents c2584db4a650
children 72e04923c4d4
comparison
equal deleted inserted replaced
29:c2584db4a650 30:dc0cf6bc9fbe
19 for ((i=1; i<=cpu_count; i++)); do 19 for ((i=1; i<=cpu_count; i++)); do
20 cpu_lines+=("DEF:core${i}=$HOME/.load.rrd:core${i}:AVERAGE") 20 cpu_lines+=("DEF:core${i}=$HOME/.load.rrd:core${i}:AVERAGE")
21 cpu_lines+=("LINE1:core${i}#99000040:\"Core-${i}\"") 21 cpu_lines+=("LINE1:core${i}#99000040:\"Core-${i}\"")
22 done 22 done
23 23
24 rrdtool graph /tmp/load-percent.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" \ 24 rrdtool graph /tmp/load-percent.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" --title "CPU/GPU load" \
25 --vertical-label "Usage (%)" \ 25 --vertical-label "Usage (%)" \
26 ${cpu_lines[@]} \ 26 ${cpu_lines[@]} \
27 DEF:CPU=$HOME/.load.rrd:core_avg:AVERAGE \ 27 DEF:CPU=$HOME/.load.rrd:core_avg:AVERAGE \
28 DEF:GPU=$HOME/.load.rrd:GPU:AVERAGE \ 28 DEF:GPU=$HOME/.load.rrd:GPU:AVERAGE \
29 LINE2:CPU#990000:"CPU" \ 29 LINE2:CPU#990000:"CPU" \
30 LINE2:GPU#009900:"GPU" \ 30 LINE2:GPU#009900:"GPU" \
31 && rrdtool graph /tmp/load-type.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" \ 31 && rrdtool graph /tmp/load-type.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" --title "CPU task types" \
32 --vertical-label "Usage (%)" \ 32 --vertical-label "Usage (%)" \
33 DEF:user=$HOME/.load.rrd:user:AVERAGE \ 33 DEF:user=$HOME/.load.rrd:user:AVERAGE \
34 DEF:system=$HOME/.load.rrd:system:AVERAGE \ 34 DEF:system=$HOME/.load.rrd:system:AVERAGE \
35 DEF:iowait=$HOME/.load.rrd:iowait:AVERAGE \ 35 DEF:iowait=$HOME/.load.rrd:iowait:AVERAGE \
36 AREA:iowait#888888:"I/O Wait" \ 36 AREA:iowait#888888:"I/O Wait" \
37 STACK:system#6666FF:"System" \ 37 STACK:system#6666FF:"System" \
38 STACK:user#CCCC66:"User" \ 38 STACK:user#CCCC66:"User" \
39 && rrdtool graph /tmp/load-memory.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" \ 39 && rrdtool graph /tmp/load-memory.png -w 1280 -h 1024 -a PNG --start "$start" --end "$end" --title "Memory" \
40 --vertical-label "Usage (%)" \ 40 --vertical-label "Usage (%)" \
41 DEF:mem_used=$HOME/.load.rrd:mem_used:AVERAGE \ 41 DEF:mem_used=$HOME/.load.rrd:mem_used:AVERAGE \
42 DEF:mem_buffers=$HOME/.load.rrd:mem_buffers:AVERAGE \ 42 DEF:mem_buffers=$HOME/.load.rrd:mem_buffers:AVERAGE \
43 AREA:mem_used#888888:"Used" \ 43 AREA:mem_used#888888:"Used" \
44 STACK:mem_buffers#cccccc:"Buffers" \ 44 STACK:mem_buffers#cccccc:"Buffers" \