Bug 65616 - Systemd does not take clock changes into consideration when calculating service running time
Summary: Systemd does not take clock changes into consideration when calculating servi...
Status: NEW
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: ARM Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-10 17:19 UTC by Radek Hladík
Modified: 2019-08-22 10:59 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Radek Hladík 2013-06-10 17:19:40 UTC
Systemd version: systemd-44-24.fc17.x86_64 , OS: Fedora 17.

Systemd reports wrong information about service runtime because of clock change during boot process.

[root@higgs ~]# systemctl status -- '-.mount'
-.mount - /
          Loaded: loaded
          Active: active (mounted) since Fri, 09 Mar 2012 03:57:30 +0100; 1 years and 3 months ago
           Where: /
            What: /dev/md127
          CGroup: name=systemd:/system/-.mount

[root@higgs ~]# uptime
 19:12:24 up 63 days, 22:15,  6 users,  load average: 0.43, 0.30, 0.25

The system clock were off by cca a year when the system booted and this has been corrected via ntp daemon (chrony-1.27-0.3.pre1.fc17.x86_64).

I think that at least the "xxx ago" part of timing information should not be affected by clock changes the same way uptime isn't.
Comment 1 Eric 2014-04-15 19:48:31 UTC
Running systemd on a RaspberryPi (no RTC available), systemctl status reports it is running over 44 years:

# systemctl status -- '-.mount' 
● -.mount - /
   Loaded: loaded (/etc/fstab)
   Active: active (mounted) since Thu 1970-01-01 01:00:03 CET; 44 years 3 months ago
    Where: /
     What: /dev/root
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
# uptime
 21:48:02 up 13 min,  1 user,  load average: 1.06, 0.98, 0.63
#
Comment 2 Zbigniew Jedrzejewski-Szmek 2019-08-22 10:59:04 UTC
Still the same issue in systemd-243-rc2 ;(


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.