Archive for September, 2016

Linux: dmesg timestamp human readable

Posted: 30th September 2016 by Thorben Hemmler in Serveradministration

dmesg | perl -ne "BEGIN{\$a= time()- qx!cat /proc/uptime!}; s/\[\s*(\d+)\.\d+\]/localtime(\$1 + \$a)/e; print \$_;" Fri Sep 23 04:27:49 2016 sd 1:0:1:13: [sdbn] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Fri Sep 23 04:27:49 2016 sd 1:0:1:13: [sdbn] Sense Key : Illegal Request [current] Fri Sep 23 04:27:49 2016 sd 1:0:1:13: [sdbn] Add. Sense: Illegal function (use 20 00, 24 00, […]