[pve-devel] [PATCH v2 manager] Add Ceph, iscsi and more disk and zfs information to pvereport
Friedrich Ramberger
f.ramberger at proxmox.com
Wed Apr 3 10:25:06 CEST 2019
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)
---
v2:
avoid whitespace errors in the patch
PVE/Report.pm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/PVE/Report.pm b/PVE/Report.pm
index a7c77050..e4f18dd8 100644
--- a/PVE/Report.pm
+++ b/PVE/Report.pm
@@ -60,6 +60,9 @@ my $report_def = {
],
disks => [
'lsblk --ascii',
+ 'ls -l /dev/disk/by-*/',
+ 'iscsiadm -m node',
+ 'iscsiadm -m session',
],
volumes => [
'pvs',
@@ -71,7 +74,14 @@ my $report_def = {
my @report_order = ('general', 'storage', 'virtual guests', 'network',
'firewall', 'cluster', 'bios', 'pci', 'disks', 'volumes');
-push @{$report_def->{volumes}}, 'zpool status', 'zfs list' if cmd_exists('zfs');
+push @{$report_def->{volumes}}, 'zpool status', 'zpool list -v', 'zfs list' if cmd_exists('zfs');
+
+
+if (-e '/etc/ceph/ceph.conf') {
+ my $crbd = eval "`ceph osd pool ls | sed -e 's/^/echo /' | sed 'p;s/echo/rbd ls/g'`";
+
+ push @{$report_def->{volumes}}, 'ceph status', 'ceph osd status', 'ceph df', 'pveceph status', 'pveceph lspools', $crbd;
+}
push @{$report_def->{disk}}, 'multipath -ll', 'multipath -v3' if cmd_exists('multipath');
@@ -119,6 +129,7 @@ sub generate {
$report .= "\n==== $title ====\n";
foreach my $command (@$commands) {
+ print STDERR "Process ".$command."...";
eval {
if (ref $command eq 'CODE') {
PVE::Tools::run_with_timeout($cmd_timeout, $command);
@@ -126,7 +137,9 @@ sub generate {
$report .= "\n# $command\n";
PVE::Tools::run_command($command, %$run_cmd_params);
}
+ print STDERR "OK";
};
+ print STDERR "\n";
$report .= "\nERROR: $@\n" if $@;
}
}
--
2.17.1
More information about the pve-devel
mailing list