SysMon plugin

Thanks for the great plugin. It really helps to know how much loading I am inflicting on poor Vera.

I noticed in my log though, during restart, Vera is unable to find S_SysMon.xml.

02 02/22/13 13:19:37.174 ctrl_chr[33;1mJobHandler_LuaUPnP::m_sMissingFile_set /etc/cmh-lu//S_SysMon.xmlctrl_chr[0m <0x2ace9000> 01 02/22/13 13:19:37.174 ctrl_chr[31;1mDevice_LuaUPnP::CreateService can't load /etc/cmh-lu//S_SysMon.xml for 78/System Monitorctrl_chr[0m <0x2ace9000> 01 02/22/13 13:19:37.174 ctrl_chr[31;1mDevice_LuaUPnP::CreateServices removing incomplete service from 78ctrl_chr[0m <0x2ace9000>

I agree with her: I can’t find it either! It doesn’t seem to be included with any of the SysMon releases on apps.mios.com. Where did it go?

Hmmm - interesting :-[

It seems it’s not included on apps.mios.com - I must have forgotten to include it in the package. Big ooops! This may also explain why @chixxi had problems with notifications…

I’ll upload it shortly and process it for approval (it’s interesting that the “approval” process by MCV didn’t pick up on this!). Sorry for the hassle…

Cheers
Chris

Hi Chris

Note also the double forward slash that’s been commented on previously.

I assume that this is a Vera logging issue, and nothing to do with the plugin. There’s no way for me to set this - in apps, there’s no directory set, so I think this is just the way MCV have logged the error…

Chris

@Chris,
Under certain situations, Vera will force a reboot (Linux-level). When it does this, it records an epoch-style timestamp in:
[tt]/etc/cmh/last_reboot[/tt]

Could you capture this in your tool, and convert it to a human-readable format for display?

“Beta” releases like 1.5.532, 1.5.622 (etc) are force rebooting Vera 2x times per day, so having this more readily exposed (in a readable format) would let people know when it’s occurring to them, since it might otherwise go unnoticed (or look like Vera is not responding)

It’ll be similar to the uptime data, except these ones are explicitly caused by bugs in Vera’s [tt]NetworkMonitor[/tt] process vs user-initiated reboots and/or hardware faults.

[quote=“guessed, post:45, topic:174131”]Under certain situations, Vera will force a reboot (Linux-level). When it does this, it records an epoch-style timestamp in:
[tt]/etc/cmh/last_reboot[/tt]

Could you capture this in your tool, and convert it to a human-readable format for display?[/quote]
Yep - that’s no problem. Is the time in this file the time that Vera last forced a reboot, or is it the last restart time (the difference being if it is just the last time Linux started, or it was restarted by MiOS)? Currently I have a flag in SysMon which gets raised when Vera restarts - this is flagged by looking at uptime going backwards. It might be interesting to compare these…

Anyway, I’ll add this into SysMon, and I might also add some variables for the other restart times in human readable form…

Cheers
Chris

It’s when Vera itself last forced a [OS-level] [tt]reboot[/tt]. There are other files that represent when restarts (and other events) occur, but this one is for reboots.

Basically the [tt]NetworkMonitor[/tt] process has various checks-n-balances that, if not met, will trigger it to do a “[tt]reboot -f[/tt]” operation.

For example, if it calls upon [tt]lighttpd[/tt] to deliver a “[tt]lu_alive[/tt]” call, and it fails a number of times, then it tries to do the same directly on [tt]LuaUPnP:49451[/tt]. If that fails a few times, then NetworkMonitor will reboot OpenWRT… classy 8) )

Before it does this, it appears to write [tt]/etc/cmh/last_reboot[/tt].

Thanks for the explanation. I’ll add a check for this file when SysMon restarts and put it into variables both as the unix timestamp and human readable form…

Cheers
Chris

thank you for your work Chris.
i use the plugin for a while now and it is running stable for me. it survived upgrade to dash 622 also. still working fine.
readable form of timestamps would be very appreciated.
perhaps it is possible to update the device icon according to cpu-load ? there is a status setup for the icon in device template.
and maybe this http://wiki.micasaverde.com/index.php/ZWave_Status so it gives a status for the z-wave and perhaps zigbee/usb/etc
amount of space on usb drive would be nice too. link to logfile and z-wave output.

[quote=“Da_JoJo, post:49, topic:174131”]perhaps it is possible to update the device icon according to cpu-load ? there is a status setup for the icon in device template.
and maybe this http://wiki.micasaverde.com/index.php/ZWave_Status so it gives a status for the z-wave and perhaps zigbee/usb/etc
amount of space on usb drive would be nice too. link to logfile and z-wave output.[/quote]
I’ll have a think about the custom icons - they would be nice, but they aren’t really well supported by UI5 in that when you use the system remotely, they aren’t available unless you serve them up remotely…

Unfortunately the information on z wave status doesn’t seem to work - I guess it’s for an old version of MiOS… I’m happy to add move system data into SysMon if we can find things to look at - and human readable times will be in the next release (I’ll put it on apps tonight).

Cheers
Chris

[quote=“Chris, post:50, topic:174131”]I’ll have a think about the custom icons - they would be nice, but they aren’t really well supported by UI5 in that when you use the system remotely, they aren’t available unless you serve them up remotely…

Unfortunately the information on z wave status doesn’t seem to work - I guess it’s for an old version of MiOS… I’m happy to add move system data into SysMon if we can find things to look at - and human readable times will be in the next release (I’ll put it on apps tonight).

Cheers
Chris[/quote]
hmm i didnt know that remotely they are not available… possibly coz they use a serverhosted version which does the talking to vera. maybe this can be sorted out with MCV.
im sorry for the confusion with z-wave i was under presumation it still worked. theres no need to output status messages on the plugin, this would slow down vera a lot, but it would be nice to have a sort of status icon for z-wave and other networks up. ill have a look if i can find something more updated.
edit: for the icon > not so nice but you can host it on the wiki of micasaverde and link to it. just put it in ur plugin docuspace there lol
http://wiki.micasaverde.com/index.php/Notification_Tech_Info
http://wiki.micasaverde.com/index.php/Luup_plugin_icons

Yes, exactly, MSC serve up all the content from their servers, so any changes you make to standard files etc on your Vera won’t work remotely…

No problem. A lot of the MSC doc is very old. I’m more than happy to add any useful parameters to SysMon - it’s nice to know what Vera is doing :wink:

[quote=“Da_JoJo, post:51, topic:174131”]edit: for the icon > not so nice but you can host it on the wiki of micasaverde and link to it. just put it in ur plugin docuspace there lol
http://wiki.micasaverde.com/index.php/Notification_Tech_Info
http://wiki.micasaverde.com/index.php/Luup_plugin_icons[/quote]
I’m not a huge fan of this, but it may be the only way. I would have preferred MCV to work out a way to do this “properly” so that it came off the local Vera - personally, I have a poor internet connection, so relying on external content can be a bit “variable”. However, the chance of MSV doing anything is low… :frowning:

Cheers
Chris

I see MCV have approved V0.4 of the plugin. This includes human readable times for the last reboot (etc) as well as unix times (for logging), and the addition of the last_reboot requested by @guessed.

Chris

mm lemme see what i can do.
the poor internet should not be a problem since it loads icon in background and possibly it can be disabled.
Docs are a bit scattered all over the place indeed. i tried uncluttering it but i got overwelmed by the huge amount of different docs belonging to different vera types.
terrribly confusing and it dramaticly slows down developing.
thnx for the update :slight_smile:

Sure - at the end of the day an icon not loading isn’t a major problem. However, I don’t like to rely on something that doesn’t work some of the time, or works differently for different people… The best thing would be for this to be handled properly by MCV, but… ::slight_smile:

:slight_smile:

Cheers
Chris

Sure - at the end of the day an icon not loading isn’t a major problem. However, I don’t like to rely on something that doesn’t work some of the time, or works differently for different people… The best thing would be for this to be handled properly by MCV, but… ::slight_smile:

:slight_smile:

Cheers
Chris[/quote]
and so it is, but that needs time i guess. you might wanna try send a official question to this to support@micasaverde.com or raise a ticket so they are aware of it.
on the other hand i presume it is security-wise that this has not been implented. since it requires cross-site and a non ssl pipe.
however… seen on samsung plugin you can put the complete http string in the plugin to get the icon from another host.

No - it doesn’t require cross site support - this is the whole point. Currently, custom icons are only copied to your Vera when you install a plugin/device. When you access your Vera remotely, all this content is not served up - it comes from the mios servers. The only thing that is served from your vera is the configuration, custom js, and probably a few other bits and pieces - not the icons. So, either MCV needs to treat the icons in the same way as it does with custom js (etc), or they need to find a way to put them into their server so that it’s served from there like all the other content.
My preference is for it to be served from the users vera rather than the MCV servers as this is more configurable (users could then change the icons).

This brings us back to where we started - if the internet connection is down, then you don’t get icons even when accessing your vera locally. Maybe that’s not a big issue for most people as internet is pretty good most places. Unfortunately, in “rural” England, that’s not the case :frowning: (even though I’m only 30 miles or so from London, we regularly loose internet and also power >:().

Unfortunately (again) we’re trying to work around a “feature” in the MCV system. The remote access is just a bit too rigid when it comes to plugins, and it means we can’t quite do what we would like.

When I get a chance, I’ll have another think about this and may look at putting something in…

Cheers
Chris

mm its indeed a problem. i thought since the browser has the page on it, that it would go to the http page for the icon download. but you say it does not do that, i.e. cp.mios.com ignores this http request.
work around a feature is not really way to go. im sure micasaverde understands the problem and willing to help to come with a solution, since the’re working on newer firmware anyways it may now be the time.
i will put a hint in the 622 firmware thread so it will get noticed. might wanna do same. if anyone can think of some nice solution to this “problem” please chime in :slight_smile:

sorry… I can’t find this anywhere in the post. I’m sure this may seem silly for most of you… but can someone tell me how to decipher how to read the CPU Load number?

I thought it was percentage based, so 0.35 would be 35%, but then today I saw a 1.1 number…

THanks

@tomgru

These are Linux CPU load average numbers Please search for “Linux CPU Load Average” on the net and you will find several articles on the subject, too many to post here.