Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: shaunmbgA client (John Lees) has written a script to convert the 13 digit epoch dates in Lavastorm logs into human readable form (since the update to LAE 4.5.x).
It is a bash script and requires perl for the date conversion. It has been tested with bash 2.05 and perl 5.6.1 but should work with later versions.
Changing the target prefix (timestamp=� ) should allow it to work on any log file containing epoch dates.
It can be used by copying Lavastorm log records you are interested in into a file and then pass the name to the conversion script and it will parse the records inserting human readable dates before every logical record group.
E.g.
>/omni/RATI/BSG/Scripts/epoch-conv.sh test.log
(Note the script path. The log file (test.log) will need a path if it�s not in the current directory)
logfile specified : test.log
2008-10-15 12:13:00; Level: 2; Type: 0; Desc: Accepted connection from /144.131.18.179:1726; File: Server.java; Line: 361; Class: com.lavastorm.brain.serve
r.Server; Method: handleAccept
(old style log records don�t need conversion) 2008-10-15 12:15:35; Level: 2; Type: 0; Desc: Exiting: Uncaught error in drone: Java heap space; File: Drone.java; Line: 532; Class: com.lavastorm.brain.d
rone.Drone; Method: Run
2008-10-15 12:15:35; Level: 2; Type: 0; Desc: Drone drone-144.131.18.179-1697 went away.; File: Server.java; Line: 205; Class: com.lavastorm.brain.server.S
erver; Method: threadExit
2008-10-15 12:16:01; Level: 2; Type: 0; Desc: Deployed BRX 'Rerate_noncap_to_cap' to file:/u03/lavastorm/ssapp0444/deploy/Rerate_noncap_to_cap.brx; File: B
rxDeployment.java; Line: 163; Class: com.lavastorm.brain.util.BrxDeployment; Method: deployBrx
--
Tue Jan 1 11:37:31.372 2013
epoch dates in the new log records are converted to human readable format and placed before each logical record group <logEvent timestamp="1357000651372" level="WARN">
New epoch date stamp <message xsi:type="rawMessage"><![CDATA[Exiting: Uncaught error in drone: Java heap space]]></message>
<detail xsi:type="javaDetail" class="com.lavastorm.brain.drone.Drone" method="Run" file="Drone.java" line="565"/>
</logEvent>
Tue Jan 1 11:37:31.373 2013
<logEvent timestamp="1357000651373" level="WARN">
<message xsi:type="rawMessage"><![CDATA[Exiting: Uncaught error in drone: Java heap space]]></message>
<detail xsi:type="javaDetail" class="com.lavastorm.brain.drone.Drone" method="Run" file="Drone.java" line="565"/>
</logEvent>
Tue Jan 1 11:37:31.373 2013
<logEvent timestamp="1357000651373" level="WARN">
<message xsi:type="rawMessage"><![CDATA[Exiting: Uncaught error in drone: Java heap space]]></message>
<detail xsi:type="javaDetail" class="com.lavastorm.brain.drone.Drone" method="Run" file="Drone.java" line="565"/>
</logEvent>
--
Tue Jan 1 11:37:48.343 2013
<logEvent timestamp="1357000668343" level="WARN">
<message xsi:type="rawMessage"><![CDATA[Exiting: Unable to send error message.: Java heap space]]></message>
<detail xsi:type="javaDetail" class="com.lavastorm.brain.drone.Drone" method="Run" file="Drone.java" line="577"/>
</logEvent>
--
Tue Jan 1 14:01:10.707 2013
<logEvent timestamp="1357009270707" level="WARN">
<message xsi:type="rawMessage"><![CDATA[Exiting: Uncaught error in drone: Java heap space]]></message>
<detail xsi:type="javaDetail" class="com.lavastorm.brain.drone.Drone" method="Run" file="Drone.java" line="565"/>
</logEvent>
Wed Jan 30 21:38:55.140 2013
<logEvent timestamp="1359542335140" level="WARN">
<message xsi:type="rawMessage"><![CDATA[Exiting: Uncaught error in drone: Java heap space]]></message>
<detail xsi:type="javaDetail" class="com.lavastorm.brain.drone.Drone" method="Run" file="Drone.java" line="565"/>
</logEvent>
To review command execution results:
cat /omni/RADTI/BSG/Reports/d234543-epoch-conv.txt
copy and paste this line to review the results (your UID will prefix �epoch-conv.txt)
Attachments:
epoch-conv.sh