write hwstat version for freebsd

This commit is contained in:
2026-01-06 20:31:53 -08:00
parent 0a57255043
commit e806f5f7d8

View File

@ -1,3 +1,11 @@
#!/bin/sh #!/bin/sh
CPUTEMP=$(sensors | grep "Package id 0" | awk '{print $4}' | sed s/+// ) CPUTEMP=$(sensors | grep "Package id 0" | awk '{print $4}' | sed s/+// )
# freebsd
# calculate average from all cores (unfinished)
#CORETEMPS=$(hwstat | grep CPU | awk '{print $2}')
# report only core 0 temp for now...
CPUTEMP="$(hwstat | grep CPU | awk 'NR==1 {print $2}')°C"
echo $CPUTEMP echo $CPUTEMP