Hello Xiscu,

The design of Tuptime is dependent of the information that the kernel report in the uptime and btime counters from /proc/uptime and /proc/stat respectively.

Both (documented under Documentation/filesystems/proc.txt) are related with the boot time date and none of them are reset when the system pass over suspend or resume. Therefore the startup information is the same and the uptime is calculated from there.

As reference and example, the man page of the 'uptime' said 'Tell how long the system has been running'. Testing it between suspend and resume states report the following behaviour:

# 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
(5 minutes later, turning on again)
# pm-hibernate
 10:01:16 up  19 min, 2 users,  load average: 3,77, 1,14, 0,43

...which is the same, the uptime started when the system was booted up and counted from there.

But in any case, the time counted is not the "running time", the term "wall clock" or "elapsed real time" is more correct instead of the actual definition, I will fix it.


Thanks,

Reply via email to