Temperature Sensor

  • Just a copy from the old forum,http://sourceforge.net/apps/ph…t/viewtopic.php?f=5&t=324, thanks to subzeroin:


    So, I have tried this a little, and this is what I've got (after too many ours of trying to change and compile coretemp.c for the old debian kernel to recognize my i3..).


    First you have to have lm-sensors installed as you covered.


    Log in as root via ssh and use your preferred text-editor (I'll be using vim).


    Code
    vim /var/www/openmediavault/js/omv/module/admin/Sensors.js




    Then I inserted this:





    Then you have to create another file to get your changes in to collectd.conf and omv-mkgraph:


    Code
    vim /usr/share/openmediavault/scripts/collectd.d/sensors




    In this file you probably going to need to edit some things, like what sensors you want to use. I'm using a Intel i3 2100T so my sensors was coretemp:





    Save the file and then you have to make sure it is executable:


    Code
    chmod +x /usr/share/openmediavault/scripts/collectd.d/sensors




    You then run:


    Code
    /usr/share/openmediavault/scripts/collectd




    which is a script that make the collectd.conf and omv-mkgraph file.


    If it doesn't work, try running just


    Code
    /usr/share/openmediavault/scripts/collectd.d/sensors



    and look for errors, if not then try running:


    Code
    omv-mkgraph




    Log in to OMV webgui (or reload if you're already logged in), there should at least be a tab named "CPU temperature" now under SystemInformation->System.


    If you don't know which sensor you have to use in the file we've created before, you can do as this, but first of all, run sensors-detect and load your needed modules.



    Edit the collectd.conf file:


    Code
    vim /etc/collectd/collectd.conf




    Add this row:


    Code
    LoadPlugin sensors




    Reload collectd by either restarting your computer or


    Code
    /etc/init.d/collectd restart




    Now we can try to figure out the sensors and what path collectd uses:


    Zitat

    cd /var/lib/collectd/rrd/localhost


    ls




    Here I got this list:




    We can ignore cpu-0 to cpu-4, df, interface, load and memory since that are standard entries that already is in use by OMV.


    So what is left is sensors-coretemp-isa-0000, now check what's inside that folder:


    Code
    ls sensors-coretemp-isa-0000




    This is what was there, only temps:


    Zitat

    temperature-temp1.rrd temperature-temp2.rrd temperature-temp3.rrd




    And that is what get you what you should use, e.g:


    Zitat

    DEF:cpupavg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:AVERAGE




    Another usefull tool is rrdtool, if you get any errors in your scripts just try:



    Code
    rrdtool info yoursensorfile.rrd



    and that will get you a lot of info.


    Hope all this helps :)

    And the changes I made in order to get my sensors working (Asus AT5NM10T-I Atom D525 with sensors-atk0110-acpi-0)


  • when i run sensors i get this output


    [codeatk0110-acpi-0
    Adapter: ACPI interface
    Vcore Voltage: +1.14 V (min = +0.85 V, max = +1.70 V)
    +3.3 Voltage: +3.44 V (min = +2.97 V, max = +3.63 V)
    +5 Voltage: +5.08 V (min = +4.50 V, max = +5.50 V)
    +12 Voltage: +12.50 V (min = +10.20 V, max = +13.80 V)
    CPU FAN Speed: 2419 RPM (min = 600 RPM)
    CHASSIS FAN Speed: 0 RPM (min = 600 RPM)
    CHASSIS FAN 2 Speed: 0 RPM (min = 600 RPM)
    CPU Temperature: +36.0°C (high = +60.0°C, crit = +95.0°C)
    MB Temperature: +42.0°C (high = +45.0°C, crit = +75.0°C)


    k10temp-pci-00c3
    Adapter: PCI adapter
    temp1: +0.0°C (high = +70.0°C, crit = +90.0°C)][/code]


    The chipset is it87 but i wonder if it`s k10temp-pci-00c3 or atk0110-acpi-0 i have to use in /usr/share/openmediavault/scripts/collectd.d/sensors?

  • I believe the correct one is k10temp-pci-00c3. You can try

    Code
    cd /var/lib/collectd/rrd/localhost
    
    
    ls

    and then get inside the folder (probably k10temp-pci-00c3) where you will see, I believe, something like

    Zitat

    temperature-temp1.rrd temperature-temp2.rrd temperature-temp3.rrd


    This is what you must use to edit the file. Hope this helps.

  • checking content in folder with ls gave me


    Code
    cpu-0  cpu-2  cpu-4  df         load    sensors-atk0110-acpi-0
    cpu-1  cpu-3  cpu-5  interface  memory  sensors-k10temp-pci-00c3


    In /var/lib/collectd/rrd/localhost/sensors-atk0110-acpi-0 i see 9 files as i am trying also fanspeed, cpu freq
    In /var/lib/collectd/rrd/localhost/sensors-k10temp-pci-00c3 only one file wich is called temperature-temp1.rrd

  • So, I guess, you need both. You need sensors-k10temp-pci-00c3 for temperature (probably you get only CPU temp) and sensors-atk0110-acpi-0 for fan speed etc.
    You should create something like this

    Code
    ...DEF:cpupavg=\${DATA}/sensors-k10temp-pci-00c3/temperature-temp1.rrd:value:AVERAGE \
      DEF:cpupmin=\${DATA}/sensors-k10temp-pci-00c3/temperature-temp1.rrd:value:MIN \
      DEF:cpupmax=\${DATA}/sensors-k10temp-pci-00c3/temperature-temp1.rrd:value:MAX \...


    and something like

    Code
    ...DEF:cpupavg=\${DATA}/sensors-atk0110-acpi-0/fanspeed.rrd:value:AVERAGE \
      DEF:cpupmin=\${DATA}/sensors-atk0110-acpi-0/fanspeed.rrd:value:MIN \
      DEF:cpupmax=\${DATA}/sensors-atk0110-acpi-0/fanspeed.rrd:value:MAX \...


    i guess for the fan speeds

  • Hello,
    Here is the sensor file for an Acer Revo R310


    But is that the probes or temperature management by OMV are reliable?
    Because I have 73° in average and when I launch a download with Sabnzbd , OMV shutdown the PC for overheat , with this message :

    Zitat

    Message from syslogd@Revo at Jul 26 15:59:44 ...
    kernel:[ 4297.704453] Critical temperature reached (86 C), shutting down.


    I can find somewhere, the old measures of temperature?


    Thank you :)

  • First of all, I am not a Linux/Unix expert, I am just noob at these :)
    I believe that the OMV does not shut down your system. I do not believe there is such an option at the GUI. I believe the shutdown temperature is configured at the BIOS, so search there. What we get from the above setup is only some graphs from the sensors that already exists at the systems and nothing more. I believe they are reliable since the system does not have other sensors to measure the temperatures. Maybe, when you download with Sabnzbd you get a temp peak and this is what causes the shutdown. Also, 73C is a bit high for average, i believe.

  • I think it's OMV that shutdown my PC , for two reason :
    - the messages are from OMV
    - I find them in the syslog.


    But I resolved the problem with new thermal paste on the Atom :D


    Thank you for this "How To" . It works great !!!
    :)

  • Thanks for a great walk through instruction, I have now included tabs for system temperature and fan speed into my OMV GUI.


    Since I am not so experienced in this field I have two questions:
    1. Has anyone managed to get also HDD temps into the temperature graphs? If so, can you please give some hints how to do it?
    2. Monitoring of the computer case fan RPM has a very strange behavior. At random times it shows spikes of 20.000-40.000 rpm instead of the ~900 rpm which it actually operates at. Any clues what the problem could be, is it necessarily a problem of the fan or could it be something else?


    Thankful for any and and all help.

  • After some searching I found a method to include the hdd temperatures which is similar to what has already been described here. I don't know if it is the best or the easiest solution but I have tried it out myself and it has been running successfully for a few hours now. Thought it might be interesting to others as well... (I'm writing from memory so there might be some minor errors in here, but I hope nothing major...)


    Step by Step


    1. In addition to installing lm-sensors it requires hddtemp which is a debian package that can be installed easily:


    Code
    apt-get install hddtemp


    During installation you will be prompted if hddtemp should start automatically at reboot which probably is what you want. You will also be asked something about what clients (IP's) that should be allowed to connect to hddtemp. This should be 127.0.0.1 (localhost).


    2. To find out what your rrd files for hdd temperature are called you can do similarly as you might have done after installing lm-sensors:
    Edit /etc/collectd/collectd.conf and add the following lines:

    Code
    LoadPlugin hddtemp
    <Plugin "hddtemp">
      Host "127.0.0.1"
      Port "7634"
      TranslateDevicename true
    </Plugin>


    (To be honest I think you can leave out everything but

    Code
    LoadPlugin hddtemp

    if you like.)


    After this do

    Code
    /etc/init.d/collectd restart


    and then look for the rrd filenames

    Code
    ls /var/lib/collectd/rrd/localhost/hddtemp


    3. Now you should edit the lines in your collectd script file which you might have called /usr/share/openmediavault/scripts/collectd.d/sensors if you have followed first instruction in this thread (mine is /usr/share/openmediavault/scripts/collectd.d/systemp since I have separate files for recording the temperatures and fan speeds).


    4. When this is done you need to run

    Code
    /usr/share/openmediavault/scripts/collectd

    and then reload the web GUI for you changes to appear...


    ---------------------------------------


    For clarity I will also attach the contents of my files /var/www/openmediavault/js/omv/module/admin/Sensors.js and /usr/share/openmediavault/scripts/collectd.d/systemp.


    /var/www/openmediavault/js/omv/module/admin/Sensors.js:



    /usr/share/openmediavault/scripts/collectd.d/systemp:


    Comments, questions, suggestions or improvements are more than welcome.

  • Hello. I was trying to setup temperature monitoring using the first post here but I get this error:


    Code
    /usr/share/openmediavault/scripts/collectd.d/sensors: line 70: warning: here-document at line 11 delimited by end-of-file (wanted `EOF')


    Any help with this would be appreciated. Here is the contents of my sensors file:


  • [quote="logan_fre"]Hello. I was trying to setup temperature monitoring using the first post here but I get this error:


    Code
    /usr/share/openmediavault/scripts/collectd.d/sensors: line 70: warning: here-document at line 11 delimited by end-of-file (wanted `EOF')


    Check if you have any Space after the last EOF.

  • Zitat von "johny_sketo"


    Check if you have any Space after the last EOF.


    Thanks for this. I tried that but it didn't make any difference. After trying different things, I found that it was because there was a TAB before the EOF. Now I don't get an error, but there are no graphs. I'm not sure it is worth it to keep fooling around with it. I noticed that under the S.M.A.R.T section you can see the drive temps so that will probably be enough for me.

  • Zitat von "logan_fre"


    Thanks for this. I tried that but it didn't make any difference. After trying different things, I found that it was because there was a TAB before the EOF. Now I don't get an error, but there are no graphs. I'm not sure it is worth it to keep fooling around with it. I noticed that under the S.M.A.R.T section you can see the drive temps so that will probably be enough for me.


    Can you check what do you see inside the following folder

    Code
    /var/lib/collectd/rrd/localhost


    What mainboard do you use?

  • Zitat von "johny_sketo"


    Can you check what do you see inside the following folder

    Code
    /var/lib/collectd/rrd/localhost


    What mainboard do you use?


    I have : cpu-0 cpu-1 df hddtemp interface load memory sensors-k10temp-pci-00c3


    Also hddtemp contains: temperature-8-16.rrd temperature-8-48.rrd temperature-8-80.rrd temperature-8-32.rrd temperature-8-64.rrd
    And sensors-k10-pci-00c3 contains: temperature-temp1.rrd


    My motherboard is a Jetway G03-HZ03-F.



    I should also point out that while troubleshooting the first error I redid my sensors file to include my hard drives. I based it on Jay-Jay's example above. Here is the current version:


    Here is my sensors.js file:

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!