[opensuse] strange boot information
We had a power cut sometime in the last twenty-four hours and I'm trying to find out when. Looked in /var/log/messages but it's so full of cr*p these days I gave up, so I searched and I found <https://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html> But when I ran the commands it suggested I got a surprise: $ who -b system boot 2019-02-06 11:33 $ last reboot reboot system boot 4.12.14-lp150.12 Wed Feb 6 11:33 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 09:45 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 08:56 - 09:45 (00:48) reboot system boot 4.12.14-lp150.12 Sat Aug 4 13:03 - 09:45 (62+20:41) ... more old entries snipped ... So it looks like the power fail happened not long before I started looking. But how can there be two 'still running' entries? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 06/02/2019 13.24, Dave Howorth wrote:
We had a power cut sometime in the last twenty-four hours and I'm trying to find out when. Looked in /var/log/messages but it's so full of cr*p these days I gave up, so I searched and I found <https://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html> But when I ran the commands it suggested I got a surprise:
$ who -b system boot 2019-02-06 11:33 $ last reboot reboot system boot 4.12.14-lp150.12 Wed Feb 6 11:33 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 09:45 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 08:56 - 09:45 (00:48) reboot system boot 4.12.14-lp150.12 Sat Aug 4 13:03 - 09:45 (62+20:41) ... more old entries snipped ...
So it looks like the power fail happened not long before I started looking. But how can there be two 'still running' entries?
I was thinking that because perhaps the computer was not properly halted. But then, I would see similar results, as my machine has crashed more than once, but no: cer@Telcontar:~> who -b system boot 2019-02-05 13:54 cer@Telcontar:~> last reboot reboot system boot 4.12.14-lp150.12 Tue Feb 5 13:54 still running reboot system boot 4.12.14-lp150.12 Sun Feb 3 13:34 - 13:53 (2+00:18) reboot system boot 4.12.14-lp150.12 Thu Jan 24 10:05 - 13:53 (12+03:47) reboot system boot 4.12.14-lp150.12 Wed Jan 23 15:34 - 13:53 (12+22:18) reboot system boot 4.12.14-lp150.12 Sun Jan 20 12:41 - 13:53 (16+01:11) reboot system boot 4.12.14-lp150.12 Fri Jan 18 10:07 - 13:53 (18+03:46) reboot system boot 4.12.14-lp150.12 Sat Jan 12 21:18 - 04:23 (5+07:05) reboot system boot 4.12.14-lp150.12 Fri Jan 11 15:21 - 04:23 (6+13:02) reboot system boot 4.12.14-lp150.12 Fri Jan 11 11:06 - 15:20 (04:13) reboot system boot 4.12.14-lp150.12 Wed Jan 9 11:44 - 15:20 (2+03:36) reboot system boot 4.12.14-lp150.12 Mon Jan 7 17:37 - 15:20 (3+21:43) wtmp begins Mon Jan 7 17:37:11 2019 cer@Telcontar:~> There are other ways, perhaps. "journalctl -b" shows current boot log, so it starts at the instant your machine booted. And... here: Isengard:~ # journalctl --list-boots -7 bfc792ccc8ea40e798baee419b078efa Fri 2018-07-20 01:42:31 CEST—Sun 2018-07-22 14:10:22 CEST -6 e251b87ecfb148198330094ccbcad1ab Sun 2018-07-22 19:52:22 CEST—Thu 2018-10-04 22:32:46 CEST -5 4997db0c8a9f4fdf8e5ce960e8b7131d Thu 2018-10-04 22:33:23 CEST—Sat 2018-11-03 18:11:03 CET -4 dd54a34e43b44ca1a9b2a65803b0fc65 Sun 2018-11-04 12:01:47 CET—Sun 2018-11-04 14:47:34 CET -3 db9749e887f44907b3c9dd1cb535c09f Sun 2018-11-04 14:48:32 CET—Sat 2018-12-08 22:12:41 CET -2 05be29aba871400eb2afad996c32676f Sat 2018-12-08 22:13:19 CET—Sat 2018-12-15 20:56:23 CET -1 2ded6e55af6b4d19a4629fd7a35a3c89 Sat 2018-12-15 20:57:00 CET—Sun 2018-12-30 22:53:29 CET 0 2e04665a231c4b52a1ed2da4259bc2b4 Sun 2018-12-30 22:54:17 CET—Wed 2019-02-06 13:45:02 CET Isengard:~ # Besides that, I have a service that adds entries to the log files that mark when my machine boots or halts, and I also keep a separate log file with boots and hibernations: cer@Telcontar:~> tail /var/log/Sesiones.log 2019-01-23 15:35:18+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux 2019-01-23 17:46:20+01:00 - Hibernating the system now... 2019-01-24 10:06:44+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux 2019-02-03 13:34:47+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux 2019-02-05 13:52:03+01:00 - Halting the system now =========================================== uptime: 13:52:03 up 2 days 0:18, 0 users, load average: 1.79, 0.90, 0.80 2019-02-05 13:54:57+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux cer@Telcontar:~> Halts are mostly missing, indicating that the machine is crashing way too often :-( -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Just recently I saw the same on my virtual machine. A colleague was logged in as root when I rebooted the machine and since then I had two sessions listed. I terminated the session with 'loginctl terminate-session <ID>' after I listed all active sessions with 'loginctl list-sessions'. It seems that in case of reboot or power outage the sessions can't always be cleaned up properly. Regards, Eugen Zitat von "Carlos E. R." <robin.listas@telefonica.net>:
On 06/02/2019 13.24, Dave Howorth wrote:
We had a power cut sometime in the last twenty-four hours and I'm trying to find out when. Looked in /var/log/messages but it's so full of cr*p these days I gave up, so I searched and I found <https://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html> But when I ran the commands it suggested I got a surprise:
$ who -b system boot 2019-02-06 11:33 $ last reboot reboot system boot 4.12.14-lp150.12 Wed Feb 6 11:33 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 09:45 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 08:56 - 09:45 (00:48) reboot system boot 4.12.14-lp150.12 Sat Aug 4 13:03 - 09:45 (62+20:41) ... more old entries snipped ...
So it looks like the power fail happened not long before I started looking. But how can there be two 'still running' entries?
I was thinking that because perhaps the computer was not properly halted. But then, I would see similar results, as my machine has crashed more than once, but no:
cer@Telcontar:~> who -b system boot 2019-02-05 13:54 cer@Telcontar:~> last reboot reboot system boot 4.12.14-lp150.12 Tue Feb 5 13:54 still running reboot system boot 4.12.14-lp150.12 Sun Feb 3 13:34 - 13:53 (2+00:18) reboot system boot 4.12.14-lp150.12 Thu Jan 24 10:05 - 13:53 (12+03:47) reboot system boot 4.12.14-lp150.12 Wed Jan 23 15:34 - 13:53 (12+22:18) reboot system boot 4.12.14-lp150.12 Sun Jan 20 12:41 - 13:53 (16+01:11) reboot system boot 4.12.14-lp150.12 Fri Jan 18 10:07 - 13:53 (18+03:46) reboot system boot 4.12.14-lp150.12 Sat Jan 12 21:18 - 04:23 (5+07:05) reboot system boot 4.12.14-lp150.12 Fri Jan 11 15:21 - 04:23 (6+13:02) reboot system boot 4.12.14-lp150.12 Fri Jan 11 11:06 - 15:20 (04:13) reboot system boot 4.12.14-lp150.12 Wed Jan 9 11:44 - 15:20 (2+03:36) reboot system boot 4.12.14-lp150.12 Mon Jan 7 17:37 - 15:20 (3+21:43)
wtmp begins Mon Jan 7 17:37:11 2019 cer@Telcontar:~>
There are other ways, perhaps. "journalctl -b" shows current boot log, so it starts at the instant your machine booted. And... here:
Isengard:~ # journalctl --list-boots -7 bfc792ccc8ea40e798baee419b078efa Fri 2018-07-20 01:42:31 CEST—Sun 2018-07-22 14:10:22 CEST -6 e251b87ecfb148198330094ccbcad1ab Sun 2018-07-22 19:52:22 CEST—Thu 2018-10-04 22:32:46 CEST -5 4997db0c8a9f4fdf8e5ce960e8b7131d Thu 2018-10-04 22:33:23 CEST—Sat 2018-11-03 18:11:03 CET -4 dd54a34e43b44ca1a9b2a65803b0fc65 Sun 2018-11-04 12:01:47 CET—Sun 2018-11-04 14:47:34 CET -3 db9749e887f44907b3c9dd1cb535c09f Sun 2018-11-04 14:48:32 CET—Sat 2018-12-08 22:12:41 CET -2 05be29aba871400eb2afad996c32676f Sat 2018-12-08 22:13:19 CET—Sat 2018-12-15 20:56:23 CET -1 2ded6e55af6b4d19a4629fd7a35a3c89 Sat 2018-12-15 20:57:00 CET—Sun 2018-12-30 22:53:29 CET 0 2e04665a231c4b52a1ed2da4259bc2b4 Sun 2018-12-30 22:54:17 CET—Wed 2019-02-06 13:45:02 CET Isengard:~ #
Besides that, I have a service that adds entries to the log files that mark when my machine boots or halts, and I also keep a separate log file with boots and hibernations:
cer@Telcontar:~> tail /var/log/Sesiones.log
2019-01-23 15:35:18+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux 2019-01-23 17:46:20+01:00 - Hibernating the system now...
2019-01-24 10:06:44+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux
2019-02-03 13:34:47+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux 2019-02-05 13:52:03+01:00 - Halting the system now =========================================== uptime: 13:52:03 up 2 days 0:18, 0 users, load average: 1.79, 0.90, 0.80
2019-02-05 13:54:57+01:00 - Booting the system now ================================================================================ Linux Telcontar 4.12.14-lp150.12.45-default #1 SMP Mon Jan 14 20:29:59 UTC 2019 (7a62739) x86_64 x86_64 x86_64 GNU/Linux cer@Telcontar:~>
Halts are mostly missing, indicating that the machine is crashing way too often :-(
-- Cheers / Saludos,
Carlos E. R. (from 15.0 x86_64 at Telcontar)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Dave Howorth wrote:
We had a power cut sometime in the last twenty-four hours and I'm trying to find out when. Looked in /var/log/messages but it's so full of cr*p these days I gave up, so I searched and I found <https://www.cyberciti.biz/tips/linux-last-reboot-time-and-date-find-out.html> But when I ran the commands it suggested I got a surprise:
$ who -b system boot 2019-02-06 11:33 $ last reboot reboot system boot 4.12.14-lp150.12 Wed Feb 6 11:33 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 09:45 still running reboot system boot 4.12.14-lp150.12 Sat Oct 6 08:56 - 09:45 (00:48) reboot system boot 4.12.14-lp150.12 Sat Aug 4 13:03 - 09:45 (62+20:41) ... more old entries snipped ...
So it looks like the power fail happened not long before I started looking. But how can there be two 'still running' entries?
Not sure. It looks like who is not using/finding /var/run/utmp and then uses /var/log/wtmp which has all the old history of logins. So likely the system had crashed at some point and not closed the file properly? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Carlos E. R.
-
Dave Howorth
-
Eugen Block
-
Peter Suetterlin