Author Topic: Simple guide to scheduled reboot and reboot from phone app  (Read 1107 times)

Offline thief

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +3/-0
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #15 on: February 23, 2018, 02:05:13 pm »
Ok, so thats sorted out then.
I'll just stick to the: os.execute("ping -c 1 8.8.8.8 && reboot") and see how it acts.

Offline HSD99

  • Full Member
  • ***
  • Posts: 229
  • Karma: +6/-0
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #16 on: February 23, 2018, 02:41:40 pm »
That would flush a bunch of caches that are volatile, so they're being flushed by the reboot anyway. Flushing them may have some use if you're not rebooting, maybe reducing memory use temporarily, but these are well-managed caches and unless you're really strapped for RAM for some immediate purpose, flushing them is more likely to create a momentary negative impact on system performance.

This cache-flush came from another thread and was apparently recommended by Vera support, at least for one user. Cache management is part of the OS, and as @rigpapa points out, works well. I would not execute this command unless I had a specific situation where I knew it would help. If free memory drops to dangerous levels, the OS OOM (out of memory) killer may start killing processes to preserve the system. Dealing with this sort of behavior is the province of experienced system admins. My systems are VPs, which do have more memory than the VL, VE, or V3, so I may be having a better experience than users on those platforms.

Offline thief

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +3/-0
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #17 on: February 23, 2018, 03:11:53 pm »
I have Vera Secure.
What's the easiest way to see the amount memory used? And system logs?

Offline HSD99

  • Full Member
  • ***
  • Posts: 229
  • Karma: +6/-0
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #18 on: February 23, 2018, 04:05:00 pm »
I have Vera Secure.
What's the easiest way to see the amount memory used? And system logs?

Install ALTUI from the App store. It has built in utilities to show memory and "disk" usage, display logs, search for errors within logs, as well as the ability to run OS commands.

To dump the current log in your browser: http://your_vera_ip_address_here/cgi-bin/cmh/log.sh?Device=LuaUPnP

Offline thief

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +3/-0
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #19 on: February 23, 2018, 04:54:13 pm »
Thanks!

Offline rigpapa

  • Sr. Member
  • ****
  • Posts: 462
  • Karma: +65/-0
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #20 on: February 23, 2018, 05:14:52 pm »
You can also ssh to the box and do: cat /proc/meminfo

You can pull this in with Lua like this:

Code: [Select]
p = io.popen("cat /proc/meminfo")
lines = p:read("*a")
p:close()

I'll leave parsing it as an exercise for the reader. :-)
Author of Rachio, Deus Ex Machina II, Intesis WMP Gateway, SiteSensor, DelayLight, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline HSD99

  • Full Member
  • ***
  • Posts: 229
  • Karma: +6/-0
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #21 on: February 23, 2018, 05:20:01 pm »
If you did a log dump, you may have noticed that Vera's logs are not easy to understand. They are there as a primarily as a developer debug tool. There are lots of things in the log that look scary, but are really normal occurrences. ALTUI's own tools may actually help more than the Vera logging. There is an active ALTUI forum here, the the developer, amg0, is very active on the forum.

Offline kwieto

  • Hero Member
  • *****
  • Posts: 587
  • Karma: +22/-12
Re: Simple guide to scheduled reboot and reboot from phone app
« Reply #22 on: March 12, 2018, 05:41:23 am »
That would flush a bunch of caches that are volatile, so they're being flushed by the reboot anyway. Flushing them may have some use if you're not rebooting, maybe reducing memory use temporarily, but these are well-managed caches and unless you're really strapped for RAM for some immediate purpose, flushing them is more likely to create a momentary negative impact on system performance.

I found that both my controllers have tendency to increase cached/used memory from time to time for no apparent reason (same setup, no changes in devices, scenes or plugins).
When I asked Customer Care, they adviced the code for flushing the case.
In fact they advised to run it about every 30 minutes, I modified it in a way that if amount of free memory drops below certain level vera clears the cache; if this doesn't help, then reboot is executed.

I don't have strong opinion here, but in general I consider flushing cache potentially less harmful than a reboot, this is why I made two step setup.
« Last Edit: March 12, 2018, 05:45:14 am by kwieto »