You are not logged in.

#1 2017-07-24 06:27:59

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

[SOLVED] dmesg -T timestamp off by hours

[Sun Jul 23 15:06:49 2017] input: Logitech Anywhere MX as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2/0003:046D:C52B.002F/0003:046D:1017.0030/input/input31
[Sun Jul 23 15:06:49 2017] logitech-hidpp-device 0003:046D:1017.0030: input,hidraw1: USB HID v1.11 Mouse [Logitech Anywhere MX] on usb-0000:00:14.0-2:1
^C
[j@hyperion ~]$ date
Mon Jul 24 08:23:58 CEST 2017

The commands dmesg -Tw and date where executed directly consequetive. date shows the correct day. Is there a reason why the time in the dmesg is off by about 17 hours?

Last edited by theking2 (2017-07-24 08:55:29)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#2 2017-07-24 06:30:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] dmesg -T timestamp off by hours

Maybe the last message in dmesg was just 17 hours ago?

Offline

#3 2017-07-24 07:22:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,877

Re: [SOLVED] dmesg -T timestamp off by hours

Just running here, attached a usb key - dmesg time is off by 69 hours.

The reason is that there's no gap between sleep and wakeup (though I know it was several hours in S3), so I guess this just adds runtime to the initial date.

Offline

#4 2017-07-24 08:36:02

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [SOLVED] dmesg -T timestamp off by hours

To extend seth's answer:

dmesg(1) wrote:
       -T, --ctime
              Print human-readable timestamps.

              Be aware that the timestamp could be inaccurate!  The time source used for the logs is not updated after system SUSPEND/RESUME.

If you want kernel messages with accurate timestamps, it's probably recommended to use:

journalctl -k

pkgs │ hacks │ cfg │ blag

Offline

#5 2017-07-24 09:09:22

theking2
Banned
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 372

Re: [SOLVED] dmesg -T timestamp off by hours

Thanks ayekat


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

Board footer

Powered by FluxBB