Bbmrtg.sh has this in it, but I don't know how to determine what it's doing and why it's reporting the error.
# If MRTG hasn't updated the file in $BBSLEEP seconds then
# don't do anything as to possibly have BBDISPLAY generate a
purple
# status at one point if MRTG doesn't update the log in 30
minutes.
timenow=$BBHOME/bin/touchtime -e
timediff=echo "$lasttimestamp $timenow" | $AWK '{ print $2 - $1 }'
if [ "$timediff" -gt 0 ]
then
# Do we have a stale MRTG .log file ? No update ...
# Will provoke a purple after a while
if [ "$timediff" -gt "$MRTGSTALESECS" -a "$PURPLECHECK"
= "TRUE" ]
then
continue
fi
ERRMSG=""
if [ "$currin" -ge "$redlevelinmax" -o "$currout" -ge
"$redleveloutmax" ]
then
COLOR="red"
elif [ "$currin" -lt "$redlevelinmin" -o "$currout" -lt
"$redleveloutmin" ]
then
COLOR="red"
elif [ "$currin" -ge "$yellowlevelinmax" -o "$currout"
-ge "$yellowleveloutmax" ]
then
COLOR="yellow"
elif [ "$currin" -lt "$yellowlevelinmin" -o "$currout"
-lt "$yellowleveloutmin" ]
then
COLOR="yellow"
if [ "$timediff" -gt 0 ]
then
# Do we have a stale MRTG .log file ? No update ...
# Will provoke a purple after a while
if [ "$timediff" -gt "$MRTGSTALESECS" -a "$PURPLECHECK"
= "TRUE" ]
then
continue
fi
ERRMSG=""
if [ "$currin" -ge "$redlevelinmax" -o "$currout" -ge
"$redleveloutmax" ]
then
COLOR="red"
elif [ "$currin" -lt "$redlevelinmin" -o "$currout" -lt
"$redleveloutmin" ]
then
COLOR="red"
elif [ "$currin" -ge "$yellowlevelinmax" -o "$currout"
-ge "$yellowleveloutmax" ]
then
COLOR="yellow"
elif [ "$currin" -lt "$yellowlevelinmin" -o "$currout"
-lt "$yellowleveloutmin" ]
then
COLOR="yellow"
fi
else
ERRMSG="Time stamp in log is on the future !"
fi
rm -f $BBTMP/BBMRTG.$$
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Tuesday, April 12, 2005 9:18 AM To: hobbit at hswn.dk Subject: Re: [hobbit] MRTG & Hobbit
On Tue, Apr 12, 2005 at 09:11:16AM -0500, Lowery, Michael wrote:
This may not be directly Hobbit related, but...
I get the message "Time stamp in log is on the future !" on each of my MRTG pages. I was not getting this when running bigbrother, so I'm wondering what would cause this or if there is something I can do to keep that from appearing. MRTG is working fine, just this annoying message.
No idea, really.
It would have been nice to know *which* logfile holds this futuristic timestamp. Any mention of that ? Any output from the mrtg cron-job ?
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
In <40534FFD21F8E9428DD8CCF2B60B09EC6E91FE at atlitdc01.atg.local> "Lowery, Michael" <mlowery at alliedtechgroup.com> writes:
Bbmrtg.sh has this in it, but I don't know how to determine what it's doing and why it's reporting the error. timenow=
$BBHOME/bin/touchtime -etimediff=echo "$lasttimestamp $timenow" | $AWK '{ print $2 - $1}'[snip] if [ "$timediff" -gt 0 ] then [cut] else ERRMSG="Time stamp in log is on the future !" fi
I suspect this may happen if you run bbmrtg with BBHOME pointing to the Hobbit installation - because the "touchtime" utility does not exist. So you get "timediff" to be negative from the awk command.
If you have GNU date installed, I'd just replace that line with
timenow=`date +%s`
and see if that resolves it.
Regards, Henrik
participants (2)
-
henrik@hswn.dk
-
mlowery@alliedtechgroup.com