Following items added to pvereport: * more details about disks * iscsi information * lvm physical volume scan (pvs) * more zfs information * ceph information (only when ceph.conf exists)
When running from command line now report progress is shown at the console (STDERR) --- PVE/Report.pm | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/PVE/Report.pm b/PVE/Report.pm index f04b5733..2f629b58 100644 --- a/PVE/Report.pm +++ b/PVE/Report.pm @@ -60,8 +60,12 @@ my $report_def = { ], disks => [ 'lsblk --ascii', + 'ls -l /dev/disk/by-*/', + 'iscsiadm -m node', + 'iscsiadm -m session', ], volumes => [ + 'pvs', 'lvs', 'vgs', ], @@ -70,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 tree', 'ceph df', 'pveceph status', 'pveceph pool ls', $crbd; +} push @{$report_def->{disk}}, 'multipath -ll', 'multipath -v3' if cmd_exists('multipath'); @@ -118,19 +129,26 @@ 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); } else { + + $report .= "\n# $command\n"; PVE::Tools::run_command($command, %$run_cmd_params); } + print STDERR "OK"; }; + print STDERR "\n"; $report .= "\nERROR: $@\n" if $@; } } - - return $report; + + return $report; } 1; -- 2.17.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel