Mercurial > repos > other > usr-local-bin
view sensors-graph @ 19:e245a271fc44
Add scripts for recording/displaying CPU and GPU activity
Graphing is based on sensors-graph, but recording is a Python script
because more processing is required than logging temperatures.
CPU/GPU recording will hopefully be useful to work out what causes
occasional lags in games - is it just I/O Wait (despite the SSD)?
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 01 Oct 2018 20:52:26 +0100 |
parents | 4b6ab7428895 |
children | 6e30e90527d6 |
line wrap: on
line source
#! /bin/bash start="-6h" if [ $# -eq 1 ] then start=$1 fi rrdtool graph /tmp/temps.png -w 800 -h 600 -a PNG --start "$start" \ --vertical-label "temps" \ --right-axis-label "speeds" \ --right-axis 100:0 \ DEF:core1=$HOME/.temps.rrd:core1-temp:AVERAGE \ DEF:core2=$HOME/.temps.rrd:core2-temp:AVERAGE \ DEF:core3=$HOME/.temps.rrd:core3-temp:AVERAGE \ DEF:core4=$HOME/.temps.rrd:core4-temp:AVERAGE \ DEF:isa1=$HOME/.temps.rrd:isa-temp1:AVERAGE \ DEF:isa2=$HOME/.temps.rrd:isa-temp2:AVERAGE \ DEF:isa3=$HOME/.temps.rrd:isa-temp3:AVERAGE \ DEF:gpu=$HOME/.temps.rrd:gpu:AVERAGE \ DEF:gpufan_raw=$HOME/.temps.rrd:gpu-fan:AVERAGE \ DEF:fan1_raw=$HOME/.temps.rrd:fan1:AVERAGE \ DEF:fan2_raw=$HOME/.temps.rrd:fan2:AVERAGE \ DEF:fan3_raw=$HOME/.temps.rrd:fan3:AVERAGE \ DEF:fan4_raw=$HOME/.temps.rrd:fan4:AVERAGE \ CDEF:fan1=fan1_raw,0.01,* \ CDEF:fan2=fan2_raw,0.01,* \ CDEF:fan3=fan3_raw,0.01,* \ CDEF:fan4=fan4_raw,0.01,* \ CDEF:gpufan=gpufan_raw,0.25,* \ LINE1:gpu#009900:"GPU" \ LINE1:core1#99000080:"Core 1" \ LINE1:core2#99000080:"Core 2" \ LINE1:core3#99000080:"Core 3" \ LINE1:core4#99000080:"Core 4" \ LINE1:isa1#bbbb66:"ISA 1" \ LINE1:isa2#bbbb66:"ISA 2" \ LINE1:isa3#bbbb66:"ISA 3" \ AREA:fan1#00009980:"CPU Fan" \ AREA:fan2#00009980:"Rear Fan" \ AREA:gpufan#00990080:"GPU Fan" \ AREA:fan3#00009980:"Front Fan 1" \ AREA:fan4#00009980:"Front Fan 2" \ && eog /tmp/temps.png rm /tmp/temps.png