Sunday, June 23, 2019

sosreport on Oracle Linux

The "sosreport" is a tool to collect troubleshooting data on an Oracle Linux system. It generates a compressed tarball of debugging information that gives an overview of the most important logs and configuration of a Linux system, to be sent to Support.

To run sosreport, the package "sos" must be installed. This is usually installed by default, unless the system was installed with a custom package set. If it is not installed, it can be installed from ULN with up2date, the public Oracle Linux repository or from installation media. It is also a good idea to make sure it is up to date.

To create the sosreport can be as simple as running the command in a terminal, without arguments, as root. It will ask for some information related to a support case:

sosreport - Collect and package diagnostic and support data
       sosreport
                 [-l|--list-plugins]
                 [-n|--skip-plugins plugin-names]
                 [-e|--enable-plugins plugin-names]
                 [-o|--only-plugins plugin-names]
                 [-a|--alloptions] [-v|--verbose]
                 [-k plug.opt|--plugin-option plug.opt]
                 [--no-report] [--config-file conf]
                 [--batch] [--build] [--debug]
                 [--name name] [--case-id id] [--ticket-number nr]
                 [-s|--sysroot SYSROOT]
                 [-c|--chroot {auto|always|never}
                 [--tmp-dir directory]
                 [-p|--profile profile-name]
                 [--list-profiles]
                 [--verify]
                 [--log-size]
                 [--all-logs]
                 [-z|--compression-type method]
                 [-h|--help]

[root@ed-olapplin ~]# sosreport
sosreport (version 3.2)
This command will collect diagnostic and configuration information from
this Oracle Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp and may be provided to a Oracle America support representative.

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

  http://linux.oracle.com/
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.
Please enter your first initial and last name [oiamsrv1]: samimalik
Please enter the case id that you are generating this report for []: 3-20357148151

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

  Running 94/94: yum...
Creating compressed archive...

Your sosreport has been generated and saved in:
  /var/tmp/sosreport-samimalik.3-20357148151-20190623131837.tar.xz

The checksum is: d89277f92af08849d7e7b275198b74f0
Please send this file to your support representative.
[root@ed-olapplin ~]#
[root@ed-olapplin ~]# sosreport -l
sosreport (version 3.2)
The following plugins are currently enabled:
 abrt                 Automatic Bug Reporting Tool
 acpid                ACPI daemon information
 anaconda             Anaconda installer
 anacron              Anacron job scheduling service
 ata                  ATA and IDE information
 auditd               Audit daemon information
 block                Block device information
 boot                 Bootloader information
 ceph                 CEPH distributed storage
 cgroups              Control groups subsystem
 chrony               Chrony clock (for Network time protocol)
 cron                 Cron job scheduler
 cups                 CUPS IPP print service
 dbus                 D-Bus message bus
 devicemapper         device-mapper framework
 devices              devices specific commands
 dmraid               dmraid software RAID
 etcd                 etcd plugin
 fcoe                 Fibre Channel over Ethernet
 filesys              Local file systems
 firewalld            Firewall daemon
 gdm                  GNOME display manager
 general              general system information
 gluster              GlusterFS storage
 grub2                GRUB2 bootloader
 hardware             General hardware information
 hardwaretestsuite    Red Hat Hardware Test Suite
 i18n                 Internationalization
 infiniband           Infiniband data
 ipvs                 Linux IP virtual server
 iscsi                iSCSI initiator
 java                 Java runtime
 kdump                Kdump crash dumps
 keepalived           Keepalived routing server
 kernel               Linux kernel
 keyutils             Kernel key ring
 krb5                 Kerberos authentication
 kubernetes           Kubernetes plugin
 kvm                  Kernel virtual machine
 last                 login information
 ldap                 LDAP configuration
 libraries            Dynamic shared libraries
 libvirt              libvirt virtualization API
 logrotate            LogRotate service
 logs                 System logs
 lsbrelease           Linux standard base
 lvm2                 LVM2 volume manager
 md                   MD RAID subsystem
 megacli              LSI MegaRAID devices
 memory               Memory configuration and use
 mrggrid              MRG GRID engine
 mrgmessg             MRG Messaging subsystem
 multipath            Device-mapper multipath tools
 networking           network and device configuration
 nfs                  Network file system information
 nis                  Network information service
 numa                 NUMA state and configuration
 oddjob               OddJob task scheduler
 openhpi              Open Hardware Platform Interface
 openshift            Openshift node and broker
 openssl              openssl related information
 openswan             Openswan IPsec
 pam                  Pluggable Authentication Modules
 pci                  PCI devices
 postfix              Postfix smtp server
 ppp                  Point-to-point protocol
 process              process information
 processor            CPU information
 psacct               Process accounting information
 puppet               Puppet service
 python               Python runtime
 rpm                  RPM Package Manager
 samba                Samba Windows interoperability
 sar                  System Activity Reporter
 scsi                 SCSI devices
 selinux              SELinux access control
 services             System services
 snmp                 Simple network management protocol
 soundcard            Sound devices
 ssh                  Secure shell service
 system               core system information
 systemd              System management daemon
 systemtap            SystemTap dynamic instrumentation
 sysvipc              SysV IPC
 teamd                Network interface teaming
 tuned                Tuned system tuning daemon
 udev                 udev dynamic device management
 usb                  USB devices
 vhostmd              vhostmd virtualization metrics collection
 virsh                client for libvirt virtualization API
 x11                  X windowing system
 xen                  Xen virtualization
 xfs                  XFS filesystem
 yum                  yum information

The following plugins are currently disabled:
 activemq             inactive       ActiveMQ message broker
 apache               inactive       Apache http daemon
 autofs               inactive       Autofs on-demand automounter
 cluster              inactive       Red Hat Cluster High Availability and GFS2
 cobbler              inactive       Cobbler installation server
 corosync             inactive       Corosync cluster engine
 certificatesystem    inactive       Certificate System and Dogtag
 ctdb                 inactive       Samba Clustered TDB
 dhcp                 inactive       DHCP daemon
 distupgrade          inactive       Distribution upgrade data
 docker               inactive       Docker containers
 dovecot              inactive       dovecot server related information
 directoryserver      inactive       Directory Server
 foreman              inactive       Foreman/Satellite 6 systems management
 grub                 inactive       GRUB bootloader
 haproxy              inactive       HAProxy load balancer
 hpasm                inactive       HP Advanced Server Management
 ipa                  inactive       Identity, policy, audit
 iprconfig            inactive       IBM Power RAID storage adapter configuration information
 ipsec                inactive       Internet protocol security
 iscsitarget          inactive       iSCSI target
 kernelrt             inactive       Realtime kernel variant
 kimchi               inactive       kimchi-related information
 kpatch               inactive       Kpatch information
 lilo                 inactive       Lilo bootloader
 mongodb              inactive       MongoDB document database
 mpt                  inactive       LSI Message Passing Technology
 mysql                inactive       MySQL and MariaDB RDBMS
 named                inactive       BIND named server
 navicli              inactive       EMC Navicli
 nfsserver            inactive       NFS server information
 nscd                 inactive       Name service caching daemon
 ntp                  inactive       Network time protocol
 openstack_ceilometer inactive       Openstack Ceilometer
 openstack_cinder     inactive       OpenStack cinder
 openstack_glance     inactive       OpenStack Glance
 openstack_heat       inactive       OpenStack Heat
 openstack_horizon    inactive       OpenStack Horizon
 openstack_keystone   inactive       OpenStack Keystone
 openstack_neutron    inactive       OpenStack Networking
 openstack_nova       inactive       OpenStack Nova
 openstack_sahara     inactive       OpenStack sahara related information for Red Hat distributions.
 openstack_swift      inactive       OpenStack Swift
 openstack_trove      inactive       OpenStack Trove
 openvswitch          inactive       OpenVSwitch networking
 ovirt                inactive       oVirt Engine
 ovirt_hosted_engine  inactive       oVirt Hosted Engine
 pcp                  inactive       Performance Co-Pilot data
 postgresql           inactive       PostgreSQL RDBMS
 powerpath            inactive       EMC PowerPath
 powerpc              inactive       IBM Power systems
 ptp                  inactive       Precision time protocol
 pxe                  inactive       PXE service
 qpid                 inactive       Qpid messaging
 quagga               inactive       Quagga routing service
 rabbitmq             inactive       RabbitMQ messaging service
 radius               inactive       RADIUS service information
 rhui                 inactive       Red Hat Update Infrastructure
 s390                 inactive       IBM S/390
 sanlock              inactive       SANlock daemon
 saphana              inactive       SAP HANA
 sapnw                inactive       SAP NetWeaver
 satellite            inactive       RHN Satellite and Spacewalk
 sendmail             inactive       sendmail service
 smartcard            inactive       PKCS#11 smart cards
 squid                inactive       Squid caching proxy
 ssmtp                inactive       sSMTP information
 sssd                 inactive       System security service daemon
 sunrpc               inactive       Sun RPC service
 symcli               inactive       EMC Symcli
 tftpserver           inactive       TFTP server
 tomcat               inactive       Apache Tomcat server
 upstart              inactive       Upstart init system
 veritas              inactive       Veritas software
 vmware               inactive       VMWare client information
 vsftpd               inactive       Vsftpd server
 xinetd               inactive       xinetd information

The following plugin options are available:
 abrt.backtraces           off             collect backtraces for every report
 boot.all-images           off             collect lsinitrd for all images
 ceph.log                  off             gathers all ceph logs
 dmraid.metadata           off             capture dmraid device metadata
 filesys.lsof              off             gathers information on all open files
 filesys.dumpe2fs          off             dump filesystem information
 kubernetes.podslog        off             capture logs for pods
 libraries.ldconfigv       off             collect verbose ldconfig output
 logs.log_days             3               the number of days logs to collect
 lvm2.lvmdump              off             collect an lvmdump tarball
 lvm2.lvmdump-am           off             attempt to collect an lvmdump with advanced options and raw metadata collection
 networking.traceroute     off             collects a traceroute to
www.example.com
 openshift.broker          off             Gathers broker specific files
 openshift.node            off             Gathers node specific files
 openswan.ipsec-barf       off             collect the output of the ipsec barf command
 psacct.all                off             collect all process accounting files
 rpm.rpmq                  on              queries for package information via rpm -q
 rpm.rpmva                 off             runs a verify on all packages
 sar.all_sar               off             gather all system activity records
 selinux.fixfiles          off             Print incorrect file context labels
 selinux.list              off             List objects and their context
 services.servicestatus    off             get a status of all running services
 xfs.logprint              off             gathers the log information
 yum.yumlist               off             list repositories and packages
 yum.yumdebug              off             gather yum debugging data

 Profiles: boot, cluster, debug, desktop, hardware, identity, java,
           kernel, mail, memory, mrg, network, nfs, openshift,
           openstack, packagemanager, performance, sap, security,
           services, storage, sysmgmt, system, virt, webserver

 25 profiles, 94 plugins
If the system has a lot of packages installed, and sosreport takes a long time to complete, support may request that you disable the rpm database verification (verifies all packaged files on the filesystem against the rpm database)
# sosreport -k rpm.rpmva=off