SOLVED HW monitor tab in GUI

Status
Not open for further replies.

Artion

Patron
Joined
Feb 12, 2016
Messages
331
Hi, greetings to all.
I was wondering if it is implementable a GUI tab for monitoring data as CPU, MB and disks temperature (why not fans rpm). Maybe it can be in the Reporting tab. I found that it is possible to read this data by commands that are already in FreeNAS. Follows an example of a script that gets some of the data, found googling. I didn't find any info in the forum, so i opened a thread. Hope this could be an interesting and useful thing.

Code:
#! /bin/bash
adastat () { echo -n `camcontrol cmd $1 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r - | awk '{print $10 " " ; }'` " " ; }
echo
echo System Temperatures - `date`
cat /etc/version uptime | awk '{ print "\nSystem Load:",$8,$9,$10,"\n" }'
echo "CPU Temperature:"
sysctl -a | egrep -E "cpu\.[0-9]+\.temp"
echo
echo "Drive Activity Status"
for i in $(sysctl -n kern.disks | awk '{for (i=NF; i!=0 ; i--) if(match($i, '/ada/')) print $i }' ); do echo -n $i:; adastat $i; done; echo;
echo
echo "HDD Temperature:"
for i in $(sysctl -n kern.disks | awk '{for (i=NF; i!=0 ; i--) if(match($i, '/ada/')) print $i }' )
do
echo $i `smartctl -a /dev/$i | awk '/Temperature_Celsius/{DevTemp=$10;} /Serial Number:/{DevSerNum=$3}; /Device Model:/{DevName=$3} END { print DevTemp,DevSer$
done
echo
 

Artion

Patron
Joined
Feb 12, 2016
Messages
331
Thanks for the reply. I did a test of FreeNAS 10 and the GUI is completely different. Personally don't like it o_O. But let's wait for the stable release to judge. :)
 
Last edited:
Status
Not open for further replies.
Top