rounding down

This commit is contained in:
Udo Waechter
2013-06-05 16:07:57 +02:00
parent 96f25ace50
commit 3856774c9f

View File

@@ -9,6 +9,7 @@ FILE="/var/log/puppet/puppetd_run.log"
[[ -r $FILE ]] || exit 0
## BSD and Linux have different stat commands
VALUE=$(grep "Finished catalog run" /var/log/puppet/puppetd_run.log |tail -1 |sed 's/.*in \(.*\) seconds/\1/')
VALUE=$(awk "BEGIN{print int($VALUE)}")
GMETRIC="${GMETRIC} --dmax=30000 --tmax=350 --units=Seconds --type=float"
$GMETRIC --value=${VALUE} --name="Puppet runtime"