Temperature monitoring

picklefish

Explorer
Joined
Mar 13, 2016
Messages
62
it's running as root because it needs smartctl. But I imagine it's probably a permissions issue I don't understand.
 

Jacopx

Patron
Joined
Feb 19, 2016
Messages
367
it's running as root because it needs smartctl. But I imagine it's probably a permissions issue I don't understand.

Does the root or wheel group have the permission to write in that dir?
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
I have the above issue. Here are the permissions:

[root@JOE-FREENAS] /mnt/vol1/Backup/freenas-temperature-graphing# ls -l
total 35
drwxrwxr-x+ 2 root admin 6 Sep 21 22:28 ./
drwxrwxr-x+ 7 root admin 9 Sep 21 21:47 ../
-rwxrwxr-x+ 1 root admin 6033 May 2 17:11 rrd-graph.sh*
-rwxrwxr-x+ 1 root admin 2271 Sep 21 22:15 rrd.sh*
-rwxrwxr-x+ 1 root admin 1184 May 2 17:11 temps-rrd-format.sh*
-rwxrwxr-x+ 1 root admin 754 May 2 17:11 temps-simple.sh*
 

snoopyjoe

Dabbler
Joined
Nov 13, 2016
Messages
10
This is great !! Thanks. This works like a charm! I even made a html file and embedded the png files. Then created a webDav share to the html file so that way you don't have to access the share folder to view the graphs every time. Now if I could just get something like mbmon to work then I could monitor the system temp as my case is VERY unorthodox.
 

Attachments

  • Screen Shot 2016-11-13 at 9.00.54 PM.png
    230.1 KB · Views: 886
Last edited:

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546

Foxtrot

Cadet
Joined
Apr 10, 2017
Messages
9
Can anyone help me with this, I can't puzzle what could be going wrong. I get the follow error message whenever I run the script whether it be via shell or crontab.

Code:
[root@freenas ~]# /mnt/Panzer/Scripts/freenas-temperature-graphing-master/rrd.sh
/mnt/Panzer/Scripts/freenas-temperature-graphing-master/temps-5min.rrd		 
+ '[' -n ']'																	
+ func_usage																	
+ echo ' This script gathers and outputs the CPU and drive					 
temperatures in a format rrdtool can consume.								   
																				
Usage $0 [-v] [-d] [-h]														 
																				
-v | --verbos  Enables verbose output										   
-d | --debug   Outputs each line of the script as it executes (turns on xtrace)
-h | --help	Displays this message											
'																			   
+ exit 0																		
ERROR: invalid option -- 'v'
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
@Foxtrot what is your script? You have to show the contents of your script in order for us to diagnose.
 

Seren

Dabbler
Joined
Feb 18, 2016
Messages
22
@Foxtrot, Sorry for the delay. I've added a bit of diagnostics and error handling to the scripts, and fixed a few more bugs, so feel free to try it again and report back.

Also, feel free to open a github issue as well since I might miss discussion on this thread.
 

s0n1kpt

Dabbler
Joined
Apr 30, 2017
Messages
25
@Seren, Thanks for the script you are the best ;)
I was wondering if by any chance we could change the graph hours, can we?
Thanks again
 

Seren

Dabbler
Joined
Feb 18, 2016
Messages
22
@Seren, Thanks for the script you are the best ;)
I was wondering if by any chance we could change the graph hours, can we?
Thanks again

Glad you like it. :) What exactly do you mean when you say "change the graph hours"?

If you're asking about changing the timezone of the graph, I believe that can be done by setting the TZ variable to your location (ex. "export TZ=America/Los_Angeles") in the script. You can see all the locations in /usr/share/zoneinfo/ I think.

To change the time scale of the x-axis, you can use a different interval (ex. 1min vs 5min vs 120min).

If you want a different format of the date/time, it's possible to add the --x-grid option to rrdtool graph command, but it's a bit tricky to get right, so while it's something anyone can customize, the script will probably just support the standard formatting.
 

s0n1kpt

Dabbler
Joined
Apr 30, 2017
Messages
25
Sorry for my english.
I mean, if it is possible to change the footer, in the attached chart, we can see that the dates shown go from Tue 12:00 until Sun 12:00, it shows the values obtained in 6 days and i was wondering if it would be possible to change the start for ex. Tue 00: 00 and the end for Mon 00:00. So the graph showed in detail the values obtained during 24 hours.
Thanks again ;)
 

Attachments

  • temps-5min-cpus.png
    temps-5min-cpus.png
    64.7 KB · Views: 747

Seren

Dabbler
Joined
Feb 18, 2016
Messages
22
Ahh, ok. What you ask possible I believe (https://oss.oetiker.ch/rrdtool/doc/rrdgraph_examples.en.html has some good info), but I haven't done research to figure out exactly how. Currently rrdtool graphs the data file with the default width and density, but I'm sure they can be adjusted. I'm not able to do this research at the moment due to time constraints, but if you do figure it out, post it here and I'll see about adding it to the script.
 

s0n1kpt

Dabbler
Joined
Apr 30, 2017
Messages
25
I @Seren i find a way to do it, i replace the line (file rrd-graph.sh):
Code:
--start end-"${timespan}" --end now \

with
Code:
--start end-86400 --end now \


Thanks
 

Attachments

  • temps-1min-cpus.png
    temps-1min-cpus.png
    180.3 KB · Views: 755
  • temps-1min-drives.png
    temps-1min-drives.png
    32.4 KB · Views: 867

JohnnyGrey

Dabbler
Joined
Jul 1, 2017
Messages
45
Figured I'd say thank you as well! This is a phenomenal little script! Just finished building and setting up my server a couple days ago, and this is a big help!

EDIT: Can anyone point me to a resource to get these graphs automatically emailed to me?
 
Last edited:

s0n1kpt

Dabbler
Joined
Apr 30, 2017
Messages
25
@JohnnyGrey i create a little script to send me the files:
Code:
#!/bin/sh

### Parameters ###
email="your_email@email.com"
subject="Subject name"

### Send config backup ###
	cp /mnt/sysVault/sysDataSet/bin/
	uuencode temps-1min-cpus.png temps-1min-cpus.png > /tmp/out.mail
	uuencode temps-1min-drives.png temps-1min-drives.png >> /tmp/out.mail
	uuencode temps-5min-cpus.png temps-5min-cpus.png >> /tmp/out.mail
	uuencode temps-5min-drives.png temps-5min-drives.png >> /tmp/out.mail
	mail -s "${subject}" "${email}" < /tmp/out.mail
 

qqBazz

Dabbler
Joined
Nov 5, 2015
Messages
34
Out of curiousity, does anyone else notice a big offset in the temps reported in the OS via sysctl and what the BMC reports via IPMI?

My BMC tells me this:
Code:
adam@turbinado ~> ipmi sdr list full | grep Temp
MB Temperature   | 56 degrees C	  | ok
CPU Temperature  | 60 degrees C	  | ok

while from the OS itself, I get this:

Code:
scarecrow% sudo sysctl -a | grep -i tempera
coretemp0: critical temperature detected, suggest system shutdown
coretemp0: critical temperature detected, suggest system shutdown
coretemp1: critical temperature detected, suggest system shutdown
coretemp0: critical temperature detected, suggest system shutdown
dev.cpu.3.temperature: 78.0C
dev.cpu.2.temperature: 78.0C
dev.cpu.1.temperature: 81.0C
dev.cpu.0.temperature: 81.0C


The OS seems to think things are a lot hotter, and I'm not sure which to trust.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,175
Fascinating, I see something similar on my X11SSM-F (but less pronounced). My guess is that IPMI is using a separate thermistor placed close to the CPU socket, which will naturally lead to lower numbers than those measured at the die.
 
Top