pfSense-Dashboard/plugins/temperature.sh
Victor Robellini cef8ae5909 Initial setup
I need to update the readme and migrate the data from the below reddit post
https://www.reddit.com/r/PFSENSE/comments/fsss8r/additional_grafana_dashboard/
2020-04-02 01:09:24 -04:00

6 lines
404 B
Bash

#!/bin/sh
HOSTNAME=$(hostname)
sysctl dev.cpu | fgrep temperature | tr -d '[:blank:]' | awk -v HOST="$HOSTNAME" -F '[.:]' '{print "temperature,sensor="$2$3",host="HOST" degrees=" $5"."substr($6, 1, length($6)-1)}'
sysctl hw.acpi.thermal | fgrep temperature | tr -d '[:blank:]' | awk -v HOST="$HOSTNAME" -F '[.:]' '{print "temperature,sensor="$4",host="HOST" degrees="$6"." substr($7, 1, length($7)-1)}'