all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v3 manager 1/2] report: overhaul `dmidecode` related output
@ 2024-04-19 16:26 Alexander Zeidler
  2024-04-19 16:26 ` [pve-devel] [PATCH v3 manager 2/2] report: add recent boot timestamps which may show fencing/crash events Alexander Zeidler
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Zeidler @ 2024-04-19 16:26 UTC (permalink / raw)
  To: pve-devel

While using keywords (-t bios,...) would be possible, depending on the
server it also bloats the report with uninteresting information,
hiding the relevant. Therefore the non-grouped, specific number types
are used.

Where we only need specific information, not serial numbers
etc., we print the information from /sys/... which is the same source
that dmidecode uses per default.

New output includes:

 # cat /sys/devices/virtual/dmi/id/sys_vendor
 HP

 # cat /sys/devices/virtual/dmi/id/product_name
 ProLiant·DL380p·Gen8

 # cat /sys/devices/virtual/dmi/id/product_version
 Not·specified

 # cat /sys/devices/virtual/dmi/id/board_vendor
 ASUSTeK·COMPUTER·INC.

 # cat /sys/devices/virtual/dmi/id/board_name
 Z13PP-D32·Series

 # cat /sys/devices/virtual/dmi/id/board_version
 60SB09M0-SB0G11

`-t 0`:
 (like the previous "BIOS" output, but without "BIOS Language" block)

`-t 3`:
 Chassis Information
 	Manufacturer: HP
 	Type: Rack Mount Chassis
 	Boot-up State: Critical
 	Power Supply State: Critical
 	Thermal State: Safe
 	Number Of Power Cords: 2
 	(...)

and

`-t 32`:
System Boot Information
	Status: Firmware-detected hardware failure

which can hint to Proxmox-independant issues, debug-able via IPMI.

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
---
v3:
* as discussed also off-list, switch to `cat` for board and product
  output to avoid complexity

v2: https://lists.proxmox.com/pipermail/pve-devel/2024-April/063284.html
* reformat and extend board output
* add product output
* adapt dmidecode output

v1: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062350.html



 PVE/Report.pm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/PVE/Report.pm b/PVE/Report.pm
index 1ed91c8e..73f14744 100644
--- a/PVE/Report.pm
+++ b/PVE/Report.pm
@@ -110,7 +110,13 @@ my $init_report_cmds = sub {
 	hardware => {
 	    order => 70,
 	    cmds => [
-		'dmidecode -t bios',
+		'cat /sys/devices/virtual/dmi/id/sys_vendor',
+		'cat /sys/devices/virtual/dmi/id/product_name',
+		'cat /sys/devices/virtual/dmi/id/product_version',
+		'cat /sys/devices/virtual/dmi/id/board_vendor',
+		'cat /sys/devices/virtual/dmi/id/board_name',
+		'cat /sys/devices/virtual/dmi/id/board_version',
+		'dmidecode -t 0,3,32',
 		'lspci -nnk',
 	    ],
 	},
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] [PATCH v3 manager 2/2] report: add recent boot timestamps which may show fencing/crash events
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Zeidler @ 2024-04-19 16:26 UTC (permalink / raw)
  To: pve-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-19 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19 16:26 [pve-devel] [PATCH v3 manager 1/2] report: overhaul `dmidecode` related output Alexander Zeidler
2024-04-19 16:26 ` [pve-devel] [PATCH v3 manager 2/2] report: add recent boot timestamps which may show fencing/crash events Alexander Zeidler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal