Fix command for checking hung puppet process
Previous version would result in running /bin/kill with no parameter if the job ran while a young puppet process was active.
This commit is contained in:
parent
de974d4cd7
commit
695c794089
1 changed files with 1 additions and 1 deletions
|
@ -90,4 +90,4 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
|
|||
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
|
||||
*/20 * * * * root _PPID=$(pidof puppet) ; if [ $? -eq 0 ]; then _RPID=$(ps -p $_PPID -o etimes,pid,cmd | awk '{if ($3$4$5 =="puppetagent:applying" && $1 >= 3600) print $2}') ; if [ -n "$_RPID" ]; then kill $_RPID; fi; fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue