[sos-devel] question about configuration file

Collins, Brian (GE Corporate, consultant) brian.collins at ge.com
Tue Sep 29 13:33:28 UTC 2015


This is not what I am talking about. Not modules options but to enable only a set of modules just like the -o flag.

Example:

sosreport -o anaconda,apache,bootloader,crontab,filesys,general,hardware,kernel,libraries,lsbrelease,memory,networking,nscd,ntp,openssl,pam,process,rpm,sar,sendmail,snmp,ssh,startup,system,udev,xinetd,yum,rhn,tomcat

works by enabling ONLY these modules while the config file looking as such does not:
[general]

#ftp_upload_url = ftp://example.com/incoming
#gpg_keyring = /usr/share/sos/rhsupport.pub
#gpg_recipient = support at redhat.com
smtp_server = None

[plugins]

enable = anaconda, apache, bootloader, crontab, filesys, general, hardware, kernel, libraries, lsbrelease, memory, networking, nscd, ntp, openssl, pam, process, rpm, sar, sendmail, snmp, ssh, startup, system, udev, xinetd, yum, mysql, rhn, tomcat

[tunables]

#rpm.rpmva = off
#general.syslogsize = 15


Below I am including an output of the commands both with a -l flag for comparison. You can clearly see the config file does not enable only the modules requested whereas the -o flag does:

WITH ONLY CONFIG FILE:


[bcollins at gisciohwblpoc12 ~]$ sosreport --config-file=brians_sos.conf -l

sosreport (version 2.2)

The following plugins are currently enabled:

 acpid           acpid related information
 anaconda        Anaconda / Installation information
 apache          Apache related information
 auditd          Auditd related information
 autofs          autofs server-related information
 bootloader      Bootloader information
 cgroups         cgroup subsystem information
 crontab         Crontab information
 devicemapper    device-mapper related information (dm, lvm, multipath)
 dovecot         dovecot server related information
 filesys         information on filesystems
 foreman         Foreman related information
 ftp             FTP server related information
 gdm             gdm related information
 general         basic system information
 gluster         gluster related information
 hardware        hardware related information
 hts             Red Hat Hardware Test Suite related information
 i18n            i18n related information
 iscsi           iscsi-initiator related information
 kdump           Kdump related information
 kernel          kernel related information
 krb5            Samba related information
 ldap            LDAP related information
 libraries       information on shared libraries
 libvirt         libvirt-related information
 logrotate       logrotate configuration files and debug info
 lsbrelease      Linux Standard Base information
 memory          memory usage information
 mrggrid         MRG GRID related information
 mrgmessg        MRG Messaging related information
 mysql           MySQL related information
 networking      network related information
 nfs             NFS related information
 nscd            NSCD related information
 ntp             NTP related information
 openhpi         OpenHPI related information
 openssl         openssl related information
 openswan        ipsec related information
 pam             PAM related information
 pgsql           PostgreSQL related information
 postfix         mail server related information
 ppp             ppp, wvdial and rp-pppoe related information
 printing        printing related information (cups)
 process         process information
 psacct          Process accounting related information
 radius          radius related information
 rpm             RPM information
 samba           Samba related information
 sar             Generate the sar file from /var/log/sa/saXX files
 selinux         selinux related information
 sendmail        sendmail information
 smartcard       Smart Card related information
 snmp            snmp related information
 ssh             ssh-related information
 sssd            sssd-related Diagnostic Information
 startup         startup information
 sunrpc          Sun RPC related information
 system          core system related information
 systemtap       SystemTap information
 udev            udev related information
 x11             X related information
 xinetd          xinetd information
 yum             yum information

The following plugins are currently disabled:

 amd               Amd automounter information
 cloudforms        CloudForms related information
 cluster           cluster suite and GFS related information
 cobbler           cobbler related information
 corosync          corosync information
 cs                Certificate System 7.x Diagnostic Information
 dhcp              DHCP related information
 ds                Directory Server information
 emc               EMC related information (PowerPath, Solutions Enabler CLI and Navisphere CLI)
 infiniband        Infiniband related information
 initrd            initrd related information
 ipa               IPA diagnostic information
 ipsec             ipsec related information
 iscsitarget       iscsi-target related information
 kernel_realtime   Information specific to the realtime kernel
 kvm               KVM related information
 named             named related information
 netdump           Netdump Configuration Information
 nfsserver         NFS server-related information
 oddjob            oddjob related information
 pxe               PXE related information
 qpidd             Messaging related information
 quagga            quagga related information
 rhn               RHN Satellite related information
 rhui              Red Hat Update Infrastructure for Cloud Providers
 s390              s390 related information
 sanitize          sanitize specified log files, etc
 sanlock           sanlock-related information
 soundcard         Sound card information
 squid             squid related information
 tftpserver        tftpserver related information
 tomcat            Tomcat related information
 veritas           veritas related information
 vmware            VMWare related information
 xen               Xen related information

The following plugin options are available:

 apache.log            off gathers all apache logs
 auditd.syslogsize     15 max size (MiB) to collect per syslog file
 devicemapper.lvmdump  off collect an lvmdump
 devicemapper.lvmdump-am off attempt to collect an lvmdump with advanced options and raw metadata collection
 filesys.dumpe2fs      off dump filesystem information
 general.syslogsize    15 max size (MiB) to collect per syslog file
 general.all_logs      off collect all log files defined in syslog.conf
 kernel.modinfo        on gathers information on all kernel modules
 libraries.ldconfigv   off the name of each directory as it is scanned, and any links that are created.
 networking.traceroute off collects a traceroute to linux.oracle.com
 nscd.nscdlogsize      50 max size (MiB) to collect per nscd log file
 openswan.ipsec-barf   off collect the output of the ipsec barf command
 pgsql.pghome          /var/lib/pgsql PostgreSQL server home directory (default=/var/lib/pgsql)
 pgsql.username        off username for pg_dump (default=postgres)
 pgsql.password        off password for pg_dump (default=None)
 pgsql.dbname          off database name to dump for pg_dump (default=None)
 pgsql.dbhost          off hostname/IP of the server upon which the DB is running (default=localhost)
 pgsql.dbport          off database server port number (default=5432)
 printing.cups         50 max size (MiB) to collect per cups log file
 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
 selinux.fixfiles      off Print incorrect file context labels
 selinux.list          off List objects and their context
 startup.servicestatus off get a status of all running services
 yum.yumlist           off list repositories and packages
 yum.yumdebug          off gather yum debugging data




WITH ONLY O FLAG:

[bcollins at gisciohwblpoc12 ~]$ sosreport -l -o anaconda,apache,bootloader,crontab,filesys,general,hardware,kernel,libraries,lsbrelease,memory,networking,nscd,ntp,openssl,pam,process,rpm,sar,sendmail,snmp,ssh,startup,system,udev,xinetd,yum,rhn,tomcat

sosreport (version 2.2)

The following plugins are currently enabled:

 anaconda        Anaconda / Installation information
 apache          Apache related information
 bootloader      Bootloader information
 crontab         Crontab information
 filesys         information on filesystems
 general         basic system information
 hardware        hardware related information
 kernel          kernel related information
 libraries       information on shared libraries
 lsbrelease      Linux Standard Base information
 memory          memory usage information
 networking      network related information
 nscd            NSCD related information
 ntp             NTP related information
 openssl         openssl related information
 pam             PAM related information
 process         process information
 rhn             RHN Satellite related information
 rpm             RPM information
 sar             Generate the sar file from /var/log/sa/saXX files
 sendmail        sendmail information
 snmp            snmp related information
 ssh             ssh-related information
 startup         startup information
 system          core system related information
 tomcat          Tomcat related information
 udev            udev related information
 xinetd          xinetd information
 yum             yum information

The following plugins are currently disabled:

 acpid             acpid related information
 amd               Amd automounter information
 auditd            Auditd related information
 autofs            autofs server-related information
 cgroups           cgroup subsystem information
 cloudforms        CloudForms related information
 cluster           cluster suite and GFS related information
 cobbler           cobbler related information
 corosync          corosync information
 cs                Certificate System 7.x Diagnostic Information
 devicemapper      device-mapper related information (dm, lvm, multipath)
 dhcp              DHCP related information
 dovecot           dovecot server related information
 ds                Directory Server information
 emc               EMC related information (PowerPath, Solutions Enabler CLI and Navisphere CLI)
 foreman           Foreman related information
 ftp               FTP server related information
 gdm               gdm related information
 gluster           gluster related information
 hts               Red Hat Hardware Test Suite related information
 i18n              i18n related information
 infiniband        Infiniband related information
 initrd            initrd related information
 ipa               IPA diagnostic information
 ipsec             ipsec related information
 iscsi             iscsi-initiator related information
 iscsitarget       iscsi-target related information
 kdump             Kdump related information
 kernel_realtime   Information specific to the realtime kernel
 krb5              Samba related information
 kvm               KVM related information
 ldap              LDAP related information
 libvirt           libvirt-related information
 logrotate         logrotate configuration files and debug info
 mrggrid           MRG GRID related information
 mrgmessg          MRG Messaging related information
 mysql             MySQL related information
 named             named related information
 netdump           Netdump Configuration Information
 nfs               NFS related information
 nfsserver         NFS server-related information
 oddjob            oddjob related information
 openhpi           OpenHPI related information
 openswan          ipsec related information
 pgsql             PostgreSQL related information
 postfix           mail server related information
 ppp               ppp, wvdial and rp-pppoe related information
 printing          printing related information (cups)
 psacct            Process accounting related information
 pxe               PXE related information
 qpidd             Messaging related information
 quagga            quagga related information
 radius            radius related information
 rhui              Red Hat Update Infrastructure for Cloud Providers
 s390              s390 related information
 samba             Samba related information
 sanitize          sanitize specified log files, etc
 sanlock           sanlock-related information
 selinux           selinux related information
 smartcard         Smart Card related information
 soundcard         Sound card information
 squid             squid related information
 sssd              sssd-related Diagnostic Information
 sunrpc            Sun RPC related information
 systemtap         SystemTap information
 tftpserver        tftpserver related information
 veritas           veritas related information
 vmware            VMWare related information
 x11               X related information
 xen               Xen related information

The following plugin options are available:

 apache.log            off gathers all apache logs
 filesys.dumpe2fs      off dump filesystem information
 general.syslogsize    15 max size (MiB) to collect per syslog file
 general.all_logs      off collect all log files defined in syslog.conf
 kernel.modinfo        on gathers information on all kernel modules
 libraries.ldconfigv   off the name of each directory as it is scanned, and any links that are created.
 networking.traceroute off collects a traceroute to linux.oracle.com
 nscd.nscdlogsize      50 max size (MiB) to collect per nscd log file
 rhn.log               off gathers all apache logs
 rpm.rpmq              on queries for package information via rpm -q
 rpm.rpmva             off runs a verify on all packages
 startup.servicestatus off get a status of all running services
 yum.yumlist           off list repositories and packages
 yum.yumdebug          off gather yum debugging data





-----Original Message-----
From: Bryn M. Reeves [mailto:bmr at redhat.com]
Sent: Tuesday, September 29, 2015 5:45 AM
To: Collins, Brian (GE Corporate, consultant)
Cc: sos-devel at redhat.com
Subject: Re: [sos-devel] question about configuration file

On Mon, Sep 28, 2015 at 08:52:09PM +0000, Collins, Brian (GE Corporate, consultant) wrote:
> Is it possible to config a sos.conf with the equivalent -o option from the command line?

Hi Brian,

This is done in the 'tunables' section of sos.conf (not a great name but it dates back all the way to the introduction of the config file and we haven't yet had a good enough cause to break backward compatibility).

There is an example of this use in the default sos.conf that is installed by most distribution packages:

  [tunables]

  #rpm.rpmva = off
  #general.syslogsize = 15

To enable the examples just uncomment the line (remove the '#') and re-run sosreport.

The line format is 'plugin_name.option_name'. To see the list of plugins and their options for the installed version of sos run 'sosreport -l',
e.g.:

  https://urldefense.proofpoint.com/v2/url?u=http-3A__fpaste.org_272569_35192701_&d=BQIBAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=agoZV855bOR3XD035MV1dqRRgPBvdNZcVcj77nLZNA4&m=huHvbYc8jLmac4H0JfUWBWRJCsM-LDv1EG62dEUa6QU&s=gNzfb_ZihZhCjZ7O5_yvk_0GyO-5Mqp5w0G3mpOJly0&e=

You should be able to set any of the options listed under 'The following plugin options are available' from the configuration file in this way.

> I have not seen a full options list for the sos.conf. and finding one seems next to impossible....

You don't mention the version of sos that you are running but there are only two sections supported in the current release (3.2):
'[plugins]' (for disabling plugins), and '[tunables]' (for setting plugin options).

These are both documented in the sos.conf man page: the docs cover the structure of the file and the 'sosreport -l' output tells you the options available for the running version of the command.

You can find all the sos manual pages online as entries in the upstream
wiki:

  https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sosreport_sos_wiki_sos.conf.5&d=BQIBAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=agoZV855bOR3XD035MV1dqRRgPBvdNZcVcj77nLZNA4&m=huHvbYc8jLmac4H0JfUWBWRJCsM-LDv1EG62dEUa6QU&s=WXGQgbgQnDCyVN6r4GOIBW1lmCeTCtRGanZjKA7m4ck&e=
  https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sosreport_sos_wiki_sosreport.1&d=BQIBAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=agoZV855bOR3XD035MV1dqRRgPBvdNZcVcj77nLZNA4&m=huHvbYc8jLmac4H0JfUWBWRJCsM-LDv1EG62dEUa6QU&s=XlIgyM-6XEbzW2aeEkztx-cnaDIay3WxrShzaFfnwQY&e=

The installed sos.conf may also mention a '[general]' section that was supported by older sos versions. This is no longer used in the current release and we will remove the stray references from the example files in the next release.

Regards,
Bryn.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/sos-devel/attachments/20150929/cdf3254e/attachment.htm>


More information about the sos-devel mailing list