my ($target_dir, $regexp) = @_;
print STDERR "dir2text '${target_dir}${regexp}'...";
- my $text = '';
+ my $text = "# output '${target_dir}${regexp}' file(s)\n";
PVE::Tools::dir_glob_foreach($target_dir, $regexp, sub {
my ($file) = @_;
+ return if $file eq '.' || $file eq '..';
$text .= "\n# cat $target_dir$file\n";
$text .= PVE::Tools::file_get_contents($target_dir.$file)."\n";
});
order => 10,
cmds => [
'hostname',
+ 'date -R',
'pveversion --verbose',
'cat /etc/hosts',
- 'top -b -n 1 | head -n 15',
'pvesubscription get',
'cat /etc/apt/sources.list',
sub { dir2text('/etc/apt/sources.list.d/', '.*list') },
sub { dir2text('/etc/apt/sources.list.d/', '.*sources') },
'lscpu',
- 'head /proc/pressure/*',
'pvesh get /cluster/resources --type node --output-format=yaml',
],
},
+ 'system-load' => {
+ title => 'overall system load info',
+ order => 20,
+ cmds => [
+ 'top -b -c -w512 -n 1 -o TIME | head -n 30',
+ 'head /proc/pressure/*',
+ ],
+ },
storage => {
order => 30,
cmds => [
'pvesm status',
'cat /etc/fstab',
'findmnt --ascii',
- 'df --human',
+ 'df --human -T',
+ 'proxmox-boot-tool status',
],
},
'virtual guests' => {
],
},
network => {
- order => 40,
+ order => 45,
cmds => [
'ip -details -statistics address',
'ip -details -4 route show',
'ip -details -6 route show',
'cat /etc/network/interfaces',
+ sub { dir2text('/etc/network/interfaces.d/', '.*') },
+ sub { dir2text('/etc/pve/sdn/', '.*') },
],
},
firewall => {
cmds => [
sub { dir2text('/etc/pve/firewall/', '.*fw') },
'cat /etc/pve/local/host.fw',
- 'iptables-save',
+ 'iptables-save -c | column -t -l4 -o" "',
],
},
cluster => {
'pvecm status',
'cat /etc/pve/corosync.conf 2>/dev/null',
'ha-manager status',
+ 'cat /etc/pve/datacenter.cfg',
],
},
- bios => {
+ hardware => {
order => 70,
cmds => [
'dmidecode -t bios',
- ],
- },
- pci => {
- order => 75,
- cmds => [
'lspci -nnk',
],
},
- disks => {
+ 'block devices' => {
order => 80,
cmds => [
- 'lsblk --ascii',
+ 'lsblk --ascii -M -o +HOTPLUG,ROTA,PHY-SEC,FSTYPE,MODEL,TRAN',
'ls -l /dev/disk/by-*/',
'iscsiadm -m node',
'iscsiadm -m session',
'zpool status',
'zpool list -v',
'zfs list',
+ 'arcstat',
;
}
'ceph osd status',
'ceph df',
'ceph osd df tree',
+ 'ceph device ls',
'cat /etc/ceph/ceph.conf',
'ceph config dump',
'pveceph pool ls',
'ceph versions',
+ 'ceph health detail',
;
}