Commit 8250ddd6 authored by ijaz ahmad's avatar ijaz ahmad Committed by GitHub
Browse files

know last puppet run time

parent 7b692d17
#prints time since last recorded puppet update
#you know...for debugging
last=`grep last_run /var/lib/puppet/state/last_run_summary.yaml | awk {'print $2'}`
now=`date +%s`
let SECONDS=($now-$last)
let MIN=($SECONDS/60)
let HOURS=($MIN/60)
let DAYS=($HOURS/24)
echo "Since last puppet update"
echo 'seconds: '$SECONDS
echo 'minutes: '$MIN
if [ $HOURS -gt 0 ]; then
echo 'hours: '$HOURS
if [ $DAYS -gt 0 ]; then
echo 'days: '$DAYS
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment