This is no specific issue of procps, it just returns the value from the
kernel. The kernel documents (in the source) that the value includes the
time spent in suspend.

/proc/uptime gets the value from here:

https://elixir.bootlin.com/linux/v4.20.3/source/include/linux/timekeeping.h#L93

/**
 * ktime_get_boottime - Returns monotonic time since boot in ktime_t format
 *
 * This is similar to CLOCK_MONTONIC/ktime_get, but also includes the
 * time spent in suspend.
 */
static inline ktime_t ktime_get_boottime(void)
{
        return ktime_get_with_offset(TK_OFFS_BOOT);
}

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/647472

Title:
  uptime counts time spend in suspend

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/procps/+bug/647472/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to