[Crash-utility] log -T option should not be support after system suspend

Dave Anderson anderson at redhat.com
Thu May 7 14:13:25 UTC 2020



----- Original Message -----
> 赵乾利 wrote on Thu, May 07, 2020:
> > This change does not take into account the system sleep,once system
> > suspend this translation will make error,printk timestamp and jiffies
> > won't be update during suspend,and system suspend is a common
> > feature,so i think change is a bug.
> 
> This is how the regular unix command `dmesg -T` works, so I think it's
> worth having as is: timestamp will be mostly correct until the first
> sleep and then off by sleep amount.
> 
> This option isn't reliable anyway (drift depends on system but it's not
> unusual to be off by a few minutes on most systems with more than a week
> of uptime -- it drifts faster when cpu clock varies often), and it's not
> like there's any harm in this.. At most print a warning that times after
> sleep are wrong if you want to.
> 
> This is obviously just my opinion but I think for tools like crash, if a
> user wants to shoot themselves in the foot, we should let them to... I'm
> always annoyed when system tools know better and I need to waste time
> patching them to bypass checks...

I agree completely with Dominique.  Your patch displays "log: -T option not supported"
and bails out, which is arguably more misleading than just showing the timestamps.

The dmesg man page shows this:

       -T, --ctime
              Print human readable timestamps.  The timestamp could be inaccurate!

              The time source used for the logs is not updated after system SUSPEND/RESUME.

This kind of warning could be added to the log command's help page, or could
be displayed as a preface to the dump of the log.  Or things could be just left
as they are.

> 
> PS. Didn't want to send a mail "just" for it but thank you for all these
> years Dave, hope you keep in touch a bit when you feel bored :)
> And congratulation? to new maintainers!
> --
> Dominique

Thanks Dominique, I will still be watching the list from my personal email.

Dave





More information about the Crash-utility mailing list