dmesg mit Zeitangabe

Die dmesg Zeitangaben sind nicht wirklich zu lesen, aber manchmal braucht man sie dann doch eben. So einfach ist es dann doch wieder nicht:

# perl -e 'openf,"/proc/uptime";=~/\s/;$x=time-$`;for(qx{dmesg}){s/^\[\s*([\d.]+)\]\s+//;@t=(localtime($x+$1))[5,4,3,2,1,0];$t[0]+=1900;$t[1]+=1;printf"[%04d-%02d-%02d%02d:%02d:%02d] %s",@t,$_}'

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.