From: Alexander Zeidler <a.zeidler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v3 manager 2/2] report: add recent boot timestamps which may show fencing/crash events
Date: Fri, 19 Apr 2024 18:26:42 +0200 [thread overview]
Message-ID: <20240419162642.260130-2-a.zeidler@proxmox.com> (raw)
In-Reply-To: <20240419162642.260130-1-a.zeidler@proxmox.com>
Successful boots which crashed somehow and sometime afterwards, will
show the same "until" value ("still running" or timestamp) as the next
following boot(s). The most recent boot from such a sequence of
duplicated "until" lines, has not been crashed or not yet.
Example output where only the boot from 16:25:41 crashed:
reboot system boot 6.5.11-7-pve Thu Apr 11 16:31:24 2024 still running
reboot system boot 6.5.11-7-pve Thu Apr 11 16:29:17 2024 - Thu Apr 11 16:31:12 2024 (00:01)
reboot system boot 6.5.11-7-pve Thu Apr 11 16:25:41 2024 - Thu Apr 11 16:31:12 2024 (00:05)
...
Furthermore, it shows the booted/crashed/problematic kernel version.
`last` is also used since currently `journalctl --list-boots` can take
10 seconds or even longer on some systems, with no option to limit the
amount of reported boot lines.
Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
---
v3:
* place the cmd after pveversion due to priority reasons
v2: https://lists.proxmox.com/pipermail/pve-devel/2024-April/063286.html
* move away from dmesg base
* list also recent (5) boot timestamps with additional information
v1: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062342.html
PVE/Report.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/Report.pm b/PVE/Report.pm
index 73f14744..9a8eaa4b 100644
--- a/PVE/Report.pm
+++ b/PVE/Report.pm
@@ -33,6 +33,7 @@ my $init_report_cmds = sub {
'date -R',
'cat /proc/cmdline',
'pveversion --verbose',
+ 'last reboot -F -n5',
'cat /etc/hosts',
'pvesubscription get',
'cat /etc/apt/sources.list',
--
2.39.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2024-04-19 16:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 16:26 [pve-devel] [PATCH v3 manager 1/2] report: overhaul `dmidecode` related output Alexander Zeidler
2024-04-19 16:26 ` Alexander Zeidler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240419162642.260130-2-a.zeidler@proxmox.com \
--to=a.zeidler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox