Check for hung puppet process

This commit is contained in:
Keith Whyte 2020-06-25 14:17:39 +02:00
parent da3546d02f
commit de974d4cd7

View file

@ -88,3 +88,6 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
#SQLite backup #SQLite backup
0 4 * * * root /home/rhizomatica/bin/sqlite_backup_rotated.sh > /dev/null 2>&1 0 4 * * * root /home/rhizomatica/bin/sqlite_backup_rotated.sh > /dev/null 2>&1
#Check for hung puppet process
*/20 * * * * root _PPID=$(pidof puppet) ; if [ "$?" -eq "0" ]; then /bin/kill $(ps -p $_PPID -o etimes,pid,cmd | awk '{if ($3$4$5 == "puppetagent:applying" && $1 >= 3600) print $2}'); fi