PeterJCLaw / srcomp-kiosk

A puppet config for setting up a number of Raspberry Pis as kisok-mode browsers
https://github.com/PeterJCLaw/srcomp/wiki/Component-Overview#srcomp-kiosk
MIT License
0 stars 3 forks source link

Detect and restart defunct browser processes #21

Open PeterJCLaw opened 2 years ago

PeterJCLaw commented 2 years ago

During SR2022 a number of screens were noted to have crashed and were showing the desktop instead of their browser.

In one case I captured this process state before restarting:

pi         662  0.0  0.0      0     0 ?        Z    Apr22   0:00 [unclutter] <defunct>
pi         773  0.0  1.4  52088 13956 ?        S    Apr22   0:11 /usr/bin/python3 /usr/share/system-config-printer/applet.py
pi        7418 85.3  0.0      0     0 ?        Z    Apr23 768:22 [firefox-esr] <defunct>
pi       14710  0.2  0.7  17324  7160 ?        S    Apr23   4:01 python3 /opt/srcomp-kiosk/kiosk.py --browser-type chromium-browser --browser-path firefox
pi       14714  0.0  0.0   4040   228 ?        S    Apr23   0:00 unclutter
pi       14715 35.1  0.0      0     0 ?        Z    Apr23 483:03 [firefox-esr] <defunct>
pi       26512  0.0  0.0   7584   516 pts/0    S+   14:00   0:00 grep --color -E (unclutter|icew|fire|chrom|python)