How does Nagios determine system time

Marc Powell marc at ena.com
Mon Sep 26 19:31:58 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Bryan Bateman
> Sent: Monday, September 26, 2005 12:07 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] How does Nagios determine system time
> 
> I have an test install of Nagios running in Eastern Daylight Time, but
> the time reported by Nagios is Pacific Daylight time.  Is there a
> configuration setting to enable the correct time zone????

Not within Nagios. It uses the localtime() C function to convert time_t
(seconds since the epoch) adjusting for the local time zone the server
is configured for.

I'll bet if you run the following script it'll show the same time
information as Nagios --

perl -e 'print scalar(localtime()) . "\n";'

If you're using linux you can change your timezone from the command line
by following these instructions --

http://www.linuxforum.com/linux_tutorials/68/1.php

If you're using a GUI or other OS you'll need to consult their
documentation.

--
Marc


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list