Logging engine restarts?

Is it possible to log an engine restart the same way the reboots can be logged?

Reboot logging:

[code]local filename = ‘/etc/cmh/uptimes.log’

local outf = io.open(filename, ‘a’)

outf:write(os.date('%Y-%m-%d %H:%M:%S ‘…os.time()…’ '))

outf:close()

os.execute('uptime >> '…filename )[/code]

I have one scene that does not run consistantly through a 24 hr period using “Every 120 minute” as the timer. I’m suspecting an engine restart but I can’t confirm it.

JOD.

Create a plugin whose startup function writes the current time to a file …

Possibly, for temporary diagnostics, add something (untested) like the following in the [tt]Mios Developers > Edit Startup Lua[/tt]?
(Obviously the file will grow forever, etc.)

local filename = '/etc/cmh/restarts.log' local outf = io.open(filename, 'a') outf:write(os.date('%Y-%m-%d %H:%M:%S '..os.time()..' ')) outf:close()

:smiley: Thank you oTi@!!

You know, It’s tools like this that should be provided by MCV to help with diagnoses during beta testing.
I’m still suffering from scenes not starting or failing to complete and I can see I am still getting reboots, now I can monitor the restarts.
When I’ve power cycled Vera, I go into the log and make a note that I did it.
I see the log entry now for a manual “Reload” so I can do the same thing there too. Perfect.

Thanks again.
JOD.