Skip to content

Instantly share code, notes, and snippets.

@fanyeren
Created March 12, 2019 13:44
Show Gist options
  • Save fanyeren/6175fc9726b712e18e9126cfb0dc5fae to your computer and use it in GitHub Desktop.
Save fanyeren/6175fc9726b712e18e9126cfb0dc5fae to your computer and use it in GitHub Desktop.
what does dmesg timestamp mean?
function dmesg_time() {
time=$1; shift;
date -d "1970-01-01 UTC `echo "$(date +%s)-$(cat /proc/uptime | cut -f 1 -d' ')+${time}" | bc ` seconds"
}
# usage: dmesg_time 27036930.869716
# output: Tue Mar 5 19:15:28 CST 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment