mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-07 04:45:09 +01:00
20100810: cpu temperature log, initial version
This commit is contained in:
13
bin/cron/temperature_log
Executable file
13
bin/cron/temperature_log
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
TIMESTAMP=`date +%Y%m%d_%H%M`
|
||||||
|
#temperature: 23 C
|
||||||
|
|
||||||
|
TEMPERATURE=`awk '{print $2}' /proc/acpi/thermal_zone/THRM/temperature`
|
||||||
|
DATE=`date +%Y-%m`
|
||||||
|
LOG="/var/log/custom_logs/temperature_$DATE.log"
|
||||||
|
TOTAL=`awk '{a+=$8}END{print a}' /var/log/custom_logs/temperature.log`
|
||||||
|
LINES=`wc -l /var/log/custom_logs/temperature.log | awk '{print $1}'`
|
||||||
|
MON=`date +%B`
|
||||||
|
m=`wc -l /tmp/temp5_minutes | awk '{print $1}'`
|
||||||
|
|
||||||
|
echo "${TIMESTAMP} $TEMPERATURE" >> ${LOG}
|
||||||
Reference in New Issue
Block a user