Thursday, August 10, 2017

How to Find timestamp info in ILOM hostconsole log outputs

As you know there can be a lack of date+time info reported in the ILOM hostconsole logs during Linux boot, which can make it difficult to know what info in the console log may be usefully current or irrelevantly old for the system problem you are investigating, for comparing to System Event Log time stamps, other OS logs etc.

The 'audit()' entries that are reported when linux boots contain epoch timestamps which we can convert to human-readable date+time.


EG hostconsole.log will show linux reported audit events during boot:
   ...
   type=2000 audit(1436937809.284:1): initialized
   type=1404 audit(1436937824.874:2): selinux=0
   type=1300 audit(1436937824.874:2): arch=c000003e
   ...

We can use the unix 'date' command to convert "audit(1436937809.284:1)" to a more useful format:

   # date --date="@1436937809"
   Wed Jul 15 06:23:29 BST 2015

Or you can use the Epoch converter tool at:
http://www.epochconverter.com/


Note that the audit() epoch times use the local system's timezone, so take that into account when converting eg
   # TZ="BST" date --date ...


Source : Friend


Regards
Gurudatta N.R

No comments:

Post a Comment