Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- DIR='/var/www/CPUTemp'
- #set to C is using Celsius
- TEMP_SCALE="C"
- #define the desiered colours for the graphs
- CPUTEMP_COLOR="#CC0000"
- #hourly
- rrdtool graph $DIR/temp_hourly.png --start -4h \
- DEF:temp=$DIR/cputemp.rrd:cputemp:AVERAGE \
- AREA:temp$CPUTEMP_COLOR:"CPU Temprature [deg $TEMP_SCALE]"
- #daily
- rrdtool graph $DIR/temp_daily.png --start -1d \
- DEF:temp=$DIR/cputemp.rrd:cputemp:AVERAGE \
- AREA:temp$CPUTEMP_COLOR:"CPU Temprature [deg $TEMP_SCALE]"
- #weekly
- rrdtool graph $DIR/temp_weekly.png --start -1w \
- DEF:temp=$DIR/cputemp.rrd:cputemp:AVERAGE \
- AREA:temp$CPUTEMP_COLOR:"CPU Temprature [deg $TEMP_SCALE]"
- #monthly
- rrdtool graph $DIR/temp_monthly.png --start -1m \
- DEF:temp=$DIR/cputemp.rrd:cputemp:AVERAGE \
- AREA:temp$CPUTEMP_COLOR:"CPU Temprature [deg $TEMP_SCALE]"
- #yearly
- rrdtool graph $DIR/temp_yearly.png --start -1y \
- DEF:temp=$DIR/cputemp.rrd:cputemp:AVERAGE \
- AREA:temp$CPUTEMP_COLOR:"CPU Temprature [deg $TEMP_SCALE]"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement