view sensors-graph @ 14:92874671d6e1

Add and exclude more directories and files to focus it/limit file size
author IBBoard <dev@ibboard.co.uk>
date Mon, 19 Mar 2018 19:32:37 +0000
parents 3adc69ceb249
children 4b6ab7428895
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#0000bb80:"Core 1" \
	LINE1:core2#0000bb80:"Core 2" \
	LINE1:core3#0000bb80:"Core 3" \
	LINE1:core4#0000bb80:"Core 4" \
	LINE1:isa1#bbbb0080:"ISA 1" \
	LINE1:isa2#bbbb0080:"ISA 2" \
	LINE1:isa3#bbbb0080:"ISA 3" \
	AREA:fan1#99000080:"CPU Fan" \
	AREA:fan2#99000080:"Rear Fan" \
	AREA:gpufan#00990080:"GPU Fan" \
	AREA:fan3#99000080:"Front Fan 1" \
	AREA:fan4#99000080:"Front Fan 2" \
	&& eog /tmp/temps.png
rm /tmp/temps.png