A wish - CPU monitoring… / 2.0-RC3 i386 Jun 22



  • Hi,
    Under diagnostics there is a smart little helper the SMART status option.
    I wish somehow a similar smart little helper could be added to pfsense for CPU monitoring e.g. show temp, show fan speeds, perhaps even regulate fans.
    CPU utilization is there, so it would so nice if this could be part of the gui, please please anyone add code for this :) :) :) 
    Cheers Steen


  • Rebel Alliance Developer Netgate

    There is a package (though I don't think it's on 2.0) for phpsysinfo which can get some of that.

    The problem is that the fan speed, temperature, etc, are much harder to get ahold of from the hardware than other bits. S.M.A.R.T. is a fairly well-followed standard so that was easy, but hardware/temperature monitoring is a minefield of incompatible implementations and bad information…


  • Netgate Administrator

    As I recall phpsysinfo relies on mbmon. You can add that from the console:

    pkg_add -r mbmon
    

    Then run it to see if it supports your hardware.
    Unfortunately it's quite old so newer hardware may not work.

    Steve



  • @jimp:

    There is a package (though I don't think it's on 2.0) for phpsysinfo which can get some of that.

    The problem is that the fan speed, temperature, etc, are much harder to get ahold of from the hardware than other bits. S.M.A.R.T. is a fairly well-followed standard so that was easy, but hardware/temperature monitoring is a minefield of incompatible implementations and bad information…

    Hi Stephen,
    Is PHPsysinfo same as PHPService? As if then PHPService is not yet for 2.0… :(
    Thanks Steen

    Hi Jim,
    Yes perhaps to ask for fans speed, etc. is too much, just the temp would have been super ;)
    Thanks - Steen


  • Netgate Administrator

    phpsysinfo is a php script that displays information about the machine it's running on, including temperature and fan speed.
    Somebody put it into a pfSense package but it looks like it includes a precompiled version of mbmon which was compiled for pfSense 1.2.x.
    I would think it would be relatively trivial to use the FreeBSD 8.1 repo instead. Some coding required.

    Steve



  • @stephenw10:

    phpsysinfo is a php script that displays information about the machine it's running on, including temperature and fan speed.
    Somebody put it into a pfSense package but it looks like it includes a precompiled version of mbmon which was compiled for pfSense 1.2.x.
    I would think it would be relatively trivial to use the FreeBSD 8.1 repo instead. Some coding required.

    Steve

    Hi Steve - thanks.
    Maybe one day when 2.0 is finally official then someone will compile for 2.0 :)
    Thanks and take care - Steen


  • Rebel Alliance Developer Netgate

    If you have a supported chip, ACPI may be giving you that info already, try this:

    $ sysctl hw.acpi.thermal
    hw.acpi.thermal.tz0.temperature: 35.5C
    hw.acpi.thermal.tz0.active: -1
    hw.acpi.thermal.tz0.passive_cooling: 1
    hw.acpi.thermal.tz0.thermal_flags: 0
    hw.acpi.thermal.tz0._PSV: 70.0C
    hw.acpi.thermal.tz0._HOT: -1
    hw.acpi.thermal.tz0._CRT: 100.0C
    hw.acpi.thermal.tz0._ACx: 70.0C -1 -1 -1 -1 -1 -1 -1 -1 -1
    hw.acpi.thermal.tz0._TC1: 4
    hw.acpi.thermal.tz0._TC2: 3
    hw.acpi.thermal.tz0._TSP: 60
    

    If you have a modern AMD or Intel chip, the amdtemp/coretemp modules help, but we don't build them on pfSense (grab them from a FreeBSD 8.1 install).

    # kldload coretemp
    # sysctl -a | grep temperature
    dev.cpu.0.temperature: 84.0C
    dev.cpu.1.temperature: 84.0C
    dev.cpu.2.temperature: 84.0C
    dev.cpu.3.temperature: 88.0C
    

  • Rebel Alliance Developer Netgate

    It shouldn't be too hard for someone to write a widget for the dashboard to handle the ACPI thermal stuff if it's supported on their hardware. I have had it on my to-do list for probably two years now but haven't found the time and inclination to make it. :-)



  • @jimp:

    If you have a supported chip, ACPI may be giving you that info already, try this:

    $ sysctl hw.acpi.thermal
    hw.acpi.thermal.tz0.temperature: 35.5C
    hw.acpi.thermal.tz0.active: -1
    hw.acpi.thermal.tz0.passive_cooling: 1
    hw.acpi.thermal.tz0.thermal_flags: 0
    hw.acpi.thermal.tz0._PSV: 70.0C
    hw.acpi.thermal.tz0._HOT: -1
    hw.acpi.thermal.tz0._CRT: 100.0C
    hw.acpi.thermal.tz0._ACx: 70.0C -1 -1 -1 -1 -1 -1 -1 -1 -1
    hw.acpi.thermal.tz0._TC1: 4
    hw.acpi.thermal.tz0._TC2: 3
    hw.acpi.thermal.tz0._TSP: 60
    

    If you have a modern AMD or Intel chip, the amdtemp/coretemp modules help, but we don't build them on pfSense (grab them from a FreeBSD 8.1 install).

    # kldload coretemp
    # sysctl -a | grep temperature
    dev.cpu.0.temperature: 84.0C
    dev.cpu.1.temperature: 84.0C
    dev.cpu.2.temperature: 84.0C
    dev.cpu.3.temperature: 88.0C
    

    Hi Jim,
    THANKS for the hints.

    Tried the command > sysctl hw.acpi.therma
    But got the reply > sysctl: unknown oid 'hw.acpi.thermal'

    So I guess I am of to find coretemp from a FreeBSD 8.1 install

    I'll let you know if I had success.

    Steen



  • @jimp:

    It shouldn't be too hard for someone to write a widget for the dashboard to handle the ACPI thermal stuff if it's supported on their hardware. I have had it on my to-do list for probably two years now but haven't found the time and inclination to make it. :-)

    Oops I was not trying to be offensive, by indicating "…not too hard for someone"...!

    Cheers Steen


  • Netgate Administrator

    @jimp:

    dev.cpu.3.temperature: 88.0C

    88°C Toasty!


  • Rebel Alliance Developer Netgate

    @seh2000:

    @jimp:

    It shouldn't be too hard for someone to write a widget for the dashboard to handle the ACPI thermal stuff if it's supported on their hardware. I have had it on my to-do list for probably two years now but haven't found the time and inclination to make it. :-)

    Oops I was not trying to be offensive, by indicating "…not too hard for someone"...!

    Nothing offensive anywhere there, just saying that if someone had hardware that was supported by that method and knew some PHP coding it might be easy to write for someone who was interested in taking that on. It would certainly be more lightweight than a full-blown phpsysinfo package, and wouldn't require any extra software. Just a sysctl command and parsing the output.


Locked