tim format in nagios.log

Stuart Browne stuart.browne at ausregistry.com.au
Mon Oct 25 05:50:35 CEST 2010


> -----Original Message-----
> From: Litwin, Matthew [mailto:mlitwin at stubhub.com]
> Sent: Monday, 25 October 2010 14:11
> To: nagios-users at lists.sourceforge.net List
> Subject: [Nagios-users] tim format in nagios.log
> 
> how can I change time from unix time to human readable?

There are a number of ways.

>From a shell with GNU date (i.e. a linux box), you can use:

date -d '@<number>'

i.e.

[bekar at office-backup ~]$ date -d '@1287978546'
Mon Oct 25 14:49:06 EST 2010

There are ways in Perl and various other scripting and database languages as well.  Provide some more specifics on how you want to use it and we'll give you more details.

Stuart

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
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