aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove top output from kvm plug-inBryn M. Reeves2013-04-261-4/+0
| | | | | | | | Subsystem plug-ins have no business collecting general performance data. Remove the top output collection and topOutput command line option. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix detection of ext file systems in filesys plug-inBryn M. Reeves2013-04-261-3/+5
| | | | | | | | | | | | The code to collect dumpe2fs output does not work on modern systems due to changes in the output of the mount command. Have the plug-in use /proc/mounts instead and simplify and improve the regex used to find devices containing ext[234] file systems and switch to 'dumpe2fs -h' collection rather than getting the full group lists. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix broken option_list in filesys plug-inBryn M. Reeves2013-04-261-2/+2
| | | | | | | | The filesys plugin has the "option_list defined twice" bug. Fix it and ensure that both the 'lsof' and 'dumpe2fs' options are usable. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix UnboundLocalError during command output substitutionBryn M. Reeves2013-04-261-0/+4
| | | | | | | | | | | | | | | | | | | | | Plugin.do_cmd_output_sub() assumes that the list of executed commands is non-empty if the list of commands requested is non-empty. This can be false (e.g. when a command is run speculatively and the binary is not present) leading to an unbound variable exception as the code never sets the variable used as the return value: Traceback (most recent call last): File "/usr/sbin/sosreport", line 23, in <module> main(sys.argv[1:]) File "/usr/lib/python2.7/dist-packages/sos/sosreport.py", line 1154, in main sos.execute() UnboundLocalError: local variable 'replacements' referenced before assignment > /usr/lib/python2.7/dist-packages/sos/plugins/__init__.py(197)do_cmd_output_sub() -> return replacements Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Clean up plug-in naming and set plugin_name for all plugin classesBryn M. Reeves2013-04-2688-93/+290
| | | | | | | | | | | | | | | | Clean up some plug-ins with non-conforming or undescriptive names, set plugin_name in all base plug-in classes to avoid <dist><plug> names appearing in reports and remove the obsolete amd plug-in. Rename several plug-ins: - rhn -> satellite (also spacewalk) - i18n -> internationalization - qpidd -> qpid - ftp -> vsftpd Enforce pep8 style class names for all plug-in classes. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Kill the automount daemon plug-in (amd)Bryn M. Reeves2013-04-261-28/+0
| | | | | | | Nothing current ships the amd automounter any more. Remove the plug-in from the tree. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix running of RHN hardware.py scriptBryn M. Reeves2013-04-251-1/+1
| | | | | | | The hardware.py script is no longer executable. Run it via the python interpreter. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix cpu frequency data collection in hardware.pyBryn M. Reeves2013-04-251-4/+10
| | | | | | | | | | The cpu frequency reporting on modern systems has moved from cpufrequtils and the cpufreq command to kernel-tools and the cpupower command. Check for the respective packages and run the correct command. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Break up the device-mapper trainwreckBryn M. Reeves2013-04-256-45/+171
| | | | | | | | | | | | | | | | | | | | | Break the device-mapper plug-in up into separate plugins for dm itself and each of the current device-mapper applications: - devicemapper.py - dmraid.py - block.py - lvm2.py - md.py The data collection for each subsystem is largely unchanged other than to fix bugs and remove obsolete items: - support for multipath bindings in /var dropped (only relevant to RHEL5 and earlier) - collect multipath -l separately from -ll - fix 'udevinfo' -> 'udevadm info' Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Add RHEL7 support to RedHatPolicy.rhel_version()Bryn M. Reeves2013-04-251-0/+2
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Merge pull request #138 from battlemidget/include-authors-fileBryn M. Reeves2013-04-243-23/+4
|\ | | | | Point sosreport manpage to see the AUTHORS file for updated contributors
| * Point sosreport manpage to see the AUTHORS file for updated contributorsAdam Stokes2013-04-233-23/+4
|/ | | | | | | - Include AUTHORS file in the tarball. - Consolidated where list of Authors may be found. Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Fix scoping bug in named.pyBryn M. Reeves2013-04-231-1/+1
| | | | | | | | The path "/etc/named.conf" was made into a class variable to avoid repeating the string through the file. Make sure all uses qualify the variable appropriately. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Move command line parsing out of SoSReport classBryn M. Reeves2013-04-231-70/+316
| | | | | | | | | | | | | | | | | | | | Separate the command line logic from the rest of the SoSReport class and add a new SoSOptions class to contain it. SoSOptions may either be initialised from a command line by passing in an argument list to the initializer or by creating an empty object and setting values for individual properties. For now a SoSOptions object is initialized in the SoSReport initializer (from the argument list passed from __main__). Eventually this will move into __main__ allowing SoSOptions and SoSReport to become an interface for external users. The next step is to move all input validation into the SoSOptions class (it's currently spread around the code that uses the options). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Rename listPlugins to list_pluginsBryn M. Reeves2013-04-231-2/+2
| | | | | | | Rename the option variable listPlugins to list_plugins to conform with pep8 and other uses in the options set. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Clean up SoSReport.execute()Bryn M. Reeves2013-04-231-15/+22
| | | | | | | | | | | | | | | | | | | | Reorganise the SoSReport object's execute() method to facilitate separation of the command line and report generation logic: - Rename ensure_plugins() as verify_plugins() and have it return a boolean to the execute() method. - Push logging down from execute into the individual action methods that carry out the tasks being logged. - Have execute() return a boolean indicating whether the requested operation completed successfully or not. Longer term it may be better to define an enumeration class for sos return statuses. This would allow more expression than simple 'pass' or 'fail' and would help the move toward an API. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix scoping bug in kernel.pyBryn M. Reeves2013-04-231-2/+2
| | | | | | | | The path "/sys/module" was made into a class variable to avoid repeating the string through the file. Make sure all uses qualify the variable appropriately. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Merge branch 'new_ldap' of https://github.com/karibou/sosreportBryn M. Reeves2013-04-231-3/+20
|\ | | | | | | | | Conflicts: sos/plugins/ldap.py
| * ldap.py : improved data collection on Ubuntu/DebianLouis Bouchard2013-04-231-4/+20
| |
* | Merge pull request #136 from karibou/masterBryn M. Reeves2013-04-234-6/+7
|\ \ | | | | | | Minor fixes and reformat
| * | fix small misses following refactoringLouis Bouchard2013-04-222-3/+5
| | |
| * | ldap.py : remove unneeded def setupLouis Bouchard2013-04-221-1/+0
| | |
| * | landscape.py : fix old format in cmdLouis Bouchard2013-04-221-2/+2
| |/
* | Clean up /proc data collection in kernel plug-inBryn M. Reeves2013-04-221-4/+3
| | | | | | | | | | | | | | | | | | Reorder the list of collected files so that all *info appear together to avoid duplication and other errors creeping in. Get rid of /proc/ksyms (2.4) and replace with /proc/kallsyms. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Fix modinfo collectionBryn M. Reeves2013-04-221-13/+11
| | | | | | | | | | | | | | | | | | | | The modinfo collection for the set of loaded modules was using a nasty handrolled pipeline of lsmod | cut |.. to generate a list of module names to pass to modinfo. Rip all that out and replace it with an os.listdir('/sys/module'). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Add a suggest_filename to e820 mapBryn M. Reeves2013-04-221-1/+2
| | | | | | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Merge pull request #133 from jhjaggars/masterBryn M. Reeves2013-04-221-3/+4
|\ \ | | | | | | fix OSX policy loading
| * | Fixing windows policy loading detectionJesse Jaggars2013-04-191-3/+4
| | | | | | | | | | | | Changed the detection logic to not collide with OS X
* | | Update SELinux plug-in for modern distributionsBryn M. Reeves2013-04-221-21/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old SELinux module has had no maintenance in some time. Add the output of the following commands: - sestatus -b [ SELinux status and booleans ] - selinuxdefcon root - selinuxconlist root - selinuxexeccon /bin/passwd Add '-v' to fixfiles command line to produce more verbose output. Drop all setroubleshoot support - this is an optional package for all supported distributions and should be handled in a separate sos plug-in. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | | Fix pre-checks in sar module and enable XML output collectionBryn M. Reeves2013-04-221-5/+23
| |/ |/| | | | | | | | | | | | | | | Move the check on the sar logging directory from setup() to a check_enabled() method and add XML data collection via sadf -x to allow the collected performance data to be imported by other tools on the analysis host. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Fix regression in exit handling codeBryn M. Reeves2013-04-191-3/+0
| | | | | | | | | | | | | | Commit ab00491 introduced a duplicate _exit() method with different parameters. Delete it. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Merge pull request #134 from battlemidget/fix-tabs-to-spaces-in-pluginsBryn M. Reeves2013-04-192-24/+26
|\ \ | | | | | | Fix tabs to spaces in plugins
| * | Another tab-to-space fix in ubuntu policyAdam Stokes2013-04-191-1/+1
| | | | | | | | | | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
| * | Merge branch 'master' into fix-tabs-to-spaces-in-pluginsAdam Stokes2013-04-191-2/+2
| |\ \
| * | | Fixed a few tabs-to-spaces in both pluginsAdam Stokes2013-04-192-24/+26
| | | | | | | | | | | | | | | | Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* | | | Fix sar plug-in sa_path usage and enable on Debian/UbuntuBryn M. Reeves2013-04-191-28/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that all places in the sar plug-in that need to reference the sar log path do so using the sa_path variable. This enables the plug-in to work on other distributions by changing the value of sa_path in a new subclass. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | | | Fix whitespace breakage in previous commitBryn M. Reeves2013-04-191-1/+1
| |/ / |/| | | | | | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | | Fix Ubuntu policy classBryn M. Reeves2013-04-191-2/+2
|/ / | | | | | | | | | | | | | | | | Make sure the ubuntu policy class imports the DebianPlugin tagging class and move initialisation off valid_subclasses from class scope to the constructor since the superclass will reset the property value when its initialiser is called. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Delete fossilised threading codeBryn M. Reeves2013-04-182-11/+2
| | | | | | | | | | | | | | | | Remove left-over bits of the old threading infrastructure such as the "please_exit()" plugin method and must_exit instance variable. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | Merge pull request #131 from battlemidget/patch-1Bryn M. Reeves2013-04-181-1/+1
|\ \ | | | | | | Update README.md
| * | Update README.mdAdam Stokes2013-04-181-1/+1
| | | | | | | | | Due to the results from the Debian packaging policy this package was renamed to sosreport from sos. Updating readme to reflect that
* | | Remove bogus path check in sar moduleBryn M. Reeves2013-04-181-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sar module tries to check for the existence of a binary at some exact path. Since all call outs now go through PATH this no longer works leading to a bogus error level log message. Remove this check and also move the accompanying check on /var/lib/sa into a separate check_enabled method - without this path being present there is nothing for the plug-in to collect. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | | Fix auditd command line optionsBryn M. Reeves2013-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The refactoring in the previous merge commit introduced a bug in the option handling for the auditd plugin ('syslogsize' instead of 'logsize' when referencing the option in setup()). Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* | | Merge branch 'new_ubuntu_plugin'Bryn M. Reeves2013-04-1823-95/+453
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sos/plugins/auditd.py sos/plugins/corosync.py sos/plugins/dovecot.py sos/plugins/general.py sos/plugins/ldap.py sos/plugins/lsbrelease.py sos/plugins/mysql.py sos/plugins/named.py sos/plugins/networking.py sos/plugins/nis.py sos/plugins/ntp.py sos/plugins/pam.py sos/plugins/postfix.py sos/plugins/pxe.py sos/plugins/samba.py sos/plugins/sendmail.py sos/plugins/snmp.py sos/plugins/startup.py sos/policies/debian.py Fixed up numerous bits of breakage due to the recent PATH changes in master and also refactored some of the newly ported plug-ins to reduce the amount of code duplication between distro versions of common plug-ins. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
| * | fix typoLouis Bouchard2013-04-151-2/+2
| | |
| * | Enabled plugin for Ubuntu/DebianLouis Bouchard2013-04-151-3/+27
| | |
| * | Enabled plugin for Ubuntu/DebianLouis Bouchard2013-04-151-3/+19
| | |
| * | Enabled plugin for Ubuntu/DebianLouis Bouchard2013-04-151-2/+2
| | |
| * | Enabled plugin for Ubuntu/DebianLouis Bouchard2013-04-151-4/+26
| | |
| * | Enabled plugin for Ubuntu/DebianLouis Bouchard2013-04-151-2/+24
| | |