[mrtg] Re: Help... log file question....

Steffen Kluge kluge at fujitsu.com.au
Wed Oct 6 10:49:53 MEST 1999


On Tue, Oct 05, 1999 at 04:40:07PM -0700, Zaid Ali wrote:
> It is the Unix time stamp. The Unix timestamp is measured since Epoch
> UTC January 1 1970 which basically means that in your example 939163249
> is the seconds since January 1 1970... this is how Unix timestamp is.

Actually, it is the Posix timestamp. All Posix compliant systems
(which NT claims to be one of, btw) are required to have a
ctime() library function that converts those time stamps into
human readable strings, adjusted for your local timezone.

> If
> I were you it would be easier to convert your log file by importing the
> logfile into a SQL server, build a 3 colum table and run a query with
> the following calculation :

Setting up a database server to convert a timestamp seems like a bit
of an overkill to me. As a platform neutral way of doing it I'd
suggest perl, which you have anyway if you are running MRTG, e.g.

perl -e 'print scalar localtime 939163249, "\n";' or
perl -e 'print scalar gmtime 939163249, "\n";'

Hope this helps
Steffen.

-- 
Steffen Kluge <kluge at fujitsu.com.au>
Fujitsu Australia Ltd
Keywords: photography, Mozart, UNIX, Islay Malt, dark skies
--

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list