Linux How to..

Linux How to ,Share Knowledge

TAG : command line convert to standard date time

some Service log use time stamp . Easy convert to standard date time

Example Nagios log :
tail -f /usr/local/nagios/var/nagios.log
[1425007447] SERVICE ALERT: PROB_API;check_ais_rbt_server_responce;OK;HARD;3;OK. Found 0

awk ‘BEGIN { print strftime(“%Y-%m-%d %H:%M:%S”,1425008707); }’

2015-02-27 10:45:07

Success.

Comments are closed.