[Sensors] OMV-Sensors in OMV 4.1.x

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Sorry this is taking so long to port over to OMV4 but my time on this is very limited and there is a heck of a lot of code that needs to be converted.

      So far I have a working plugin for CPU temps only. I still need to figure out how to add the extra sub panels, the code (below) was working for OMV3 but I just can't figure out why it is not working under OMV4. I don't want to move on to the other sensors until I have gotten the sub tabs working.

      Source Code

      1. Ext.define("OMV.module.admin.diagnostic.system.plugin.Sensors", {
      2. extend: "OMV.workspace.panel.RrdGraph",
      3. alias: "omv.plugin.diagnostic.system.sensors",
      4. title: _("OMV Sensors"),
      5. initComponent: function() {
      6. var me = this;
      7. me.callParent(arguments);
      8. me.add(Ext.create("OMV.workspace.panel.RrdGraph", {
      9. title: "MotherBoard Temp",
      10. rrdGraphName: "mb"
      11. }));
      12. }
      13. });
      Display All
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • Oh I didn't realize that you were working on this as well. If you haven't found this on your own by now, have a look at /usr/share/openmediavault/mkrrdgraph/plugins.d. It appears that graphs are now handled by Python scripts stored in this directory. I believe I also have some commits that I can submit pull requests to you for to help out.
    • I have uploaded what i have so far to git hub, like I said its working but only for cpu. Its using the new python method to get the graphs but needs the sub tabs sorted out.
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • David B wrote:

      Are you sure you've pushed everything? I don't see an mkrrdgraph folder in the repo.
      I don't use a mkrrdgraph folder, just checked your github and can't see it there either? What do you use it for?

      Sorry I just got what I think you mean.
      I generate /usr/share/openmediavault/mkrrdgraph/plugins.d/sensors.py using the script depending what options are set on the plugin page.
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • jhmiller wrote:

      David B wrote:

      Are you sure you've pushed everything? I don't see an mkrrdgraph folder in the repo.
      I don't use a mkrrdgraph folder, just checked your github and can't see it there either? What do you use it for?
      Sorry I just got what I think you mean.
      I generate /usr/share/openmediavault/mkrrdgraph/plugins.d/sensors.py using the script depending what options are set on the plugin page.
      Oh! Okay I understand what you mean now. I will have a look at how to get the tabs working right now. For now, all I've managed to do is fix the uninstall script and replace the plugin icon with what I think is a better one. I realize that those are not really high priority compared to other stuff, but I wanted to get them out of the way. By the way I have a pull request open with all of the changes I am trying to make. My repo does not have a mkrrdgraph file because I didn't get that far, but it looks like thanks to you, I will not have to.

      Change of plans: Instead of trying to get tabs working, I am going to look at fixing a problem with the settings page when you try to apply changes.

      Source Code

      1. Error #0:
      2. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-mkconf sensors balls 2>&1' with exit code '1': Traceback (most recent call last):
      3. File "/usr/sbin/omv-mkconf", line 82, in <module>
      4. sys.exit(main())
      5. File "/usr/sbin/omv-mkconf", line 78, in main
      6. rc = execute_script()
      7. File "/usr/sbin/omv-mkconf", line 55, in execute_script
      8. os.execv(path, [ path ] + __args.args)
      9. OSError: [Errno 8] Exec format error in /usr/share/php/openmediavault/system/process.inc:175
      10. Stack trace:
      11. #0 /usr/share/openmediavault/engined/module/sensors.inc(33): OMV\System\Process->execute()
      12. #1 /usr/share/openmediavault/engined/rpc/config.inc(168): OMVModuleSensors->applyConfig()
      13. #2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      14. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      15. #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      16. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusog...', '/tmp/bgoutputk4...')
      17. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      18. #7 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      19. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      20. #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      21. #10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      22. #11 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      23. #12 {main}
      Display All
    • I will look later, does that error happen on my branch? I have place holder on the sensors script at the top that I keep there to remind me of places files go, it will cause the script to fail if not removed.
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • jhmiller wrote:

      I will look later, does that error happen on my branch? I have place holder on the sensors script at the top that I keep there to remind me of places files go, it will cause the script to fail if not removed.
      Oh. And here I was combing through the mkconf file trying to find a problem in the code. It seems that removing the file listing does indeed stop that error from occurring when trying to change settings, but a new one occurs. It looks like somewhere in the code, mkgraph is still being used instead of mkrrdgraph.

      Update: Found it! I thought all of the instances of mkgraph were changed in mkconf, but I found that they weren't.

      Source Code

      1. Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-mkconf sensors balls 2>&1' with exit code '2': sed: can't read /usr/sbin/omv-mkgraph: No such file or directory
      2. Error #0:
      3. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-mkconf sensors balls 2>&1' with exit code '2': sed: can't read /usr/sbin/omv-mkgraph: No such file or directory in /usr/share/php/openmediavault/system/process.inc:175
      4. Stack trace:
      5. #0 /usr/share/openmediavault/engined/module/sensors.inc(33): OMV\System\Process->execute()
      6. #1 /usr/share/openmediavault/engined/rpc/config.inc(168): OMVModuleSensors->applyConfig()
      7. #2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      8. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      9. #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      10. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(565): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusCS...', '/tmp/bgoutputVN...')
      11. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All
    • I do not get any errors on my end, I can enable cpu, cpu and cores and add motherboard temps on same graph. All working with no errors.

      I just uploaded eveything I have so far, so you or anyone else can check it out and see what they can come up with.
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • gderf wrote:

      Can you provide a link to your package?
      github.com/OpenMediaVault-Plug…rs/openmediavault-sensors

      It is only on github, no deb package as yet due to the issues I have mentioned above.
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • jhmiller wrote:

      gderf wrote:

      Can you provide a link to your package?
      github.com/OpenMediaVault-Plug…rs/openmediavault-sensors
      It is only on github, no deb package as yet due to the issues I have mentioned above.
      Perhaps I should just upgrade my OMV machine already and install the plugin so that data is being collected even if it is not displaying properly yet.

      How do you build your deb files by the way? Do you use the openmediavault.mk file for that? If so, then how?
    • David B wrote:

      How do you build your deb files
      I use the openmediavault-developer plugin, very easy to build and install packages.
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • jhmiller wrote:

      github.com/OpenMediaVault-Plug…rs/openmediavault-sensors
      It is only on github, no deb package as yet due to the issues I have mentioned above.
      can you let me know, how I could try this new version when already having uninstalled the old one? Just install it again as mentioned earlier in this thread?
      Or does the binaries from GitHub need to be copied to the respective places in OMV?

      Thanks!

      The post was edited 3 times, last by 1337iceskater ().

    • David B wrote:

      Is it in the OMV-Extras repository? I cannot find it.
      It is in the beta repo. This plugin is very dangerous if you used incorrectly. You can download the plugin and install manually from bintray.
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.8
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • Hi !

      Good work both...

      From what I have seen, it's probably better and more flexible to imagine a way to get the sensors name by the lm-sensors directories generated, and store it somewhere in a conf file than to hard code all the possible chipset.

      Source Code

      1. # for i in `ls -d /var/lib/rrdcached/db/localhost/sensors-*`; do basename $i; done
      2. sensors-coretemp-isa-0000
      3. sensors-it8718-isa-0290

      Same for the number of core. Maybe have something more dynamic like:

      Source Code

      1. root@home-server:/var/lib/collectd/rrd/home-server# ls -d | grep cpu
      2. cpu-0
      3. cpu-1
      4. root@home-server:/var/lib/collectd/rrd/home-server# ls | grep cpu| wc -l
      5. 2

      Just my 2 cts ;)
      Lian Li PC-V354 with Be Quiet fans | Gigabyte GA-G33M-DS2R | Intel E8400@3,6Ghz | 6GB DDR2 RAM
      1x500MB SSD for System/Backup | 7x2To HDD with ZFS RAIDz2 for Datas/Snapshots
      Powered by OMV v4.1.7 / Kernel 4.16.x / ZFS 0.7.9

      The post was edited 1 time, last by sbocquet ().

    • ryecoaaron wrote:

      David B wrote:

      Is it in the OMV-Extras repository? I cannot find it.
      It is in the beta repo. This plugin is very dangerous if you used incorrectly. You can download the plugin and install manually from bintray.
      Haha yeah I learned that the hard way. I found it on GitHub, built it, and installed it last night, and while arbitrarily clicking on buttons to figure out what they do, I accidentally upgraded to OMV 5. Fortunately I was working in a VM which I'd just taken a snapshot of so it was no big deal.

      sbocquet wrote:

      Hi !

      Good work both...

      From what I have seen, it's probably better and more flexible to imagine a way to get the sensors name by the lm-sensors directories generated, and store it somewhere in a conf file than to hard code all the possible chipset.
      Same for the number of core. Maybe have something more dynamic like:

      Source Code

      1. root@home-server:/var/lib/collectd/rrd/home-server# ls | grep cpu
      2. cpu-0
      3. cpu-1
      4. root@home-server:/var/lib/collectd/rrd/home-server# ls | grep cpu| wc -l
      5. 2
      Just my 2 cts ;)
      Thank you, but the credit definitely goes to @jhmiller. Everything that I've tried to contribute has been fairly useless so far because I do not entirely know what I am doing. I am still willing to play around with this though, so thank you for the advice.
    • sbocquet wrote:

      From what I have seen, it's probably better and more flexible to imagine a way to get the sensors name by the lm-sensors directories generated, and store it somewhere in a conf file than to hard code all the possible chipset.
      Yes and no. There are a lot of sensors and not all are of any use on some systems, the script is done in a way that it checks for the common ones first and also where multiple sensors on kown systems it has an order to pick the most likely sensor. I was planning on adding something along those line as a fail safe if the script did not find ANY sensors.


      I have now found the issue with the tabs not showing up and it has been fixed but this has led on to another problem :(

      I can now display graphs for everything except system fans, It will show system fans if combined with the cpu fan but will not show it on its own graph(errors when applying.)
      [IMG:http://widgets.trakt.tv/users/1f5d0f5ed67f98ed9d06d9849b42dd0e/watched/banner@1x.jpg]
      What I am watching/watched on my Popcorn Hour media player
      omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
      MySQL (Percona) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS
    • jhmiller wrote:

      I have now found the issue with the tabs not showing up and it has been fixed but this has led on to another problem :(

      I can now display graphs for everything except system fans, It will show system fans if combined with the cpu fan but will not show it on its own graph(errors when applying.)
      What's the problem? I know I haven't been much help so far, but perhaps I can try to solve it?