You definitely made a mistake. Please post the content of the script
Temperature Sensor
-
-
It should be 1:1 what the startpost said
Code
Alles anzeigenroot@moertelnas:~# cat /var/www/openmediavault/js/omv/module/admin/Sensors.js /** * Sensors plugin for system information. */ // require("js/omv/NavigationPanel.js") // require("js/omv/PluginMgr.js") // require("js/omv/data/DataProxy.js") // require("js/omv/data/Store.js") // require("js/omv/grid/TBarGridPanel.js") // require("js/omv/RrdGraphPanel.js") Ext.ns("OMV.Module.Diagnostics.SysInfo"); /** * @class OMV.Module.Diagnostics.SysInfo.Temperatures * @derived Ext.TabPanel */ OMV.Module.Diagnostics.SysInfo.Temperature = function(config) { var initialConfig = { title: "CPU temperature", rrdGraphName: "sensors" }; Ext.apply(initialConfig, config); OMV.Module.Diagnostics.SysInfo.Temperature.superclass.constructor.call( this, initialConfig); }; Ext.extend(OMV.Module.Diagnostics.SysInfo.Temperature, OMV.RrdGraphPanel, { }); OMV.preg("sysinfo", "system", OMV.Module.Diagnostics.SysInfo.Temperature);
Code
Alles anzeigenroot@moertelnas:~# cat /usr/share/openmediavault/scripts/collectd.d/sensors #!/bin/sh set -e . /etc/default/openmediavault . /usr/share/openmediavault/scripts/helper-functions OMV_COLLECTD_CONFIG=${OMV_COLLECTD_CONFIG:-"/etc/collectd/collectd.conf"} OMV_COLLECTD_RRDTOOL_MKGRAPH=${OMV_COLLECTD_RRDTOOL_MKGRAPH:-"/usr/sbin/omv-mkgraph"} cat <<EOF >> ${OMV_COLLECTD_CONFIG} LoadPlugin sensors EOF cat <<EOF >> ${OMV_COLLECTD_RRDTOOL_MKGRAPH} # Plugin: sensors TITLE_LOAD="CPU temperature" COLOR_CPU_PHYSICAL="#00cc00" # green COLOR_CPU_CORE_0="#0000fd" # blue COLOR_CPU_CORE_1="#ff0000" # red rrdtool graph \${IMGDIR}/sensors-hour.png --start \${HOURSTART} \${DEFAULTS} --title "\${TITLE_LOAD}\${HOURTITLE}" --slope-mode --upper-limit 80 --lower-limit 0 --units-exponent 0 \ DEF:cpupavg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:AVERAGE \ DEF:cpupmin=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MIN \ DEF:cpupmax=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MAX \ DEF:cpuc0avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:AVERAGE \ DEF:cpuc0min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MIN \ DEF:cpuc0max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MAX \ DEF:cpuc1avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:AVERAGE \ DEF:cpuc1min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MIN \ DEF:cpuc1max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MAX \ LINE1:cpupavg\${COLOR_CPU_PHYSICAL}:" CPU" \ GPRINT:cpupmin:MIN:"%4.2lf Min" \ GPRINT:cpupavg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpupmax:MAX:"%4.2lf Max" \ GPRINT:cpupavg:LAST:"%4.2lf Last\l" \ LINE1:cpuc0avg\${COLOR_CPU_CORE_0}:"Core 1" \ GPRINT:cpuc0min:MIN:"%4.2lf Min" \ GPRINT:cpuc0avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc0max:MAX:"%4.2lf Max" \ GPRINT:cpuc0avg:LAST:"%4.2lf Last\l" \ LINE1:cpuc1avg\${COLOR_CPU_CORE_1}:"Core 2" \ GPRINT:cpuc1min:MIN:"%4.2lf Min" \ GPRINT:cpuc1avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc1max:MAX:"%4.2lf Max" \ GPRINT:cpuc1avg:LAST:"%4.2lf Last\l" \ COMMENT:"\${LASTUPDATE}" >/dev/null rrdtool graph \${IMGDIR}/sensors-day.png --start \${DAYSTART} \${DEFAULTS} --title "\${TITLE_LOAD}\${DAYTITLE}" --slope-mode --upper-limit 80 --lower-limit 0 --units-exponent 0 \ DEF:cpupavg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:AVERAGE \ DEF:cpupmin=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MIN \ DEF:cpupmax=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MAX \ DEF:cpuc0avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:AVERAGE \ DEF:cpuc0min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MIN \ DEF:cpuc0max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MAX \ DEF:cpuc1avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:AVERAGE \ DEF:cpuc1min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MIN \ DEF:cpuc1max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MAX \ LINE1:cpupavg\${COLOR_CPU_PHYSICAL}:" CPU" \ GPRINT:cpupmin:MIN:"%4.2lf Min" \ GPRINT:cpupavg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpupmax:MAX:"%4.2lf Max" \ GPRINT:cpupavg:LAST:"%4.2lf Last\l" \ LINE1:cpuc0avg\${COLOR_CPU_CORE_0}:"Core 1" \ GPRINT:cpuc0min:MIN:"%4.2lf Min" \ GPRINT:cpuc0avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc0max:MAX:"%4.2lf Max" \ GPRINT:cpuc0avg:LAST:"%4.2lf Last\l" \ LINE1:cpuc1avg\${COLOR_CPU_CORE_1}:"Core 2" \ GPRINT:cpuc1min:MIN:"%4.2lf Min" \ GPRINT:cpuc1avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc1max:MAX:"%4.2lf Max" \ GPRINT:cpuc1avg:LAST:"%4.2lf Last\l" \ COMMENT:"\${LASTUPDATE}" >/dev/null rrdtool graph \${IMGDIR}/sensors-week.png --start \${WEEKSTART} \${DEFAULTS} --title "\${TITLE_LOAD}\${WEEKTITLE}" --slope-mode --upper-limit 80 --lower-limit 0 --units-exponent 0 \ DEF:cpupavg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:AVERAGE \ DEF:cpupmin=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MIN \ DEF:cpupmax=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MAX \ DEF:cpuc0avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:AVERAGE \ DEF:cpuc0min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MIN \ DEF:cpuc0max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MAX \ DEF:cpuc1avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:AVERAGE \ DEF:cpuc1min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MIN \ DEF:cpuc1max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MAX \ LINE1:cpupavg\${COLOR_CPU_PHYSICAL}:" CPU" \ GPRINT:cpupmin:MIN:"%4.2lf Min" \ GPRINT:cpupavg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpupmax:MAX:"%4.2lf Max" \ GPRINT:cpupavg:LAST:"%4.2lf Last\l" \ LINE1:cpuc0avg\${COLOR_CPU_CORE_0}:"Core 1" \ GPRINT:cpuc0min:MIN:"%4.2lf Min" \ GPRINT:cpuc0avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc0max:MAX:"%4.2lf Max" \ GPRINT:cpuc0avg:LAST:"%4.2lf Last\l" \ LINE1:cpuc1avg\${COLOR_CPU_CORE_1}:"Core 2" \ GPRINT:cpuc1min:MIN:"%4.2lf Min" \ GPRINT:cpuc1avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc1max:MAX:"%4.2lf Max" \ GPRINT:cpuc1avg:LAST:"%4.2lf Last\l" \ COMMENT:"\${LASTUPDATE}" >/dev/null rrdtool graph \${IMGDIR}/sensors-month.png --start \${MONTHSTART} \${DEFAULTS} --title "\${TITLE_LOAD}\${MONTHTITLE}" --slope-mode --upper-limit 80 --lower-limit 0 --units-exponent 0 \ DEF:cpupavg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:AVERAGE \ DEF:cpupmin=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MIN \ DEF:cpupmax=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MAX \ DEF:cpuc0avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:AVERAGE \ DEF:cpuc0min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MIN \ DEF:cpuc0max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MAX \ DEF:cpuc1avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:AVERAGE \ DEF:cpuc1min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MIN \ DEF:cpuc1max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MAX \ LINE1:cpupavg\${COLOR_CPU_PHYSICAL}:" CPU" \ GPRINT:cpupmin:MIN:"%4.2lf Min" \ GPRINT:cpupavg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpupmax:MAX:"%4.2lf Max" \ GPRINT:cpupavg:LAST:"%4.2lf Last\l" \ LINE1:cpuc0avg\${COLOR_CPU_CORE_0}:"Core 1" \ GPRINT:cpuc0min:MIN:"%4.2lf Min" \ GPRINT:cpuc0avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc0max:MAX:"%4.2lf Max" \ GPRINT:cpuc0avg:LAST:"%4.2lf Last\l" \ LINE1:cpuc1avg\${COLOR_CPU_CORE_1}:"Core 2" \ GPRINT:cpuc1min:MIN:"%4.2lf Min" \ GPRINT:cpuc1avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc1max:MAX:"%4.2lf Max" \ GPRINT:cpuc1avg:LAST:"%4.2lf Last\l" \ COMMENT:"\${LASTUPDATE}" >/dev/null rrdtool graph \${IMGDIR}/sensors-year.png --start \${YEARSTART} \${DEFAULTS} --title "\${TITLE_LOAD}\${YEARTITLE}" --slope-mode --upper-limit 80 --lower-limit 0 --units-exponent 0 \ DEF:cpupavg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:AVERAGE \ DEF:cpupmin=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MIN \ DEF:cpupmax=\${DATA}/sensors-coretemp-isa-0000/temperature-temp1.rrd:value:MAX \ DEF:cpuc0avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:AVERAGE \ DEF:cpuc0min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MIN \ DEF:cpuc0max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp2.rrd:value:MAX \ DEF:cpuc1avg=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:AVERAGE \ DEF:cpuc1min=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MIN \ DEF:cpuc1max=\${DATA}/sensors-coretemp-isa-0000/temperature-temp3.rrd:value:MAX \ LINE1:cpupavg\${COLOR_CPU_PHYSICAL}:" CPU" \ GPRINT:cpupmin:MIN:"%4.2lf Min" \ GPRINT:cpupavg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpupmax:MAX:"%4.2lf Max" \ GPRINT:cpupavg:LAST:"%4.2lf Last\l" \ LINE1:cpuc0avg\${COLOR_CPU_CORE_0}:"Core 1" \ GPRINT:cpuc0min:MIN:"%4.2lf Min" \ GPRINT:cpuc0avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc0max:MAX:"%4.2lf Max" \ GPRINT:cpuc0avg:LAST:"%4.2lf Last\l" \ LINE1:cpuc1avg\${COLOR_CPU_CORE_1}:"Core 2" \ GPRINT:cpuc1min:MIN:"%4.2lf Min" \ GPRINT:cpuc1avg:AVERAGE:"%4.2lf Avg" \ GPRINT:cpuc1max:MAX:"%4.2lf Max" \ GPRINT:cpuc1avg:LAST:"%4.2lf Last\l" \ COMMENT:"\${LASTUPDATE}" >/dev/null EOF
Maybe the problem is that i created the files on windows? I set the format to LF but maybe the "newline" at the end of each file isn't the same as a unix newline? could that cause a problem?Edit: Yes it was the format... i don't know which part ... i guess some of the spaces in the header part of sensors... works now thanks
-
Hi,
First thank you for the effort and scripts I used it on my old OMV 0.4
I have a question, Does this work on OMV 0.5 ?
It goes like this:
- I freshly installed OMV 0.5 and plugins
- Installed lmsensors and its working okay
- used your master.zip , ran ./install-remove.sh , with omv-sensor.conf configured it and script ran okay, BUT, the omv GUI wont come up after!
error saying:exception 'Exception' with message 'Failed to open file js/omv/NavigationPanel.js.' in /usr/share/php/openmediavault/htmlpage.inc:42
(and i cant find NavigationPanel.js anywhere)
Any hints?
thanks!
Mahmoud -
omv 0.5 is completely different. solo said he was going to work on a new version but it will be November before he is done.
-
Oh, there goes 2 hours of trying to make it work down the drain
thanks for the quick reply my brother
cheers! -
OMV 0.5 How To:
Hi guys,
I wasted 2 hours trying to make this work with no luck, but I managed to fix by modifying 2 files to make it run on OMV 0.5
So here goes:
- install lm-sensors and configure it (so the command 'sensors' will show you the needed temperatures)
- run the script within the master.zip by Solo0815 and follow the instructions.When done: The GUI will NOT WORK, but no worries.
I modified some stuff to make it work for 0.5,
all you have to do is to copy the file in the tar to following location in to your omv machine:/var/www/openmediavault/js/omv/module/admin/diagnostic/system/plugin/Temperatures.js
/usr/share/openmediavault/mkconf/collectd.d/sensorsand run
As you see in the attached jpg it now works for me :geek:
Thank you Solo0815 and Volker for the files that I could copy n paste from
cheers!
Mahmoud***EDIT: if the omv GUI fails again (and it will), just run this:
delete /var/www/openmediavault/js/omv/module/admin/diagnostic/system/plugin/Sensors.js
something (cron?) is copying the old file to the old location.
And apologies for this dirty no-tests fix :roll: I'll try to free some time and make a proper fix. cheers. -
I recently update my system from 0.4 to 0.5.21. I had temperatures graphs at my status page. I followed your guidelines but without any luck. I can login OMV but at temperatures tab, under status I get no graphs.
Is it possible to point me the files I need to edit in order to get my graphs working again? Thank you in advanced -
anyone?
-
Solo wasn't that active the last few weeks so it might be some time before he gets time for the new plugin.
I don't know about the graphs, either.
Greetings
David -
I managed to fix it. The problems were at the configuration files (I did not configure correctly the path for my rrd files) and I had to remove the sensors.js file as Mahmoud said, but it was at another folder. I found it inside
. Now it is working again!
-
I saw some strange things after some hours. I lost my graphs again. When I manually ran
and after that
and
I lost again GUI, I searched my files deleted again the sensors.js and restore my GUI and graphs again.
I now this is not stable. Can anyone help? -
I fork'd Solo0815's script and spent the weekend making an updated version that includes Mahmoud's update as well getting HDDTemps to work. I've issued a pull request to merge the results back to Solo0815's work, but in the meantime you can download script at: https://github.com/fergbrain/omvsensors/archive/master.zip
Note: this is designed for OMV 0.5...do not try to use this on OMV 0.4. Also, wasn't able to checkout the fanspeed settings, so if they don't work let me know.
Instructions are in the README.md file, which you can also view: https://github.com/fergbrain/omvsensors
-
The new script works fine, thanks fergbrain.
Since I made multiple trials to install and uninstall to get it running,I now ended up with two temperature tabs. Can anyone guide me on how to remove one of them? Thanks.
-
-
Thanks for feedback (patrick168 and johny_sketo), I've updated the README file with your suggestion.
-
is there any way to implement this using ipmi-sensors ? i cannot get my BMC data using sensors (including using version 3.3.4) but i can using ipmi-sensors as below.
ipmi-sensors
7936: Watchdog (Watchdog 2): [OK]
22599: CPU_THEMAL (Temperature): 48.00 C (NA/110.00): [OK]
22619: NB_THERMAL (Temperature): 46.00 C (NA/105.00): [OK]
22593: SEL Rate (Other Fru): 0.00 msgs (NA/90.00): [OK]
22620: AMBIENT_THERMAL (Temperature): 28.00 C (NA/45.00): [OK]
22617: EvtLogDisabled (Event Logging Disabled): [OK]
22618: System Event (System Event): [OK]
22608: SYS_FAN (Fan): 1200.00 RPM (0.00/NA): [OK]
22621: CPU Thermtrip (Processor): [Unknown]
1536: Sys Pwr Monitor (Power Unit): [OK] -
deejc,
I have an HP Microserver N54L, but I don't have the Remote Access Card, so I can't develop that functionality. If you could get me a RAC, I'd be happy to see what I could do to implement that functionality.
-
i got mine from http://www.lambda-tek.com/6150…MICROSERVER-IN~cs/B508065 for £59, i don't have the funds to purchase another so i can't help, sorry.
i'l live without it. -
After the laste update of OMV to 5.25 I lost my temperatures graphs again. I could see the tab but no images inside. I used the script to remove all the files and download the new script. I ran it again, edit the configuration file and now I have two tabs with the same name and my temperature graphs inside I search all the files I knew and could not find the error. Can somebody help me in order to remove the one tab? In which files we can find the tabs?
-
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!