In <user-32fba4a0be9e@xymon.invalid> "Gore, David W" <user-3e5761c68b56@xymon.invalid> writes:
I have several server side scripts that give me results I would rather
not have soon after a Xymon server restart. What is the best way to
determine if Xymon just started? I could poke around a bit, just
wondered if someone already had some ideas already implemented. I will
do something like exit 1 If xymon just started, otherwise continue.
Check the timestamp of the PID file.
#!/bin/sh
touch --date="1 hour ago" /tmp/1hourago
if test $XYMONSERVERLOGS/xymond.pid -nt /tmp/1hourago
then
echo "Xymon restarted less than 1 hour ago"
exit 0
fi
Probably requires the GNU version of "touch" .
Regards,
Henrik