44 Commits

Author SHA1 Message Date
Aaron Lauterer
c46eb47e53 report: add arcstat
One of the infos, that can sometimes be usable.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-10-19 07:49:45 +02:00
Stoiko Ivanov
c5b25c00ff report: stabilize order of guests and network
both categories have '40' as their order - leading to random swaps
between those 2 categories in the actual report.

I only increased the order of network, instead of renumerating all
succeeding categories by 10 (mostly for better readability of the
patch)

Suggested-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2022-09-12 16:04:18 +02:00
Stoiko Ivanov
ef09450c1d report: add proxmox-boot-tool status output
while needed seldomly we had a few cases recently where this would
have saved the user and us one roundtrip.

adding to storage, to be close to the `findmnt` output (which usually
tells us if the system is booted in efi or legacy mode)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2022-09-12 16:04:18 +02:00
Aaron Lauterer
ea4d55c99d report: add ceph device list
Can help a lot to identify which OSD is using which physical disk

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-06-02 09:09:58 +02:00
Thomas Lamprecht
c4c3ed73e1 report: lsblk: merge/group parents of sub-trees
can cut down lines outputted, especially on lvm-thin or other systems
that have volumes listed duplicated. E.g.,

Note, if nothing can be merged the output is 1:1 the same as before,
so seems like a win-win to me.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-30 15:33:13 +02:00
Thomas Lamprecht
ef01a35173 report: lsblk: output more columns
Output columns that can help on debugging (e.g., physical sector
size, hot-pluggable, rotational, transport) or make it easier to
cross-correlate (model, fs-type)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-30 15:33:00 +02:00
Thomas Lamprecht
80e456f655 report: report FS type in df call
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-30 15:24:23 +02:00
Thomas Lamprecht
cdb638259d report: top: also print command line arguments
at least the first 512 characters, which is the biggest width one can
instruct `top` too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 16:27:30 +02:00
Thomas Lamprecht
bc415cf7cf report: top: list more processes and order them by CPU time spent
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 16:27:30 +02:00
Thomas Lamprecht
8b94e6bbd4 report: re-organize: add systemd-load, unify bios/pci in HW one
Also rename disks to blockdevices, as especially with the iSCSI stuff
the listed devices do not necessarily need to be real disks.

Grouping current(ish) load info in it's own system-load section seems
to be a better fit in general too.

bios/pci stuff is all hardware, so group it there to avoid adding to
much sections.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 16:27:30 +02:00
Thomas Lamprecht
6b72e9dd74 report: dir2text: print what we process on STDERR
to avoid those "lonely" "OK" prints for those

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 15:12:18 +02:00
Thomas Lamprecht
f784b92573 report: avoid extra oder array, define it inline
Makes all report-def entries hashes which allows to drop some
handling for the ARRAY ref case.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 15:02:38 +02:00
Thomas Lamprecht
3a0b2c40d2 report: avoid adding to report by side-effects, be more explicit
And move the helper methods up and scope them to module-local only

Uses the fact that perl methods return the last statement, so the
dir2text sub closures in the command list do not need to be changed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 14:28:47 +02:00
Thomas Lamprecht
73cdcc98be report: set timeout and PATH env only locally
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 14:27:40 +02:00
Thomas Lamprecht
fb925d656a report: whitespace cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-11 14:26:15 +02:00
Oguz Bektas
4befa0abe0 pvereport: get pressure stall information
PSI can be queried in /proc/pressure/{cpu,io,memory} for the
corresponding resources. this helps us track down disruptions caused
by resource overcommitment.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-05-11 14:07:25 +02:00
Mira Limbeck
1226cd97f9 report: add multipath.conf and wwids file
These 2 files can be helpful for issues with multipath. The multipath -v3
output is too large most of the time and not required for analyzing and
solving the issues.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2021-04-16 15:20:40 +02:00
Fabian Ebner
8672c64e90 pvereport: also add .sources files
while this format is probably not much in use currently, the plan is to make it
the default format in Debian, see 'man 5 sources.list'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-01-28 16:44:39 +01:00
Stoiko Ivanov
ea717e8f66 pvereport: add apt sources
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-01-26 18:45:52 +01:00
Thomas Lamprecht
c83c3d456d report: fix separation of commands over multiple lines
once we get over the allowed line length we must move each atom
(e.g., argument or other value) to a separate line, not pairing a
few.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-12-21 17:00:49 +01:00
Aaron Lauterer
583516aee7 pvereport: code cleanup, line length
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-21 16:54:34 +01:00
Aaron Lauterer
efef17e0ec pvereport: rework report contents
add:
* HA status
* ceph osd df tree
* ceph conf file and conf db
* ceph versions

removed:
* ceph status, as pveceph status is now printing the same information

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-21 16:54:34 +01:00
Aaron Lauterer
662a87e559 pvereport: fix multipath inclusion
we now push it to the correct hash if it is installed

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2020-12-21 16:54:34 +01:00
Thomas Lamprecht
75cac2797f perlcritic fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-22 18:18:35 +02:00
Thomas Lamprecht
180a86d39a pvecfg: adapt version and release semantic
Wit commit a74ba607d4b02c5734c5480de62700f52f96ac71 we switched over
to using the dpkg-dev provided helpers to set package version,
architecture and such in the buildsystem.

But unlike other repositories we used the version also for giving it
back over the API through the during build generated PVE::pvecfg
module, which wasn't fully updated to the new style.

This patch does that, and also cleans up semantics a bit, the
following two changed:

release is now the Debian release, instead of the "package release"
(i.e., the -X part of a full package version).
version is now simply the full (pve-manager) version, e.g., 6.0-1 or
the currently for testing used 6.0-0+1

This allows to do everything we used this information for even in a
slightly easier way (no  string concat needed anymore), and fits also
with the terminology we often used in our public channels (mailing
lists, forum, website)

Remove some cruft as we touch things.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 16:11:43 +02:00
Thomas Lamprecht
01c8f6fe7d pvereport: only comput report def if we generate a report.
it's really not a good idea to start doing exec, file exist checks,
... on every module load of this, this may even hang completely
differen parts if something pull us in, and confuse one completely...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reported-by: Wolfgang Link <w.link@proxmox.com>
2019-04-08 12:25:59 +02:00
Thomas Lamprecht
2bdf85f84c fixup whitespaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-04-03 12:56:28 +02:00
Friedrich Ramberger
1cf7db21c5 Add Ceph, iscsi and more disk and zfs information to pvereport
Following items added to pvereport:

* more details about disks
* iscsi information
* more zfs information
* ceph information (only when ceph.conf exists)

When running from command line now report progress is shown at the console (STDERR)
2019-04-03 12:53:05 +02:00
Oguz Bektas
5c1c3a536c add 'pvs' to pvereport
get information about physical volumes

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2019-03-28 14:12:22 +01:00
Thomas Lamprecht
6539859680 pvereport: ensure IPv6 and IPv4 route info is included
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reported-by: Mira Limbeck <m.limbeck@proxmox.com>
2019-03-13 14:59:41 +01:00
Thomas Lamprecht
f46065685b pvereport: add cluster resources node information
gives a good overview over the cluster, which nodes are online,
memory/cpu load, uptime...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-13 13:49:55 +01:00
Thomas Lamprecht
44a3f31639 pvereport: add ip route information
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-03-13 13:49:55 +01:00
Tim Marx
b5f7824ff4 add host firewall config to pvereport
Signed-off-by: Tim Marx <t.marx@proxmox.com>
2019-03-13 13:47:30 +01:00
Thomas Lamprecht
17b7459397 Report: add info about PCI devices
Good to have when a NIC or other peripheral devices does not works.

Flags used:
-k  Show kernel drivers handling each device and also kernel modules
    capable of handling it.
-nn Show PCI vendor and device codes as both numbers and names.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 09:03:48 +01:00
Thomas Lamprecht
8e363beedb Report: add pct list
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 09:03:48 +01:00
Thomas Lamprecht
a080141497 Report: use findmnt instead of mount
much easier to parse visually while keeping the same amount of
information

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 09:03:48 +01:00
Thomas Lamprecht
2c4ef55e21 Report: refactor to simple schema definition of subreports
Easier to add new commands, or change flags of existing ones.

Use an hash for top level definition as we can push optional commands
easier there than in an array, it resembles also more our normal
schema definitions.

Add a truth-y value at the bottom, to ensure perls require is happy
with this module.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 09:03:48 +01:00
Thomas Lamprecht
ed1fafc472 Report: remove useless version check
this is packaged with pve-manager and runs locally on the node,
so we're pretty sure that the version is the one from pve-manager
anyway, this check just makes no sense...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-03-22 09:03:48 +01:00
Thomas Lamprecht
ee3a898983 pvereport: improve output and add timeouts to commands
Each command may not run longer than 10 seconds. This avoids
situations where no output gets generated because of a infinitely
hanging command (e.g. check for dead NFS storage)
Also ensure that commands are separated with a new line from each
other to improve readability.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-06-21 07:45:22 +02:00
Emmanuel Kasper
245859bd83 Use ip from iproute2 package instead of net-tools
iproute2 is a direct depency from pve-qemu-kvm and should
be always available

use -statistics so we get the RX/TX traffic sum like ifconfig
use -details to get extra info like current vlan_protocol
2017-02-08 10:00:55 +01:00
Thomas Lamprecht
5e3fd48d19 pvereport: tell lsblk to use ascii
The UTF-8 characters it uses otherwise may be not handled correctly
when some users sent the report to us.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-30 06:11:39 +01:00
Emmanuel Kasper
470c35151c Fix #1186: do not run non installed commands
Conditionnally add commands which are not:
*  Debian packages whith priority Essential or Important,
* a dependency of pve-manager
2016-10-28 11:54:01 +02:00
Wolfgang Link
8c9e7b5ad3 Add some extra debug information to the report.
There were no useful information about block device.
2016-07-05 12:30:00 +02:00
Emmanuel Kasper
2f7faeed28 Move pvereport functionality into a separate PVE package 2015-11-03 18:10:22 +01:00