Thank you for the idea!
I just did it this way:
created script /root/cron_dump_zombies.sh
#/bin/sh
logger -i --server 192.168.0.138 "scan for zombies on $(hostname)"
ps axo pid=,stat= | awk '$2~/^Z/ { print }' | logger -i --server 192.168.0.138
logger -i --server 192.168.0.138 "scan done."
and /root/cron_dump_vmstat.sh
#/bin/sh
logger -i --server 192.168.0.138 "dump mem stat on $(hostname)"
vmstat | logger -i --server 192.168.0.138
and put both into cron (which need to be installed 1st)
*/5 * * * * /bin/sh /root/cron_dump_zombies.sh
*/10 * * * * /bin/sh /root/cron_dump_vmstat.sh
Now my servers rsyslog will get this all.
I also forward the all the KODIs logs now this way:
tail -n 2048 -f $HOME/.kodi/temp/kodi.log | logger -i --server 192.168.0.138 &
from all boxes to the same server. the server has a rsyslog filter rule to dispatch the incoming into different files. We’ll see the outcome soon…
Any idea regarding forwarding the kodi.log early before it’s written to a physical file?
I never used named pipes, but I could imagine, this is more reliable to get the last log line when a power dropout occurs. Would highly appreciate some hints…
Finally, can I get the power state information from Raspi somehow? The same that generates the yellow flash or the rainbow square if power is under the limits. Ideas?
Cheers,
Laser-Man