Script if service weewx[<PID>xxxx] is CRITICAL _ then.......f.e. reboot

37 views
Skip to first unread message

Co van der lee

unread,
Dec 30, 2020, 10:31:21 AM12/30/20
to weewx...@googlegroups.com
Hi,

Sometimes @ unexpected times the weewx service become critical and stops / hangs.....
as workaround I want to create a python / bash script the checks (f.e. every hour) by Cron the status and if the status is Critical or Error then the system reboots.

Is this possible, I guess Yess but I need some help.

Does someone has an idea how to achieve that. 

thanks!
regards Co

vince

unread,
Dec 30, 2020, 1:23:26 PM12/30/20
to weewx-user
Usually the best path is to examine your logs to find out 'why' you are running into problems, and then fix the issue. Most sites run for years without issues.

Set debug=1 in weewx.conf, restart weewx, and check your logs if it happens again. Post here if you want others to try to help.

Co van der lee

unread,
Dec 30, 2020, 3:33:17 PM12/30/20
to weewx...@googlegroups.com
Hi Vince,

Thanks for reply and suggestion.

I already did but no response thats why i was looking for a work-a-round 

The critical error appears sometimes in the loop with an error that there was a float where the software expected a integer.....

I hope someone had a suggestion for the script.

Tnx

       

Op wo 30 dec. 2020 19:23 schreef vince <vince...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/66a2271e-8f15-4575-9f23-7bcbbf29de34n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages