The uptime
is grossly misleading. If you use uptime -s
it is more meaningful:
$ uptime -s
2019-10-31 05:30:09
Now you can see it simply shows you the last boot time. If you want to know the real uptime see this answer. Sample output:
$ suspendtime
Oct 31 05:55:19 to Oct 31 16:54:26 lasting 39,547 seconds
Oct 31 23:21:21 to Nov 01 04:29:12 lasting 18,471 seconds
Nov 01 05:51:27 to Nov 01 17:08:34 lasting 40,627 seconds
Nov 02 00:01:33 to Nov 02 10:28:46 lasting 37,633 seconds
Nov 02 18:15:59 to Nov 02 19:10:14 lasting 3,255 seconds
Nov 02 21:17:33 to Nov 03 05:31:54 lasting 33,261 seconds
Nov 03 12:06:39 to Nov 03 14:22:50 lasting 8,171 seconds
Nov 03 22:28:12 to Nov 04 04:17:13 lasting 20,941 seconds
Nov 04 05:49:40 to Nov 04 16:48:52 lasting 39,552 seconds
Nov 04 21:45:48 to Nov 05 04:19:26 lasting 23,618 seconds
Nov 05 05:52:05 to Nov 05 16:32:38 lasting 38,433 seconds
Nov 05 21:12:18 to Nov 06 04:16:50 lasting 25,472 seconds
Nov 06 05:50:45 to Nov 06 16:22:54 lasting 37,929 seconds
Linux uptime 572,689 seconds (6 Days 15 Hours 4 Minutes 49 Seconds)
13 Suspends 366,910 seconds (4 Days 5 Hours 55 Minutes 10 Seconds)
Real uptime 205,779 seconds (2 Days 9 Hours 9 Minutes 39 Seconds)
uptime
. Is this correct? – UTF-8 Dec 24 '16 at 15:23uptime
is a measure of how long a system has been running. Theuptime
command merely parses what's in/proc/uptime
file. I am not interested in the command itself, I am interested in how suspending or hibernating a system affects whatuptime
command and/proc/uptime
file say. – Sergiy Kolodyazhnyy Dec 24 '16 at 15:29uptime
. But again, I repeat, I don't care about uptime command itself. I want to know about the value that system calculates – Sergiy Kolodyazhnyy Dec 24 '16 at 15:48sysinfo
structure and prints it out. There's no indicaton on calculations being done. No indication on what I am asking about , which is hibernation and syspending. – Sergiy Kolodyazhnyy Dec 24 '16 at 16:05/proc/uptime
file with a new timestamp. The/var/log/hibernate.log
did have suspend and resume times listed in it. I guess those could be subtracted from overall if you don't want hibernate added in. That is what I am getting out of it. – Terrance Dec 24 '16 at 18:55journalctl -b-0
. – WinEunuuchs2Unix Nov 07 '19 at 02:43