aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [sssd] Retrieve SSSD created krb5 snippetsJustin Stephenson2016-12-021-0/+1
| | | | | | | | | | | | Obtain SSSD automatically-generated krb5 snippet configuration files for localauth plugin, domain_realm mapping, and libdefaults additions. These files are pulled in by libkrb5 with an 'includedir' line in /etc/krb5.conf. Signed-off-by: Justin Stephenson <jstephen@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> Closes #897.
* [ipmitool] use usb interface if availableMukesh Ojha2016-12-021-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOSREPORT generally uses the default interface (/dev/ipmi0) while executing ipmitool command, which is quite slow as compare to usb interface. This usb interface uses the virtual device exposed from BMC like in OpenPower system AMI exposes virtual USB interface. IPMITOOL command with usb interface sends the data to the kernel drivers which inturn sends it to the BMC. This patch enables ipmitool command to use usb interface if available. With this patch: ================ root@ubuntu1604:/home/mukesh/sos# ./sosreport --config sos.conf -o ipmitool sosreport (version 3.2) This command will collect system configuration and diagnostic information from this Ubuntu system. An archive containing the collected information will be generated in /tmp/sos.TF8N8E. For more information on Ubuntu visit: http://www.ubuntu.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 [ubuntu1604]: Please enter the case id that you are generating this report for []: Setting up archive ... Setting up plugins ... Running plugins. Please wait ... Running 1/1: ipmitool... Creating compressed archive... Your sosreport has been generated and saved in: /tmp/sosreport-ubuntu1604-20161130110402.tar.xz The checksum is: adfdbc8475874d7ad1077a3d2eda151b Please send this file to your support representative. root@ubuntu1604:/home/mukesh/sos# tar -xvf /tmp/sosreport-ubuntu1604-20161130110402.tar.xz sosreport-ubuntu1604-20161130110402/ sosreport-ubuntu1604-20161130110402/version.txt sosreport-ubuntu1604-20161130110402/sos_reports/ sosreport-ubuntu1604-20161130110402/sos_reports/sos.txt sosreport-ubuntu1604-20161130110402/sos_reports/sos.html sosreport-ubuntu1604-20161130110402/sos_commands/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sdr_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_chassis_status sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_fru_print sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sensor_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_mc_info sosreport-ubuntu1604-20161130110402/sos_logs/ sosreport-ubuntu1604-20161130110402/sos_logs/ui.log sosreport-ubuntu1604-20161130110402/sos_logs/sos.log Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> --- Changes in V3: - Forgot to remove import subprocess in the last version. Changes in V2: - Used existing wrapper instead of subprocess. - Removed camelCase for identifier. sos/plugins/ipmitool.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
* [samba] if --all-logs is given, collect everything under /var/log/sambaMichael Adam2016-12-011-0/+3
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [samba] collect winbind log filesMichael Adam2016-12-011-0/+8
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [samba] apply --size-limit to collected log filesMichael Adam2016-12-011-2/+8
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* [samba] use output of testparm -s without -v instead of with -vMichael Adam2016-12-011-1/+1
| | | | | | | | | | testparm -v prints the values of all options, including the compiled in defaults. The output of testparm with*out* -v is much more helpful in that it only outputs the non-default options. Signed-off-by: Michael Adam <obnox@samba.org>
* [sssd] Retrieve drop directory conf filesJustin Stephenson2016-11-041-4/+7
| | | | | | | | | | SSSD 1.14 adds support for dropped-in configuration files in /etc/sssd/conf.d/ - Adding these files will ensure all SSSD configuration files are obtained. Closes #890. Signed-off-by: Justin Stephenson <jstephen@redhat.com>
* [global] make class method instance names consistentBryn M. Reeves2016-10-268-19/+19
| | | | | | | | A method decorated with @classmethod receives an instance of the class object (rather than an instance of the class) in its first argument - use 'cls' in these functions rather than 'self'. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [openstack_sahara] capture all sahara* sudoers filesLuigi Toscano2016-10-251-1/+1
| | | | | | It seems that nowadays the file is /etc/sudoers.d/sahara-rootwrap. Closes: #848.
* [systemd] Collect detailed runtime info on each unitBryan Quigley2016-10-251-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This collects status from all units, which replaces the need to run "systemctl list-units --all" seperately and provides much richer information for every unit - including a bit of log output, process tree, memory usage, and more. It also runs show for all services which should capture the majority of Limits and other information we generally look for. systemd-analyze - provides boot performance info systemctl status - shows system status and nice process tree We also now ls /lib/systemd recursively as some folder names below it have changed. Lastly, we make sure it runs on Ubuntu/Debian as we store systemd in /lib not /usr/lib. Closes: #831. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [juju] Get Ready for 2.0 and make it less likely to get too muchBryan Quigley2016-10-251-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | The package name juju is no longer the only way to install juju, so replace with checking /usr/bin/juju|juju-run. Juju-run is on machines deployed with juju. Logging still occurs there in same pattern - /var/log/juju/machinename.log. Juju "Local" logs were never seen in the wild and has been removed. Check that /var/log/juju/ exists before trying to access it. Check that /usr/bin/juju exists before trying to run it. Check that Juju's mongodb exists before trying to parse it. /var/lib/juju/ contains a database that can grow to many GB, let's not include that by default. Also explicitly specified juju formats tabular and json (in 2.0 tabular is the default and in 1.25 json is). And we also now explicitly capture the version. Fix up contrainsts and get-config/get so it works for both versions. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
* [dracut] add new pluginBryn M. Reeves2016-10-211-0/+37
| | | | | | | | | Add a new plugin to collect configuration and state data from the dracut initramfs generator. Closes: #705. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sosreport] handle SIGTERM correctly in plugin setup()/collect() phasesamitg.b14@gmail.com2016-10-211-23/+19
| | | | | | | | Added "self.exit_process" statements to stop process with SIGTERM signal. Added "self.handle_exception()" function to handle plugin exception and SIGTERM signal. Closes:#689
* [insights] Update some verbiage and collect all log files.Richard Brantley2016-10-211-5/+9
| | | | Closes: #881.
* [docs] document use of --config with in-tree buildsBryn M. Reeves2016-10-181-4/+24
|
* Mention python3 and update Ubuntu note.Bryan Quigley2016-10-171-1/+2
| | | | | | | | | | | | | Mention how to run sosreport on a system with only python3. Update the first release sosreport got into Ubuntu to a supported LTS which should be more recognizable to people. Fixes: #830 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
* replace cluster plugin by dlm in sosreport helpPavel Moravec2016-10-171-2/+2
| | | | | | | | | | As a relict from #587 (cluster split), sosreport --help should refer to dlm plugin instead of cluster in -o and -k example. Resolves: #874. Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
* [networking] plugin tracebacks when net-tools not installedPavel Moravec2016-09-091-1/+1
| | | | | | | | | | | | | Move netstat_pkg assignment grepping for net-tools version into try block. It can be put to the existing block that will catch the exception - since if net-tools isn't present, we fallback to the default option of netstat command (if the command is ever present). Resolves: #876. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [reporting] replace six.PY2 to six.PY3 testPavel Moravec2016-09-091-3/+3
| | | | | | | | | | Older versions of python-six package dont have six.PY2 variable. Replace it by six.PY3 Resolves: #875. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [npm] new plugin: get project modules and globally installed modulesPavel Moravec2016-09-021-0/+68
| | | | | | | | | | | New module for package manager npm for Node.js. The plugin collects list of globally installed modules and project modules. Resolves: #846. Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [nodejs] new plugin: get runtime infoPavel Moravec2016-09-021-0/+43
| | | | | | | Resolves: #847. Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [docker] Gather more data and expand plugin optionsJake Hunsaker2016-08-311-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the behavior of the docker plugin and collects a bit more data than before. In addition, it also adds 'docker-engine' to the package lists as that is the current name of the community release of Docker. Both 'docker version' and 'docker ps -a' output is now collected. Output from 'docker version' help to validate a given docker binary and 'ps -a' output is collected to see all terminated, but still existing, containers present on the system. This is kept separate from normal 'ps' output to keep it simple to only quickly look at running containers. The output of 'docker inspect' is now collected as well, by default only for running containers. Further, plugin options have been changed: - 'logs' will now capture 'docker logs' output for all running containers. Previously this was provided by the 'all' option which would also always include terminated containers. - 'all' will now cause the plugin to also include terminated containers for 'inspect' and 'logs' output. Note that by itself this option no longer captures any additional information. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [omsa] add omreport storage controllerPavel Moravec2016-08-191-1/+1
| | | | | | | | | | | Collect "omreport storage controller". Do not collect "omreport chassis summary" as it is invalid command. Resolves: #868. Signed-off-by: Charles Rose <charles_rose@dell.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [atomichost] fix collection of 'docker info' outputBryn M. Reeves2016-08-191-3/+6
| | | | | | | | | | | | | | | The loop that drives collection of 'docker info' output for each discovered Image ID incorrectly attempted to call strip() on the dictionary returned by get_command_output(). Since the docker command does not produce leading or trailing whitespace this is redundant anyway: discard the other entries in the command dictionary and just split the result into distinct lines. Resolves: #853. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [grub2] grub2-mkconfig loads ext4 and brctl kernel modulesPavel Moravec2016-08-191-4/+7
| | | | | | | | | Call grub2-mkconfig with GRUB_DISABLE_OS_PROBER=true to prevent explicit loading of the kernel modules. Resolves: #822 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [general] call a command with specified environmentPavel Moravec2016-08-192-14/+23
| | | | | | | | | | Enable calling commands via add_cmd_output with the possibility to update environmental variables. New option 'env' added (None or a dict). When set, it appends to or overrides os.environ used when calling the command from add_cmd_output. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [ceph] skip collecting of all keyring and bindpass filesPavel Moravec2016-08-051-4/+5
| | | | | | | | | | | | | | Do not collect any keyring files - expand the add_forbidden_path regular expressions accordingly to cover there filenames like: /var/lib/ceph/tmp/keyring.mon.magna055 Do not either collect any /etc/ceph/*bindpass* that can store LDAP bind passwords. Resolves: #861 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [monit] fix add_copy_spec() argumentsBryn M. Reeves2016-07-151-1/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [atomichost] improve 'atomic info' collection loopBryn M. Reeves2016-07-131-5/+6
| | | | | | | | Remove redundant code from the loop that drives 'atomic info' collection and make the bracketing and indenting style match other plugins. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [atomichost] replace custom logic with Policy.in_container()Bryn M. Reeves2016-07-131-4/+1
| | | | | | | Don't reinvent the wheel by inspecting file system paths: rely on the existing policy class in_container() method. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [atomichost] fix option list styleBryn M. Reeves2016-07-131-2/+3
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [networking] single quote innermost strings in nmcli commandsBryn M. Reeves2016-07-081-2/+13
| | | | | | | | | | | | | | | | Network Manager names may contain embedded quotes (" and '). These will cause an exception in shlex.split() if the quotes are unbalanced. This may happen with names like: "Foobar's Wireless Network". Although the problen will occur for both single and double quote characters the former is considerably more likely in object names since it is syntactically valid in many human languages. Reverse the normal sos quoting convention here and place double quotes around the innermost quoted string. RHBZ# 1353992 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [virtwho] add new plugin for virt-who agentBryn M. Reeves2016-07-071-0/+34
| | | | | | | | Add a new plugin for the virtual guest ID reporting agent. RHBZ#1353552 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [sos] bump version to 3.33.3Bryn M. Reeves2016-06-291-1/+4
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [origin] New plugin for OpenShift Origin / OSE 3.xPep Turró Mauri2016-06-292-1/+203
| | | | | | | | | | | | | | Add a new plugin to collect information about OpenShift Origin: https://github.com/openshift/origin https://www.openshift.org and related products like Atomic Platform / OpenShift Enterprise 3+. Fixes: #612 Fixes: RHBZ 1246423 Signed-off-by: Pep Turró Mauri <pep@redhat.com>
* [kubernetes] fix string substitutionBryn M. Reeves2016-06-291-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [kubernetes] new data, namespace support, and optionsJake Hunsaker2016-06-291-30/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch collects additional data from kubernetes masters, changes the available plugin options, and makes collection namespace aware. By default, json output will be collected for events, limitranges, pods, pvcs, replicationcontrollers, resourcequotas and services on a per-namespace basis. Note that the 'serviceaccount' and 'secrets' resources are not collected due to the high risk of exposing secure information. Version and 'config view' output is now collected. The 'all' option (default enabled) will collect a non-json listing of each resource across all namespaces for ease of reference. The 'describe' option (default enabled) will collect 'kubectl describe' output, non-json, for each object of each resource in each namespace, if present. The 'podslog' option has been renamed to 'podlogs' and is disabled by default. Note that while this will run on OpenShift v3 masters, only resources shared by OpenShift and 'plain' Kubernetes are collected by this plugin. OpenShift routes for example are not collected. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Plugin] Add mechanism to remove certificates and keys from outputJake Hunsaker2016-06-291-0/+34
| | | | | | | | | | | | | This adds a 'do_cmd_private_sub()' function that removes collected certificates and keys. This function takes a cmd name to match against output collected, but does not take a regexp or substituting string as does do_cmd_output_sub(). Any found certificates or keys are replaced by a '-----SCRUBBED' line, e.g.: "-----SCRUBBED CERTIFICATE-----" or "-----SCRUBBED RSA PRIVATE KEY-----" Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [lxd] Use add_copy_spec_limitLouis Bouchard2016-06-291-3/+2
| | | | | | | sizelimit is only available with add_copy_spec_limit. Replace it. Closes: #843 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
* [reporting] html_report skips plugins .. with nonASCIIPavel Moravec2016-06-291-10/+19
| | | | | | | | | | | | | | [reporting] html_report skips plugins that collected file with nonASCII character in their name Converting all html report strings to unicode with utf-8 encoding. Does not work ideally on py2 where the report does not skip a plugin but breaks encoding of most nonASCII characters. Resolves: #835 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [gdm] Fix misspelled unitsLouis Bouchard2016-06-291-1/+1
| | | | | | | | unit= should be units= Closes: #841 Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
* [tomcat] Added collection of all tomcat* logsCoty Sutherland2016-06-291-4/+25
| | | | | | | | | | | Optionally collect all tomcat logs, in addition to catalina.out, with the use of the --all-logs option and update tomcat paths for versions 7 and 8 (as packaged in Red Hat JBoss). Resolves #836. Signed-off-by: Coty Sutherland <csutherl@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [gluster] limit size of logs collectedPavel Moravec2016-06-291-2/+16
| | | | | | | | Apply global parameters when collecting gluster logs. Resolves: #834 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [policies/redhat] update container detection testBryn M. Reeves2016-06-271-3/+4
| | | | | | | | | | | | | | | Between Docker, systemd, and the various other components used to manage docker-style containers on Red Hat's Atomic-based distros the agreed upon environment variable used to detect a container has changed: container_uuid="" is no longer exported. container="docker"|"..." is now exported instead. Update the in container checks to use the new variable name. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* [reporting] deal with UTF-8 charactersPavel Moravec2016-06-273-11/+17
| | | | | | | | | | | | | replace str class functions by unicode variants: 1) "\n".join(buf) needs to pass decoded UTF-8 text 2) uniform python2 and python3 str/unicode type 3) fd.write needs to replace str(..) by some other function name 4) fd.write needs to encode UTF-8 5) update tests/report_tests.py like 2) Resolves: #722, #723. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [lightdm] Add missing "" to commandBryan Quigley2016-06-031-1/+1
| | | | Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
* [processor] Capture turbostat outputShane Bradley2016-06-031-2/+3
| | | | | | | | | | | | The turbostat command is a topological report. This report will show what cstate and pstate processors are in, what the processor frequency is during that timeand how busy each core is. The cstate %'s tell us when we are saving power at the expense of performance which is useful for knowing if the host is optimally configured. Fixes: #802 Signed-off-by: Shane Bradley <sbradley@redhat.com>
* [memory] Capture status of hugepagesShane Bradley2016-06-031-1/+2
| | | | | | | | | | Determing if hugepages is enabled is useful to know when trouble-shooting applications that can take advantage of huge pages. Fixes: #798 Signed-off-by: Shane Bradley <sbradley@redhat.com>
* [block] Capture the scheduler used by all block devicesShane Bradley2016-06-031-1/+2
| | | | | | Fixes: #799 Signed-off-by: Shane Bradley <sbradley@redhat.com>
* [ipmi] Fix ipmitool optionsBryn M. Reeves2016-06-031-2/+2
| | | | | | | | | | | | | | As per ipmitool man page 'bmc' option is deprecreated. Instead use 'mc' option to get BMC information. Also we don't have 'sel log' option. Use 'sel list' option to get SEL log information. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com> --- sos/plugins/ipmitool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)