3

The definition for uptime is "Tell how long the system has been running." but if you change your system power state to suspend or resume:

# uptime
 09:50:33 up  8 min, 2 users,  load average: 0,24, 0,33, 0,15
# pm-suspend
(5 minutes later, turning on again)
# uptime
 09:55:15 up  13 min, 2 users,  load average: 0,33, 0,33, 0,16
# pm-hibernate
(5 minutes later, turning on again)
# uptime
 10:01:16 up  19 min, 2 users,  load average: 3,77, 1,14, 0,43

The system hasn't been running but the uptime time counter increases.

Using the term "wall time" or "elapsed real time" in their definition instead of "has been running" can be the right approach nowadays?

https://en.wikipedia.org/wiki/Elapsed_real_time

3

Yes, uptime shows the elapsed wall-clock time since the system booted rather than the amount of time the system has spent running. (The boot date and time can be seen with uptime -s on Linux.)

0

If you want to know how long the system has actually been running excluding the time spent sleeping, see http://unix.stackexchange.com/a/532416/332937

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.