sosreport / sos

A unified tool for collecting system logs and other debug information
http://sos.rtfd.org
GNU General Public License v2.0
508 stars 543 forks source link

option --only-plugins does not work #2913

Closed anxstj closed 2 years ago

anxstj commented 2 years ago

I like to execute only one plugin and it seems that -o | --only-plugins should be used for that purpose. But

# sos report --only-plugins yum --dry-run

sosreport (version 4.3)

WARNING: unable to set option for disabled or non-existing plugin (boot).

This command will collect diagnostic and configuration information from
this CentOS system and installed applications.

An archive containing the collected information will be generated in
/var/tmp/sos.3uzrisxk and may be provided to a CentOS support
representative.

Any information provided to CentOS will be treated in accordance with
the published support policies at:

        Community Website : https://www.centos.org/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.

Press ENTER to continue, or CTRL-C to quit.

Optionally, please enter the case id that you are generating this report for []: 

 Setting up archive ...
 Setting up plugins ...
[plugin:anaconda] skipped command 'rpm -V ': (dry run)
[plugin:block] skipped command 'lsblk': (dry run)
[plugin:block] skipped command 'lsblk -t': (dry run)
[plugin:block] skipped command 'lsblk -D': (dry run)
[plugin:block] skipped command 'blkid -c /dev/null': (dry run)
[plugin:block] skipped command 'blockdev --report': (dry run)
[plugin:block] skipped command 'ls -lanR /dev': (dry run)
[plugin:block] skipped command 'ls -lanR /sys/block': (dry run)
[plugin:block] skipped command 'lsblk -O -P': (dry run)
[plugin:block] skipped command 'losetup -a': (dry run)
[plugin:block] skipped command 'parted -s /dev/dm-1 unit s print': (dry run)
[plugin:block] skipped command 'parted -s /dev/sr0 unit s print': (dry run)
[plugin:block] skipped command 'parted -s /dev/dm-0 unit s print': (dry run)
[plugin:block] skipped command 'parted -s /dev/sda unit s print': (dry run)
[plugin:block] skipped command 'fdisk -l /dev/dm-1': (dry run)
[plugin:block] skipped command 'fdisk -l /dev/sr0': (dry run)
[plugin:block] skipped command 'fdisk -l /dev/dm-0': (dry run)
[plugin:block] skipped command 'fdisk -l /dev/sda': (dry run)
[plugin:block] skipped command 'udevadm info /dev/dm-1': (dry run)
[plugin:block] skipped command 'udevadm info /dev/sr0': (dry run)
[plugin:block] skipped command 'udevadm info /dev/dm-0': (dry run)
[plugin:block] skipped command 'udevadm info /dev/sda': (dry run)
[plugin:block] skipped command 'udevadm info -a /dev/dm-1': (dry run)
[plugin:block] skipped command 'udevadm info -a /dev/sr0': (dry run)
[plugin:block] skipped command 'udevadm info -a /dev/dm-0': (dry run)
[plugin:block] skipped command 'udevadm info -a /dev/sda': (dry run)
[plugin:block] skipped command 'lsblk -f -a -l': (dry run)
[plugin:block] skipped command 'rpm -V util-linux-core util-linux': (dry run)
[plugin:cgroups] skipped command 'systemd-cgls': (dry run)
[plugin:crypto] skipped command 'fips-mode-setup --check': (dry run)
[plugin:crypto] skipped command 'update-crypto-policies --show': (dry run)
[plugin:crypto] skipped command 'update-crypto-policies --is-applied': (dry run)
[plugin:dbus] skipped command 'busctl list --no-pager': (dry run)
[plugin:dbus] skipped command 'busctl status': (dry run)
[plugin:dbus] skipped command 'rpm -V dbus': (dry run)
[plugin:devicemapper] skipped command 'dmsetup info -c': (dry run)
[plugin:devicemapper] skipped command 'dmsetup table': (dry run)
[plugin:devicemapper] skipped command 'dmsetup status': (dry run)
[plugin:devicemapper] skipped command 'dmsetup ls --tree': (dry run)
[plugin:devicemapper] skipped command 'dmsetup udevcookies': (dry run)
[plugin:devicemapper] skipped command 'dmstats list': (dry run)
[plugin:devicemapper] skipped command 'dmstats print --allregions': (dry run)
[plugin:devicemapper] skipped command 'rpm -V device-mapper': (dry run)
[plugin:devices] skipped command 'udevadm info --export-db': (dry run)
[plugin:devices] skipped command 'rpm -V ': (dry run)
[plugin:dnf] skipped command 'dnf --assumeno module list': (dry run)
[plugin:dnf] skipped command 'dnf --version': (dry run)
[plugin:dnf] skipped command 'dnf --assumeno list installed *dnf*': (dry run)
[plugin:dnf] skipped command 'dnf --assumeno list extras': (dry run)
[plugin:dnf] skipped command 'package-cleanup --dupes': (dry run)
[plugin:dnf] skipped command 'package-cleanup --problems': (dry run)
[plugin:dnf] skipped command 'dnf --assumeno module list --installed': (dry run)
[plugin:dnf] skipped command 'rpm -V dnf': (dry run)
[plugin:ebpf] skipped command 'bpftool -j prog list': (dry run)
[plugin:ebpf] skipped command 'bpftool -j map list': (dry run)
[plugin:ebpf] skipped command 'bpftool prog list': (dry run)
[plugin:ebpf] skipped command 'bpftool map list': (dry run)
[plugin:ebpf] skipped command 'bpftool cgroup tree': (dry run)
[plugin:ebpf] skipped command 'bpftool net list': (dry run)
[plugin:ebpf] skipped command 'bpftool struct_ops dump': (dry run)
[plugin:filesys] skipped command 'mount -l': (dry run)
[plugin:filesys] skipped command 'df -al -x autofs': (dry run)
[plugin:filesys] skipped command 'df -ali -x autofs': (dry run)
[plugin:filesys] skipped command 'findmnt': (dry run)
[plugin:filesys] skipped command 'lslocks': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'dumpe2fs -h /dev/mapper/system-root': (dry run)
[plugin:filesys] skipped command 'ls -ltradZ /tmp': (dry run)
[plugin:firewall_tables] skipped command 'nft list ruleset': (dry run) Use '--allow-system-changes' to enable collection.
[plugin:firewall_tables] skipped command 'iptables -vnxL': required kmods missing: iptable_filter.  (dry run)
[plugin:firewall_tables] skipped command 'ip6tables -vnxL': required kmods missing: ip6table_filter.  (dry run)
[plugin:hardware] skipped command 'dmidecode': (dry run)
[plugin:hardware] skipped command 'lshw': (dry run)
[plugin:host] skipped command 'hostname': (dry run)
[plugin:host] skipped command 'uptime': (dry run)
[plugin:host] skipped command 'hostname -f': (dry run)
[plugin:host] skipped command 'hostid': (dry run)
[plugin:host] skipped command 'hostnamectl status': (dry run)
[plugin:i18n] skipped command 'locale': (dry run)
[plugin:kernel] skipped command 'uname -a': (dry run)
[plugin:kernel] skipped command 'lsmod': (dry run)
[plugin:kernel] skipped command 'ls -lt /sys/kernel/slab': (dry run)
[plugin:kernel] skipped command 'modinfo thermal cpuidle cryptomgr spurious edac_core ata_piix xt_conntrack vt nf_conntrack crct10dif_common tcp_cubic nmi_backtrace xen 8250 cryptd ac shpchp crypto_simd nfnetlink srcutree rcupdate random rtc_cmos nf_nat vmw_vmci bridge nft_compat device_hmem pstore sysrq vmw_vsock_virtio_transport_common cdrom overlay processor scsi_mod kernel mbcache page_alloc crc32c_generic crc16 xt_tcpudp mousedev br_netfilter nf_defrag_ipv6 vsock vmw_pvscsi veth pciehp pci_hotplug gpiolib_acpi spidev sd_mod libaes xt_addrtype glue_helper dynamic_debug nf_defrag_ipv4 intel_rapl_msr ata_generic intel_idle libcrc32c vmw_balloon xt_nat keyboard zswap xfrm_algo serio_raw fb netpoll apparmor evdev crct10dif_generic ghash_clmulni_intel blk_cgroup vsock_loopback pcie_aspm joydev syscall cpufreq t10_pi ipv6 slab_common suspend autofs4 crc_t10dif fuse acpiphp nf_conntrack_netlink nf_tables configfs ext4 x_tables vmxnet3 rcutree nft_counter button llc aesni_intel block crct10dif_pclmul xz_dec nft_chain_nat rapl dm_mod crc32c_intel cpuidle_haltpoll libata sg psmouse ip_tables i8042 module intel_rapl_common i2c_piix4 firmware_class xfrm_user vmw_vsock_vmci_transport xt_MASQUERADE acpi clocksource fscrypto stp crc32_pclmul printk pcspkr xen_kbdfront workqueue sr_mod jbd2 drm': (dry run)
[plugin:kernel] skipped command 'dmesg': (dry run)
[plugin:kernel] skipped command 'sysctl -a': (dry run)
[plugin:kernel] skipped command 'dkms status': (dry run)
[plugin:kernel] skipped command 'rpm -V ': (dry run)
[plugin:krb5] skipped command 'klist -ket /var/kerberos/krb5kdc/.k5*': (dry run)
[plugin:krb5] skipped command 'klist -ket /etc/krb5.keytab': (dry run)
[plugin:krb5] skipped command 'rpm -V krb5-libs': (dry run)
[plugin:ldap] skipped command 'certutil -L -d /etc/openldap': (dry run)
[plugin:ldap] skipped command 'rpm -V openldap': (dry run)
[plugin:libraries] skipped command 'ldconfig -p -N -X': (dry run)
[plugin:libvirt] skipped command 'ls -lR /var/lib/libvirt/qemu': (dry run)
[plugin:login] skipped command 'last': (dry run)
[plugin:login] skipped command 'last reboot': (dry run)
[plugin:login] skipped command 'last shutdown': (dry run)
[plugin:login] skipped command 'lastlog': (dry run)
[plugin:login] skipped command 'lastlog -u 0-999': (dry run)
[plugin:login] skipped command 'lastlog -u 1000-60000': (dry run)
[plugin:login] skipped command 'lastlog -u 60001-65536': (dry run)
[plugin:login] skipped command 'lastlog -u 65537-4294967295': (dry run)
[plugin:logrotate] skipped command 'logrotate --debug /etc/logrotate.conf': (dry run)
[plugin:logs] skipped command 'journalctl --disk-usage': (dry run)
[plugin:logs] skipped command 'ls -alRh /var/log/': (dry run)
[plugin:lvm2] skipped command 'vgdisplay -vv --config="global{locking_type=0 metadata_read_only=1}" --foreign': (dry run)
[plugin:lvm2] skipped command 'vgscan -vvv --config="global{locking_type=0 metadata_read_only=1}"': (dry run)
[plugin:lvm2] skipped command 'pvscan -v --config="global{locking_type=0 metadata_read_only=1}"': (dry run)
[plugin:lvm2] skipped command 'pvs -a -v -o +pv_mda_free,pv_mda_size,pv_mda_count,pv_mda_used_count,pe_start --config="global{locking_type=0 metadata_read_only=1}" --foreign': (dry run)
[plugin:lvm2] skipped command 'vgs -v -o +vg_mda_count,vg_mda_free,vg_mda_size,vg_mda_used_count,vg_tags,systemid --config="global{locking_type=0 metadata_read_only=1}" --foreign': (dry run)
[plugin:lvm2] skipped command 'lvs -a -o +lv_tags,devices,lv_kernel_read_ahead,lv_read_ahead,stripes,stripesize --config="global{locking_type=0 metadata_read_only=1}" --foreign': (dry run)
[plugin:md] skipped command 'mdadm -D /dev/md*': (dry run)
[plugin:md] skipped command 'mdadm -E /dev/dm-1': (dry run)
[plugin:md] skipped command 'mdadm -E /dev/sr0': (dry run)
[plugin:md] skipped command 'mdadm -E /dev/dm-0': (dry run)
[plugin:md] skipped command 'mdadm -E /dev/sda': (dry run)
[plugin:memory] skipped command 'free': (dry run)
[plugin:memory] skipped command 'free -m': (dry run)
[plugin:memory] skipped command 'swapon --bytes --show': (dry run)
[plugin:memory] skipped command 'swapon --summary --verbose': (dry run)
[plugin:memory] skipped command 'lsmem -a -o RANGE,SIZE,STATE,REMOVABLE,ZONES,NODE,BLOCK': (dry run)
[plugin:memory] skipped command 'slabtop -o': (dry run)
[plugin:multipath] skipped command 'multipath -ll': (dry run)
[plugin:multipath] skipped command 'multipath -v4 -ll': (dry run)
[plugin:multipath] skipped command 'multipath -t': (dry run)
[plugin:multipath] skipped command 'multipathd show config': (dry run)
[plugin:networking] skipped command 'ip -o addr': (dry run)
[plugin:networking] skipped command 'route -n': (dry run)
[plugin:networking] skipped command 'plotnetcfg': (dry run)
[plugin:networking] skipped command 'netstat -W -neopa': (dry run)
[plugin:networking] skipped command 'nstat -zas': (dry run)
[plugin:networking] skipped command 'netstat -s': (dry run)
[plugin:networking] skipped command 'netstat -W -agn': (dry run)
[plugin:networking] skipped command 'networkctl status -a': (dry run)
[plugin:networking] skipped command 'ip route show table all': (dry run)
[plugin:networking] skipped command 'ip -6 route show table all': (dry run)
[plugin:networking] skipped command 'ip -d route show cache': (dry run)
[plugin:networking] skipped command 'ip -d -6 route show cache': (dry run)
[plugin:networking] skipped command 'ip -4 rule': (dry run)
[plugin:networking] skipped command 'ip -6 rule': (dry run)
[plugin:networking] skipped command 'ip -s -d link': (dry run)
[plugin:networking] skipped command 'ip -d address': (dry run)
[plugin:networking] skipped command 'ifenslave -a': (dry run)
[plugin:networking] skipped command 'ip mroute show': (dry run)
[plugin:networking] skipped command 'ip maddr show': (dry run)
[plugin:networking] skipped command 'ip -s -s neigh show': (dry run)
[plugin:networking] skipped command 'ip neigh show nud noarp': (dry run)
[plugin:networking] skipped command 'biosdevname -d': (dry run)
[plugin:networking] skipped command 'tc -s qdisc show': (dry run)
[plugin:networking] skipped command 'devlink dev param show': (dry run)
[plugin:networking] skipped command 'devlink dev info': (dry run)
[plugin:networking] skipped command 'devlink port show': (dry run)
[plugin:networking] skipped command 'devlink dev': (dry run)
[plugin:networking] skipped command 'ip -s macsec show': required kmods missing: macsec.  (dry run) Use '--allow-system-changes' to enable collection.
[plugin:networking] skipped command 'ss -peaonmi': required kmods missing: udp_diag, tcp_diag, af_packet_diag, unix_diag, xsk_diag, inet_diag, netlink_diag.  (dry run) Use '--allow-system-changes' to enable collection.
[plugin:networking] skipped command 'ethtool -a eth0': (dry run)
[plugin:networking] skipped command 'ethtool -c eth0': (dry run)
[plugin:networking] skipped command 'ethtool -d eth0': (dry run)
[plugin:networking] skipped command 'ethtool -g eth0': (dry run)
[plugin:networking] skipped command 'ethtool -i eth0': (dry run)
[plugin:networking] skipped command 'ethtool -k eth0': (dry run)
[plugin:networking] skipped command 'ethtool -l eth0': (dry run)
[plugin:networking] skipped command 'ethtool -m eth0': (dry run)
[plugin:networking] skipped command 'ethtool -P eth0': (dry run)
[plugin:networking] skipped command 'ethtool -S eth0': (dry run)
[plugin:networking] skipped command 'ethtool -T eth0': (dry run)
[plugin:networking] skipped command 'ethtool eth0': (dry run)
[plugin:networking] skipped command 'ethtool --phy-statistics eth0': (dry run)
[plugin:networking] skipped command 'ethtool --show-priv-flags eth0': (dry run)
[plugin:networking] skipped command 'ethtool --show-eee eth0': (dry run)
[plugin:networking] skipped command 'tc -s filter show dev eth0': (dry run)
[plugin:networking] skipped command 'tc -s filter show dev eth0 ingress': (dry run)
[plugin:networking] skipped command 'ethtool -a lo': (dry run)
[plugin:networking] skipped command 'ethtool -c lo': (dry run)
[plugin:networking] skipped command 'ethtool -d lo': (dry run)
[plugin:networking] skipped command 'ethtool -g lo': (dry run)
[plugin:networking] skipped command 'ethtool -i lo': (dry run)
[plugin:networking] skipped command 'ethtool -k lo': (dry run)
[plugin:networking] skipped command 'ethtool -l lo': (dry run)
[plugin:networking] skipped command 'ethtool -m lo': (dry run)
[plugin:networking] skipped command 'ethtool -P lo': (dry run)
[plugin:networking] skipped command 'ethtool -S lo': (dry run)
[plugin:networking] skipped command 'ethtool -T lo': (dry run)
[plugin:networking] skipped command 'ethtool lo': (dry run)
[plugin:networking] skipped command 'ethtool --phy-statistics lo': (dry run)
[plugin:networking] skipped command 'ethtool --show-priv-flags lo': (dry run)
[plugin:networking] skipped command 'ethtool --show-eee lo': (dry run)
[plugin:networking] skipped command 'tc -s filter show dev lo': (dry run)
[plugin:networking] skipped command 'tc -s filter show dev lo ingress': (dry run)
[plugin:networking] skipped command 'bridge -s -s -d link show': (dry run)
[plugin:networking] skipped command 'bridge -s -s -d -t fdb show': (dry run)
[plugin:networking] skipped command 'bridge -s -s -d -t mdb show': (dry run)
[plugin:networking] skipped command 'bridge -d vlan show': (dry run)
[plugin:networking] skipped command 'ip netns': (dry run)
[plugin:pam] skipped command 'ls -lanF /lib*/security': (dry run)
[plugin:pam] skipped command 'pam_tally2': (dry run)
[plugin:pam] skipped command 'faillock': (dry run)
[plugin:pam] skipped command 'rpm -V ': (dry run)
[plugin:pci] skipped command 'lspci -nnvv': (dry run)
[plugin:pci] skipped command 'lspci -tv': (dry run)
[plugin:process] skipped command 'ps auxwwwm': (dry run)
[plugin:process] skipped command 'pstree -lp': (dry run)
[plugin:process] skipped command 'lsof +M -n -l -c ''': (dry run)
[plugin:process] skipped command 'ps alxwww': (dry run)
[plugin:process] skipped command 'ps -elfL': (dry run)
[plugin:process] skipped command 'ps axo pid,ppid,user,group,lwp,nlwp,start_time,comm,cgroup': (dry run)
[plugin:process] skipped command 'ps axo flags,state,uid,pid,ppid,pgid,sid,cls,pri,addr,sz,wchan:20,lstart,tty,time,cmd': (dry run)
[plugin:process] skipped command 'iotop -b -o -d 0.5 -t -n 20': (dry run)
[plugin:process] skipped command 'pidstat -p ALL -rudvwsRU --human -h': (dry run)
[plugin:process] skipped command 'pidstat -tl': (dry run)
[plugin:processor] skipped command 'lscpu': (dry run)
[plugin:processor] skipped command 'lscpu -ae': (dry run)
[plugin:processor] skipped command 'cpupower info': (dry run)
[plugin:processor] skipped command 'cpupower idle-info': (dry run)
[plugin:processor] skipped command 'cpupower frequency-info': (dry run)
[plugin:processor] skipped command 'cpufreq-info': (dry run)
[plugin:processor] skipped command 'cpuid': (dry run)
[plugin:processor] skipped command 'cpuid -r': (dry run)
[plugin:processor] skipped command 'turbostat --debug sleep 10': (dry run)
[plugin:processor] skipped command 'x86info -a': (dry run)
[plugin:processor] skipped command 'rpm -V ': (dry run)
[plugin:python] skipped command 'python2 -V': (dry run)
[plugin:python] skipped command 'python3 -V': (dry run)
[plugin:python] skipped command 'python -V': (dry run)
[plugin:python] skipped command 'rpm -V python3': (dry run)
[plugin:release] skipped command 'lsb_release -a': (dry run)
[plugin:release] skipped command 'lsb_release -d': (dry run)
[plugin:rpm] skipped command 'sh -c 'rpm --nodigest -qa --qf="%-59{NVRA} %{INSTALLTIME:date}
" | sort -V'': (dry run)
[plugin:rpm] skipped command 'rpm --nodigest -qa --qf="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\t%{INSTALLTIME:date}\t%{INSTALLTIME}\t%{VENDOR}\t%{BUILDHOST}\t%{SIGPGP}\t%{SIGPGP:pgpsig}\n"': (dry run)
[plugin:rpm] skipped command 'rpm -Va': (dry run)
[plugin:rpm] skipped command 'lsof +D /var/lib/rpm': (dry run)
[plugin:rpm] skipped command 'rpm --showrc': (dry run)
[plugin:rpm] skipped command 'rpm -V rpm rpm-libs rpm-build-libs rpm-sign-libs': (dry run)
[plugin:scsi] skipped command 'lsscsi -i': (dry run)
[plugin:scsi] skipped command 'sg_map -x': (dry run)
[plugin:scsi] skipped command 'lspath': (dry run)
[plugin:scsi] skipped command 'lsmap -all': (dry run)
[plugin:scsi] skipped command 'lsnports': (dry run)
[plugin:scsi] skipped command 'lsscsi -H': (dry run)
[plugin:scsi] skipped command 'lsscsi -g': (dry run)
[plugin:scsi] skipped command 'lsscsi -d': (dry run)
[plugin:scsi] skipped command 'lsscsi -s': (dry run)
[plugin:scsi] skipped command 'lsscsi -L': (dry run)
[plugin:scsi] skipped command 'udevadm info -a /sys/class/scsi_host/host1': (dry run)
[plugin:scsi] skipped command 'udevadm info -a /sys/class/scsi_host/host2': (dry run)
[plugin:scsi] skipped command 'udevadm info -a /sys/class/scsi_host/host0': (dry run)
[plugin:selinux] skipped command 'sestatus': (dry run)
[plugin:selinux] skipped command 'ps auxZww': (dry run)
[plugin:selinux] skipped command 'sestatus -v': (dry run)
[plugin:selinux] skipped command 'sestatus -b': (dry run)
[plugin:selinux] skipped command 'selinuxdefcon root': (dry run)
[plugin:selinux] skipped command 'selinuxconlist root': (dry run)
[plugin:selinux] skipped command 'selinuxexeccon /bin/passwd': (dry run)
[plugin:selinux] skipped command 'semanage -o': (dry run)
[plugin:selinux] skipped command 'semanage fcontext -l': (dry run)
[plugin:selinux] skipped command 'semanage user -l': (dry run)
[plugin:selinux] skipped command 'semanage port -l': (dry run)
[plugin:selinux] skipped command 'semanage login -l': (dry run)
[plugin:selinux] skipped command 'semanage node -l': (dry run)
[plugin:selinux] skipped command 'semanage interface -l': (dry run)
[plugin:selinux] skipped command 'semanage module -l': (dry run)
[plugin:selinux] skipped command 'rpm -V libselinux': (dry run)
[plugin:services] skipped command '/sbin/runlevel': (dry run)
[plugin:services] skipped command 'ls /var/lock/subsys': (dry run)
[plugin:services] skipped command '/sbin/chkconfig --list': (dry run)
[plugin:sudo] skipped command 'rpm -V sudo': (dry run)
[plugin:system] skipped command 'ld.so --help': (dry run)
[plugin:system] skipped command 'ld.so --list-diagnostics': (dry run)
[plugin:system] skipped command 'ld.so --list-tunables': (dry run)
[plugin:system] skipped command 'rpm -V glibc-minimal-langpack glibc-common glibc glibc-langpack-en zlib': (dry run)
[plugin:systemd] skipped command 'systemctl status --all': (dry run)
[plugin:systemd] skipped command 'systemctl show --all': (dry run)
[plugin:systemd] skipped command 'systemctl show *service --all': (dry run)
[plugin:systemd] skipped command 'systemctl list-units': (dry run)
[plugin:systemd] skipped command 'systemctl list-units --failed': (dry run)
[plugin:systemd] skipped command 'systemctl list-units --all': (dry run)
[plugin:systemd] skipped command 'systemctl list-unit-files': (dry run)
[plugin:systemd] skipped command 'systemctl list-jobs': (dry run)
[plugin:systemd] skipped command 'systemctl list-dependencies': (dry run)
[plugin:systemd] skipped command 'systemctl list-timers --all': (dry run)
[plugin:systemd] skipped command 'systemctl list-machines': (dry run)
[plugin:systemd] skipped command 'systemctl show-environment': (dry run)
[plugin:systemd] skipped command 'systemd-delta': (dry run)
[plugin:systemd] skipped command 'systemd-analyze': (dry run)
[plugin:systemd] skipped command 'systemd-analyze blame': (dry run)
[plugin:systemd] skipped command 'systemd-analyze dump': (dry run)
[plugin:systemd] skipped command 'systemd-inhibit --list': (dry run)
[plugin:systemd] skipped command 'journalctl --list-boots': (dry run)
[plugin:systemd] skipped command 'ls -lR /lib/systemd': (dry run)
[plugin:systemd] skipped command 'timedatectl': (dry run)
[plugin:systemd] skipped command 'systemd-resolve --status': (dry run)
[plugin:systemd] skipped command 'systemd-resolve --statistics': (dry run)
[plugin:systemd] skipped command 'systemd-analyze plot': (dry run)
[plugin:systemd] skipped command 'journalctl --verify': (dry run)
[plugin:systemd] skipped command 'rpm -V systemd': (dry run)
[plugin:sysvipc] skipped command 'ipcs': (dry run)
[plugin:sysvipc] skipped command 'ipcs -u': (dry run)
[plugin:yum] skipped command 'yum -C repolist': (dry run)
[plugin:yum] skipped command 'yum -C repolist --verbose': (dry run)
[plugin:yum] skipped command 'yum history': (dry run)
[plugin:yum] skipped command 'yum list installed': (dry run)
[plugin:yum] skipped command 'package-cleanup --dupes': (dry run)
[plugin:yum] skipped command 'package-cleanup --problems': (dry run)
[plugin:yum] skipped command 'rpm -V yum': (dry run)
 Running plugins. Please wait ...

  Starting 46/46 yum             [Running: yum]                                           
  Finished running plugins                                                               
Creating compressed archive...

Your sosreport has been generated and saved in:
        /var/tmp/sosreport-2281837-a8n-awx0103-2022-04-20-dopfhre.tar.xz

 Size   11.11KiB
 Owner  root
 sha256 920046c26c65aa55a4d2fb11d7af1822de569bcf76b8336e02552679aca26bc5

Please send this file to your support representative.

It still executes all default plugins. I would expect that -o | --only-plugins only enables the listed plugin(s).

Disabling each plugin works, so a workaround could look like:

sos report -n sysvipc -n systemd -n system -n sudo -n services -n selinux -n scsi -n rpm -n release -n python -n processor -n process -n pam -n pci -n networking -n multipath -n memory -n md -n lvm2 -n logs -n logrotate -n login -n libvirt -n libraries -n ldap -n krb5 -n kernel -n i18n -n host -n hardware -n firewall_tables -n filesys -n ebpf -n dnf -n devices -n devicemapper -n dbus -n crypto -n cgroups -n block -n anaconda --dry-run

Edit: Version information:

$ cat /etc/os-release
NAME="CentOS Stream"
VERSION="9"
$ rpm -q sos
sos-4.3-1.el9.noarch
TurboTurtle commented 2 years ago

What does your /etc/sos/sos.conf look like? Was this rpm installed from the CentOS repos or some mirror? Can you check rpm -V sos to see if perhaps it has been modified in some way?

I just spun up a CS 9 VM, and -o is working as expected for me out of the box:

[root@cs9test ~]# cat /etc/redhat-release 
CentOS Stream release 9
[root@cs9test ~]# rpm -q sos
sos-4.3-1.el9.noarch

[root@cs9test ~]# sos report -o kernel --batch

sosreport (version 4.3)

[...]

 Setting up archive ...
 Setting up plugins ...
 Running plugins. Please wait ...

  Starting 1/1   kernel          [Running: kernel]

  Finished running plugins

Creating compressed archive...

Your sosreport has been generated and saved in:
    /var/tmp/sosreport-cs9test-2022-04-20-elolbig.tar.xz

 Size   1.40MiB
 Owner  root
 sha256 1074f75bf8c87f7a5654b8f746f199b1e1e1dbe97e993e775679a20036364d20

Please send this file to your support representative.
anxstj commented 2 years ago
# grep -v '^#' /etc/sos/sos.conf 
[global]

[report]

[collect]

[clean]

[plugin_options]

Nothing there except groups and comments.

# rpm -V sos
# rpm -i sos
error: open of sos failed: No such file or directory
bash-5.1# rpm -qi sos
Name        : sos
Version     : 4.3
Release     : 1.el9
Architecture: noarch
Install Date: Wed 20 Apr 2022 12:57:46 PM UTC
Group       : Applications/System
Size        : 2767262
License     : GPLv2+
Signature   : RSA/SHA256, Tue 29 Mar 2022 01:40:25 PM UTC, Key ID 05b555b38483c65d
Source RPM  : sos-4.3-1.el9.src.rpm
Build Date  : Tue 29 Mar 2022 06:09:13 AM UTC
Build Host  : ppc64le-01.stream.rdu2.redhat.com
Packager    : builder@centos.org
Vendor      : CentOS
URL         : https://github.com/sosreport/sos
Summary     : A set of tools to gather troubleshooting information from a system
Description :
Sos is a set of tools that gathers information about system
hardware and configuration. The information can then be used for
diagnostic purposes and debugging. Sos is commonly used to help
support technicians and developers.

With the following steps:

docker run -it quay.io/centos/centos:stream9 bash
dnf install sos
sos report -o kernel --batch

I get this result:

sosreport (version 4.3)

WARNING: unable to set option for disabled or non-existing plugin (boot).
...
 Setting up archive ...
 Setting up plugins ...
[plugin:devicemapper] skipped command 'dmsetup info -c': required kmods missing: dm_mod.  
[plugin:devicemapper] skipped command 'dmsetup table': required kmods missing: dm_mod.  
[plugin:devicemapper] skipped command 'dmsetup status': required kmods missing: dm_mod.  
[plugin:devicemapper] skipped command 'dmsetup ls --tree': required kmods missing: dm_mod.  
[plugin:devicemapper] skipped command 'dmsetup udevcookies': required kmods missing: dm_mod.  
[plugin:devicemapper] skipped command 'dmstats list': required kmods missing: dm_mod.  
[plugin:devicemapper] skipped command 'dmstats print --allregions': required kmods missing: dm_mod.  
[plugin:firewall_tables] skipped command 'nft list ruleset': required kmods missing: nfnetlink, nf_tables.   Use '--allow-system-changes' to enable collection.
[plugin:firewall_tables] skipped command 'iptables -vnxL': required kmods missing: iptable_filter, nf_tables.  
[plugin:firewall_tables] skipped command 'ip6tables -vnxL': required kmods missing: nf_tables, ip6table_filter.  
[plugin:networking] skipped command 'ip -s macsec show': required kmods missing: macsec.   Use '--allow-system-changes' to enable collection.
[plugin:networking] skipped command 'ss -peaonmi': required kmods missing: udp_diag, xsk_diag, inet_diag, netlink_diag, unix_diag, af_packet_diag, tcp_diag.   Use '--allow-system-changes' to enable collection.
 Running plugins. Please wait ...

  Starting 3/45  cgroups         [Running: cgroups]
  Starting 4/45  crypto          [Running: cgroups crypto]
  Starting 1/45  anaconda        [Running: cgroups crypto anaconda]
  Starting 2/45  block           [Running: cgroups crypto anaconda block]
  Starting 5/45  dbus            [Running: cgroups crypto block dbus]
  Starting 6/45  devicemapper    [Running: cgroups crypto block devicemapper]
  Starting 7/45  devices         [Running: crypto block devicemapper devices]
  Starting 8/45  dnf             [Running: crypto block devices dnf]
  Starting 9/45  ebpf            [Running: crypto block dnf ebpf]
  Starting 10/45 filesys         [Running: crypto block dnf filesys]
  Starting 11/45 firewall_tables [Running: block dnf filesys firewall_tables]
  Starting 12/45 hardware        [Running: block dnf filesys hardware]
  Starting 13/45 host            [Running: block dnf hardware host]
  Starting 14/45 i18n            [Running: block dnf hardware i18n]
  Starting 15/45 kernel          [Running: block dnf hardware kernel]
  Starting 16/45 krb5            [Running: block dnf kernel krb5]
  Starting 17/45 ldap            [Running: dnf kernel krb5 ldap]
  Starting 18/45 libraries       [Running: dnf kernel ldap libraries]
  Starting 19/45 libvirt         [Running: dnf kernel libraries libvirt]
  Starting 20/45 login           [Running: dnf kernel libvirt login]
  Starting 21/45 logrotate       [Running: dnf kernel login logrotate]
  Starting 22/45 logs            [Running: dnf kernel login logs]
  Starting 23/45 lvm2            [Running: dnf kernel login lvm2]
  Starting 24/45 md              [Running: dnf kernel lvm2 md]
  Starting 25/45 memory          [Running: dnf kernel md memory]
  Starting 26/45 multipath       [Running: dnf kernel memory multipath]
  Starting 27/45 networking      [Running: dnf kernel memory networking]
  Starting 28/45 openhpi         [Running: dnf memory networking openhpi]
  Starting 29/45 pam             [Running: dnf memory networking pam]
  Starting 30/45 pci             [Running: dnf networking pam pci]
  Starting 31/45 process         [Running: dnf networking pci process]
  Starting 32/45 processor       [Running: dnf networking process processor]
  Starting 33/45 python          [Running: dnf networking processor python]
  Starting 34/45 release         [Running: dnf networking processor release]
  Starting 35/45 rpm             [Running: networking processor release rpm]
  Starting 36/45 scsi            [Running: networking processor rpm scsi]
  Starting 37/45 selinux         [Running: networking processor rpm selinux]
  Starting 38/45 services        [Running: processor rpm selinux services]
  Starting 39/45 ssh             [Running: processor rpm selinux ssh]
  Starting 40/45 system          [Running: processor rpm selinux system]
  Starting 41/45 systemd         [Running: rpm selinux system systemd]
  Starting 42/45 sysvipc         [Running: rpm system systemd sysvipc]
  Starting 43/45 udev            [Running: rpm system systemd udev]
  Starting 44/45 xfs             [Running: rpm system systemd xfs]
  Finishing plugins              [Running: rpm system systemd]
  Starting 45/45 yum             [Running: rpm system systemd yum]
  Finishing plugins              [Running: rpm systemd yum]
  Finishing plugins              [Running: rpm yum]
  Finishing plugins              [Running: yum]

  Finished running plugins

Creating compressed archive...

Your sosreport has been generated and saved in:
        /var/tmp/sosreport-0ba12bd202d1-2022-04-20-qtiaxhw.tar.xz

 Size   3.48MiB
 Owner  root
 sha256 a682dddb268affe2ea6099ba5bc93bb4eaa8cacc62cadfa4a1d009437b1d16ad

Please send this file to your support representative.

It's similar to running sos report --batch.

TurboTurtle commented 2 years ago

Can you enable verbose logging and provide the contents of sos_logs/sos.log (either in a pastebin or attach the whole file here)? sos report -o kernel -vvv --batch should be fine.

anxstj commented 2 years ago

I attached the output from sos report -o kernel -vvv --batch 2>&1> sos_report.verbose.log. But I couldn't find a sos.log file.

sos_report.verbose.log.gz

TurboTurtle commented 2 years ago

The log would be in the generated tarball, but what you've provided is fine.

It looks like the cantboot preset is getting loaded:

[sos.report:setup] using 'cantboot' preset defaults (--all-logs --plugopts boot.all-images=on,rpm.rpmva=on,rpm.rpmdb=on --profiles boot,storage,system --verify)
[sos.report:setup] effective options now: --all-logs --batch --only-plugins kernel --plugopts boot.all-images=on,rpm.rpmva=on,rpm.rpmdb=on --profiles boot,storage,system -vvv --verify

Which is actually extending the effective list of -o by enabling the profiles listed.

The cantboot preset is enabled when sos detects that you're running in emergency or rescue mode as reported by systemd.

So, we have a conflict here:

@pmoravec @jjansky1 @slashdd - I'm leaning towards the thought that -o should block presets from being loaded/probed, but perhaps there's another approach that would be better?

pmoravec commented 2 years ago

I am on torns, as there are a few opposing factors:

Still I tend to the option "first apply preset, then overwrite it per user/configfile preferences".

TurboTurtle commented 2 years ago

Yeah, this one is tricky. I'm starting to think that perhaps in edge cases like this, we should point to the usage of --preset=none instead of trying to contort the options handling flow more than we already do?

@anxstj if you run sos report -o kernel --preset=none, does that change the behavior you're seeing?

anxstj commented 2 years ago

Yes, running sos report -o kernel --preset=none works. Only the kernel plugin will be executed.

Just another idea: I execute this in a container without a running systemd. So maybe the rescue or emergency mode detection doesn't work as expected in this case.

TurboTurtle commented 2 years ago

Aha! Got it - because systemd isn't present in your container, sos is loading a fallback "allow everything" init system abstraction. This in turn blindly reports that every service queried to it is running, in an effort to not block service-based plugin collections.

I'm thinking our best approach here is to add a method specific to these runlevel-analogous targets rather than checking them as an actual service.

In the meantime, you can either continue using --preset=none, or if your goal is to actually capture information from the host instead of within the container you'll need to mount the host's / filesystem within the container and set the HOST env var to this location. You'll also need to pass the host's namespaces E.G.: docker run -it -v /:/host -e HOST=/host --privileged --ipc=host --net=host --pid=host $image $cmd.

This usecase is primarily (solely, really) driven by the RH support-tools container for CoreOS collections, so if you have access to the RH registry you can do podman container runlabel RUN registry.redhat.io/rhel8/support-tools. That will setup the container with the mount as above, and a few other bits, in a more user-friendly manner.