dmesg feature request: timestamps relative to current time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

When I use dmesg, I'm often annoyed that there isn't a good way to tell how
long ago a specific log line was from. The only accurate way to do so that I've
found is to look at /proc/uptime and compare that value to the log line I care
about. The ctime and iso options could be useful, but as the manpage points
out, they are inaccurate in the case of suspend/resume, and I'd still have to
do math in my head to see how long ago something was, even if it's easier to do
the conversion than with the default style of timestamp.

I'd like to see a value for the --time-format option that prints timestamps as
values in seconds relative to the time dmesg was executed. This would allow
people to quickly see how long ago a relevant event happened. I'm not sure
whether it would make more sense to conceive of times in the past as being
negative or positive, but one or the other would need to be selected (one might
see both in the case of --follow).

Is this a feature people would be open to adding? I'm happy to write a patch if
so, but wanted to check here first to see if it's something that'd be likely to
be accepted.

Thanks,

:w



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux