pax_global_header00006660000000000000000000000064136216022210014505gustar00rootroot0000000000000052 comment=8bb129f1d64e056e27def5fc60fbc6f71684f1a1 sos-3.9/000077500000000000000000000000001362160222100121645ustar00rootroot00000000000000sos-3.9/.github/000077500000000000000000000000001362160222100135245ustar00rootroot00000000000000sos-3.9/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000013761362160222100173340ustar00rootroot00000000000000--- Please place an 'X' inside each '[]' to confirm you adhere to our [Contributor Guidelines](https://github.com/sosreport/sos/wiki/Contribution-Guidelines) - [ ] Is the commit message split over multiple lines and hard-wrapped at 72 characters? - [ ] Is the subject and message clear and concise? - [ ] Does the subject start with **[plugin_name]** if submitting a plugin patch or a **[section_name]** if part of the core sosreport code? - [ ] Does the commit contain a **Signed-off-by: First Lastname **? - [ ] If this commit closes an existing issue, is the line `Closes: #ISSUENUMBER` included in an independent line? - [ ] If this commit resolves an existing pull request, is the line `Resolves: #PRNUMBER` included in an independent line? sos-3.9/.gitignore000066400000000000000000000006371362160222100141620ustar00rootroot00000000000000*~ *.class *swp* *.pyc *.sw* tags buildjar/ gpgkeys/rhsupport.* dist-build/* cover/ .coverage *.mo sos.conf.5.gz sosreport.1.gz venv MANIFEST build/ dist/ docs/_build # Pycharm .idea/**/workspace.xml .idea/**/tasks.xml .idea/dictionaries .idea/**/dataSources/ .idea/**/dataSources.ids .idea/**/dataSources.xml .idea/**/dataSources.local.xml .idea/**/sqlDataSources.xml .idea/**/dynamic.xml .idea/**/uiDesigner.xml sos-3.9/.travis.yml000066400000000000000000000045431362160222100143030ustar00rootroot00000000000000jobs: include: - name: "18.04 pycodestyle and native run (py3.6)" os: linux dist: bionic language: shell install: sudo apt-get update; sudo apt install pycodestyle; script: - "pycodestyle sos" - "sudo ./tests/simple.sh" - name: "16.04 native run (py3.5)" os: linux dist: xenial language: shell script: "sudo ./tests/simple.sh" - name: "nosetests and travis Python 2.7" os: linux dist: bionic language: python python: "2.7" install: pip install -r requirements.txt; python setup.py install; script: - "nosetests -v --with-cover --cover-package=sos --cover-html" - "sudo ./tests/simple.sh ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python" - name: "nosetests and travis Python 3.5" os: linux dist: bionic language: python python: "3.5" install: pip install -r requirements.txt; python setup.py install; script: - "nosetests -v --with-cover --cover-package=sos --cover-html" - "sudo ./tests/simple.sh ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python" - name: "nosetests and travis Python 3.6" os: linux dist: bionic language: python python: "3.6" install: pip install -r requirements.txt; python setup.py install; script: - "nosetests -v --with-cover --cover-package=sos --cover-html" - "sudo ./tests/simple.sh ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python" - name: "nosetests and travis Python 3.7" os: linux dist: bionic language: python python: "3.7" install: pip install -r requirements.txt; python setup.py install; script: - "nosetests -v --with-cover --cover-package=sos --cover-html" - "sudo ./tests/simple.sh ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python" - name: "nosetests and travis Python 3.8" os: linux dist: bionic language: python python: "3.8" install: pip install -r requirements.txt; python setup.py install; script: - "nosetests -v --with-cover --cover-package=sos --cover-html" - "sudo ./tests/simple.sh ~/virtualenv/python$TRAVIS_PYTHON_VERSION/bin/python" notifications: email: sos-devel@redhat.com irc: channels: - "us.freenode.net#sosreport" on_success: change git: depth: 5 sos-3.9/AUTHORS000066400000000000000000000120041362160222100132310ustar00rootroot00000000000000Individuals ----------- Aaron Conole Abhijeet Kasurde Adam Stokes Adrien Kunysz Alan Pevec Alexandru Juncu Ante Karamatic Archit Sharma Aruna Balakrishnaiah Assaf Muller Ben Turner Bharani C.V. Bill Yodlowsky Brent Eagles Bryan Quigley Bryn M. Reeves Chris J Arges Chris Johnston Chris Newcomer Christy Perez Coty Sutherland Dimitri John Ledkov Eduardo Damato Edward Hope-Morley Eoghan Glynn Eric Desrochers Eric Rich Eric Williams Eugene Teo Felipe Reyes Flaper Fesp Flavio Leitner Flavio Percoco Frank Ch. Eigler Gary Kotton Gaël Chamoulaud Germano Veit Michel Guy Streeter Günther Deschner Harald Klein Hisanobu Okuda Jacob Wen Jake Hunsaker James Hunt Jan Grant Jan Pokorný Jeff Dutton Jeff Peeler Jeff Welch Jeremy Agee Jeremy Crafts Jeremy Eder Jesse Jaggars Jian Wen Jiri Popelka Jirka Hladky Joel Stanley Joey Boggs John Berninger John Haxby Jon Magrini Jon Stanley Jorge Niedbalski Jose Castillo Justin Payne Justin Stephenson Kamalesh Babulal Keigo Noha Keith Kearnan Keith Robertson Kenneth Koski Kent Lamb Kevin Traynor Lee Yarwood Leno Hou Louis Bouchard Luca Miccini Luigi Toscano Lukas Herbolt Lukas Zapletal Major Hayden Marc Sauton Martin Frodl Martin Schuppert Michael Adam Michael Kerrin Michal Srb Michele Baldessari Mukesh Ojha Navid Sheikhol-Eslami Neependra Khare Nijin Ashok Pablo Iranzo Gómez Patrick Talbert Pavel Moravec Pep Turro Mauri Peter Portante Pierguido Lambri Pierre Amadio Pierre Carrier Piotr Drąg Poornima Pratik Bandarkar Ranjith Rajaram Raphael Badin Richard Brantley Robb Manes Rohan Kanade Sachin Sadique Puthen Samuel Mendoza-Jonas Sandro Bonazzola Shane Bradley Shijoe George Soumya Koduri Steve Conklin Tim Speetjens Tomas Petr Tomas Smetana Tomas Tomecek Vasant Hegde Xavier Queralt Yedidyah Bar David amitg.b14@gmail.com galstrom21 hari gowtham jbainbri jhjaggars mulhern ncoghlan qsn spandey tanaka_733 tiwillia@redhat.com Companies --------- Red Hat, Inc. Rackspace US, Inc. EMC Corporation Canonical, Ltd. IBM Corporation Hewlett-Packard Development Company, L.P. Oracle Corporation Organizations ------------- The Linux Foundation Sambasos-3.9/LICENSE000066400000000000000000000431141362160222100131740ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. sos-3.9/Makefile000066400000000000000000000064371362160222100136360ustar00rootroot00000000000000# # Makefile for sos system support tools # NAME = sos VERSION := $(shell echo `awk '/^Version:/ {print $$2}' sos.spec`) MAJOR := $(shell echo $(VERSION) | cut -f 1 -d '.') MINOR := $(shell echo $(VERSION) | cut -f 2 -d '.') RELEASE := $(shell echo `awk '/^Release:/ {gsub(/\%.*/,""); print $2}' sos.spec`) REPO = https://github.com/sosreport/sos SUBDIRS = po sos sos/plugins sos/policies docs PYFILES = $(wildcard *.py) # OS X via brew # MSGCAT = /usr/local/Cellar/gettext/0.18.1.1/bin/msgcat MSGCAT = msgcat DIST_BUILD_DIR = dist-build RPM_DEFINES = --define "_topdir %(pwd)/$(DIST_BUILD_DIR)" \ --define "_builddir %{_topdir}" \ --define "_rpmdir %{_topdir}" \ --define "_srcrpmdir %{_topdir}" \ --define "_specdir %{_topdir}" \ --define "_sourcedir %{_topdir}" RPM = rpmbuild RPM_WITH_DIRS = $(RPM) $(RPM_DEFINES) ARCHIVE_DIR = $(DIST_BUILD_DIR)/$(NAME)-$(VERSION) DEB_ARCHIVE_DIR = $(DIST_BUILD_DIR)/$(NAME)report-$(VERSION) SRC_BUILD = $(DIST_BUILD_DIR)/sdist PO_DIR = $(SRC_BUILD)/sos/po .PHONY: docs docs: make -C docs html man .PHONY: build build: for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done .PHONY: install install: mkdir -p $(DESTDIR)/usr/sbin mkdir -p $(DESTDIR)/usr/share/man/man1 mkdir -p $(DESTDIR)/usr/share/man/man5 mkdir -p $(DESTDIR)/usr/share/$(NAME)/extras @gzip -c man/en/sosreport.1 > sosreport.1.gz @gzip -c man/en/sos.conf.5 > sos.conf.5.gz mkdir -p $(DESTDIR)/etc install -m755 sosreport $(DESTDIR)/usr/sbin/sosreport install -m644 sosreport.1.gz $(DESTDIR)/usr/share/man/man1/. install -m644 sos.conf.5.gz $(DESTDIR)/usr/share/man/man5/. install -m644 AUTHORS README.md $(DESTDIR)/usr/share/$(NAME)/. install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done $(NAME)-$(VERSION).tar.gz: clean @mkdir -p $(ARCHIVE_DIR) @tar -cv sosreport sos docs man po sos.conf AUTHORS LICENSE README.md sos.spec Makefile | tar -x -C $(ARCHIVE_DIR) @tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) --exclude-vcs $(NAME)report_$(VERSION).orig.tar.gz: clean @mkdir -p $(DEB_ARCHIVE_DIR) @tar --exclude-vcs \ --exclude=.travis.yml \ --exclude=debian \ --exclude=$(DIST_BUILD_DIR) -cv . | tar -x -C $(DEB_ARCHIVE_DIR) @tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)report_$(VERSION).orig.tar.gz $(NAME)report-$(VERSION) @mv $(DIST_BUILD_DIR)/$(NAME)report_$(VERSION).orig.tar.gz . @rm -Rf $(DIST_BUILD_DIR) clean: @rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.gz sosreport.1.gz sos.conf.5.gz @rm -rf rpm-build @for i in `find . -iname *.pyc`; do \ rm -f $$i; \ done; \ for d in $(SUBDIRS); do make -C $$d clean ; done srpm: clean $(NAME)-$(VERSION).tar.gz $(RPM_WITH_DIRS) -ts $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz rpm: clean $(NAME)-$(VERSION).tar.gz $(RPM_WITH_DIRS) -tb $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz po: clean mkdir -p $(PO_DIR) for po in `ls po/*.po`; do \ $(MSGCAT) -p -o $(PO_DIR)/sos_$$(basename $$po | awk -F. '{print $$1}').properties $$po; \ done; \ cp $(PO_DIR)/sos_en.properties $(PO_DIR)/sos_en_US.properties cp $(PO_DIR)/sos_en.properties $(PO_DIR)/sos.properties test: nosetests -v --with-cover --cover-package=sos --cover-html sos-3.9/README.md000066400000000000000000000062571362160222100134550ustar00rootroot00000000000000[![Build Status](https://travis-ci.org/sosreport/sos.svg?branch=master)](https://travis-ci.org/sosreport/sos) # SoS Sos is an extensible, portable, support data collection tool primarily aimed at Linux distributions and other UNIX-like operating systems. This project is hosted at: * https://github.com/sosreport/sos For the latest version, to contribute, and for more information, please visit the project pages or join the mailing list. To clone the current master (development) branch run: ``` git clone git://github.com/sosreport/sos.git ``` ## Reporting bugs Please report bugs via the mailing list or by opening an issue in the [GitHub Issue Tracker][5] ## Mailing list The [sos-devel][4] is the mailing list for any sos-related questions and discussion. Patch submissions and reviews are welcome too. ## Patches and pull requests Patches can be submitted via the mailing list or as GitHub pull requests. If using GitHub please make sure your branch applies to the current master as a 'fast forward' merge (i.e. without creating a merge commit). Use the `git rebase` command to update your branch to the current master if necessary. Please refer to the [contributor guidelines][0] for guidance on formatting patches and commit messages. ## Documentation User and API [documentation][6] is automatically generated using [Sphinx][7] and [Read the Docs][8]. To generate HTML documents locally, install dependencies using ``` pip install -r requirements.txt ``` and run ``` make ``` Please run `make test` before sending a [pull request][0], or run the test suite manually using the `nosetests` command (ideally for the set of Python versions currently supported by `sos` upstream). ### Wiki * [How to write a plugin][1] * [How to write a policy][2] * [Plugin options][3] To help get your changes merged quickly with as few revisions as possible please refer to the [Contributor Guidelines][0] when submitting patches or pull requests. ## Installation ### Manual Installation You can simply run from the git checkout now: ``` $ sudo ./sosreport -a ``` Or, if you only have python3 installed: ``` $ sudo python3 ./sosreport -a ``` * Note: the `sosreport` command requires a configuration file: if no `sos.conf` is present in the `/etc` directory (i.e. no system installation of sos exists), use the `--config` option to provide one: ``` $ sudo python ./sosreport -a --config ./sos.conf ``` To install locally (as root): ``` # make install ``` To build an rpm: ``` $ make rpm ``` ### Pre-built Packaging Fedora/RHEL users install via yum: ``` yum install sos ``` Debian users install via apt: ``` apt install sosreport ``` Ubuntu (14.04 LTS and above) users install via apt: ``` sudo apt install sosreport ``` [0]: https://github.com/sosreport/sos/wiki/Contribution-Guidelines [1]: https://github.com/sosreport/sos/wiki/How-to-Write-a-Plugin [2]: https://github.com/sosreport/sos/wiki/How-to-Write-a-Policy [3]: https://github.com/sosreport/sos/wiki/Plugin-options [4]: https://www.redhat.com/mailman/listinfo/sos-devel [5]: https://github.com/sosreport/sos/issues?state=open [6]: https://sos.readthedocs.org/en/latest/index.html [7]: https://www.sphinx-doc.org/ [8]: https://www.readthedocs.org/ sos-3.9/__run__.py000077500000000000000000000006631362160222100141460ustar00rootroot00000000000000# This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General Public License. # # See the LICENSE file in the source distribution for further information. from sos.sosreport import main import sys main(sys.argv[1:]) # vim: set et ts=4 sw=4 : sos-3.9/docs/000077500000000000000000000000001362160222100131145ustar00rootroot00000000000000sos-3.9/docs/Makefile000066400000000000000000000234501362160222100145600ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build DOCDESTDIR = ${DESTDIR}/usr/share/doc/sos # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext install-dir install-html install-dirhtml install-singlehtml install-pickle install-json install-htmlhelp install-qthelp install-epub install-latex install-text install-man install-texinfo install-info install-gettext install-changes install-linkcheck install-doctest install-xml install-pseudoxml install help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* install-dir: install -d -m 0755 ${DOCDESTDIR} html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." install-html: install-dir if test -d ${BUILDDIR}/html; then \ cp -r ${BUILDDIR}/html ${DOCDESTDIR}; \ else \ exit 0; \ fi dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." install-dirhtml: install-dir if test -d ${BUILDDIR}/dirhtml; then \ cp -r ${BUILDDIR}/dirhtml ${DOCDESTDIR}; \ else \ exit 0; \ fi singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." install-singlehtml: install-dir if test -d ${BUILDDIR}/singlehtml; then \ cp -r ${BUILDDIR}/singlehtml ${DOCDESTDIR}; \ else \ exit 0; \ fi pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." install-pickle: install-dir if test -d ${BUILDDIR}/pickle; then \ cp -r ${BUILDDIR}/pickle ${DOCDESTDIR}; \ else \ exit 0; \ fi json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." install-json: install-dir if test -d ${BUILDDIR}/json; then \ cp -r ${BUILDDIR}/json ${DOCDESTDIR}; \ else \ exit 0; \ fi htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." install-htmlhelp: install-dir if test -d ${BUILDDIR}/htmlhelp; then \ cp -r ${BUILDDIR}/htmlhelp ${DOCDESTDIR}; \ else \ exit 0; \ fi qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SoS.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SoS.qhc" install-qthelp: install-dir if test -d ${BUILDDIR}/qthelp; then \ cp -r ${BUILDDIR}/qthelp ${DOCDESTDIR}; \ else \ exit 0; \ fi devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/SoS" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SoS" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." install-epub: install-dir if test -d ${BUILDDIR}/epub; then \ cp -r ${BUILDDIR}/epub ${DOCDESTDIR}; \ else \ exit 0; \ fi latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." install-latex: install-dir if test -d ${BUILDDIR}/latex; then \ cp -r ${BUILDDIR}/latex ${DOCDESTDIR}; \ else \ exit 0; \ fi latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." install-text: install-dir if test -d ${BUILDDIR}/text; then \ cp -r ${BUILDDIR}/text ${DOCDESTDIR}; \ else \ exit 0; \ fi man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." install-man: if test -d ${BUILDDIR}/man; then \ gzip -c ${BUILDDIR}/man/sos.1 > ${BUILDDIR}/man/sos.1.gz; \ install -m644 ${BUILDDIR}/man/sos.1.gz $(DESTDIR)/usr/share/man/man1; \ else \ exit 0; \ fi texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." install-texinfo: install-dir if test -d ${BUILDDIR}/texinfo; then \ cp -r ${BUILDDIR}/texinfo ${DOCDESTDIR}; \ else \ exit 0; \ fi info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." install-info: install-dir install-texinfo gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." install-gettext: install-dir if test -d ${BUILDDIR}/locale; then \ cp -r ${BUILDDIR}/locale ${DOCDESTDIR}; \ else \ exit 0; \ fi changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." install-changes: install-dir if test -d ${BUILDDIR}/changes; then \ cp -r ${BUILDDIR}/changes ${DOCDESTDIR}; \ else \ exit 0; \ fi linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." install-linkcheck: install-dir if test -d ${BUILDDIR}/linkcheck; then \ cp -r ${BUILDDIR}/linkcheck ${DOCDESTDIR}; \ else \ exit 0; \ fi doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." install-doctest: install-dir if test -d ${BUILDDIR}/doctest; then \ cp -r ${BUILDDIR}/doctest ${DOCDESTDIR}; \ else \ exit 0; \ fi xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." install-xml: install-dir if test -d ${BUILDDIR}/xml; then \ cp -r ${BUILDDIR}/xml ${DOCDESTDIR}; \ else \ exit 0; \ fi pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." install-pseudoxml: install-dir if test -d ${BUILDDIR}/pseudoxml; then \ cp -r ${BUILDDIR}/pseudoxml ${DOCDESTDIR}; \ else \ exit 0; \ fi install: install-html install-dirhtml install-singlehtml install-pickle install-json install-htmlhelp install-qthelp install-epub install-latex install-text install-man install-texinfo install-info install-gettext install-changes install-linkcheck install-doctest install-xml install-pseudoxml sos-3.9/docs/archive.rst000066400000000000000000000002601362160222100152650ustar00rootroot00000000000000``sos.archive`` --- Archive Interface ===================================== .. automodule:: sos.archive :noindex: :members: :undoc-members: :show-inheritance: sos-3.9/docs/conf.py000066400000000000000000000200541362160222100144140ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SoS documentation build configuration file, created by # sphinx-quickstart on Fri Aug 1 11:43:30 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('..')) import sos # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = 'SoS' copyright = '2014, Bryn Reeves' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '3.2' # The full version, including alpha/beta/rc tags. release = '3.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. #keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = [] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'SoSdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'SoS.tex', 'SoS Documentation', 'Bryn Reeves', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'sos', 'SoS Documentation', ['Bryn Reeves'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'SoS', 'SoS Documentation', 'Bryn Reeves', 'SoS', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False sos-3.9/docs/index.rst000066400000000000000000000050551362160222100147620ustar00rootroot00000000000000SoS === Sos is an extensible, portable, support data collection tool primarily aimed at Linux distributions and other UNIX-like operating systems. This is the SoS developer documentation, for user documentation refer to: https://github.com/sosreport/sos/wiki This project is hosted at: https://github.com/sosreport/sos For the latest version, to contribute, and for more information, please visit the project pages or join the mailing list. To clone the current master (development) branch run: .. code:: git clone git://github.com/sosreport/sos.git Reporting bugs ^^^^^^^^^^^^^^ Please report bugs via the mailing list or by opening an issue in the GitHub Issue Tracker Mailing list ^^^^^^^^^^^^^ `sos-devel `_ is the mailing list for any sos-related questions and discussion. Patch submissions and reviews are welcome too. Patches and pull requests ^^^^^^^^^^^^^^^^^^^^^^^^^ Patches can be submitted via the mailing list or as GitHub pull requests. If using GitHub please make sure your branch applies to the current master as a 'fast forward' merge (i.e. without creating a merge commit). Use the git rebase command to update your branch to the current master if necessary. Documentation ============= User and API `documentation `_ is automatically generated using `Sphinx `_ and `Read the Docs `_. Wiki ^^^^ `How to write a plugin `_ `How to write a policy `_ `Plugin options `_ To help get your changes merged quickly with as few revisions as possible please refer to the `Contributor Guidelines `_ when submitting patches or pull requests. Installation ============ Manual Installation ^^^^^^^^^^^^^^^^^^^ .. code:: to install locally (as root) ==> make install to build an rpm ==> make rpm to build a deb ==> make deb Pre-built Packaging ^^^^^^^^^^^^^^^^^^^ Fedora/RHEL users install via yum: ``yum install sos`` Debian users install via apt: ``apt install sosreport`` Ubuntu (14.04 LTS and above) users install via apt: ``sudo apt install sosreport`` API === Plugin Reference ^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 2 plugins Core Reference ^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 2 archive policies reporting utilities sos-3.9/docs/plugins.rst000066400000000000000000000002561362160222100153320ustar00rootroot00000000000000``sos.plugins`` --- Plugin Interface ==================================== .. automodule:: sos.plugins :noindex: :members: :undoc-members: :show-inheritance: sos-3.9/docs/policies.rst000066400000000000000000000002611362160222100154540ustar00rootroot00000000000000``sos.policies`` --- Policy Interface ===================================== .. automodule:: sos.policies :noindex: :members: :undoc-members: :show-inheritance: sos-3.9/docs/reporting.rst000066400000000000000000000002721362160222100156600ustar00rootroot00000000000000``sos.reporting`` --- Reporting Interface ========================================= .. automodule:: sos.reporting :noindex: :members: :undoc-members: :show-inheritance: sos-3.9/docs/utilities.rst000066400000000000000000000002701362160222100156600ustar00rootroot00000000000000``sos.utilities`` --- Utilites Interface ======================================== .. automodule:: sos.utilities :noindex: :members: :undoc-members: :show-inheritance: sos-3.9/example_plugins/000077500000000000000000000000001362160222100153605ustar00rootroot00000000000000sos-3.9/example_plugins/example.py000077500000000000000000000044671362160222100174030ustar00rootroot00000000000000# This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General Public License. # # See the LICENSE file in the source distribution for further information. from sos.plugins import Plugin, RedHatPlugin # the class name determines the plugin name # if you want to override it simply provide a @classmethod name() # that returns the name you want class example(Plugin, RedHatPlugin): """This is the description for the example plugin""" # Plugin developers want to override setup() from which they will call # add_copy_spec() to collect files and collectExtOutput() to collect programs # output. # Add your options here, indicate whether they are slow to run, and set # whether they are enabled by default # each option is a tuple of the following format: # (name, description, fast or slow, default value) # each option will be addressable like -k name=value option_list = [("init.d", 'Gathers the init.d directory', 'slow', 0), ('follicles', 'Gathers information about each follicle on every toe', 'slow', 0), ('color', 'Gathers toenail polish color', 'fast', 0)] def setup(self): """ First phase - Collect all the information we need. Directories are copied recursively. arbitrary commands may be executed using the collectExtOutput() method. Information is automatically saved, and links are presented in the report to each file or directory which has been copied to the saved tree. Also, links are provided to the output from each command. """ # Here's how to copy files and directory trees self.add_copy_spec("/etc/hosts") with open("/proc/cpuinfo") as f: for line in f: if "vendor_id" in line: self.add_alert("Vendor ID string is: %s
\n" % line) # Here's how to test your options and execute if enabled if self.option_enabled("init.d"): self.add_copy_spec("/etc/init.d") # copies a whole directory tree # Here's how to execute a command self.collectExtOutput("/bin/ps -ef") # vim: set et ts=4 sw=4 : sos-3.9/man/000077500000000000000000000000001362160222100127375ustar00rootroot00000000000000sos-3.9/man/en/000077500000000000000000000000001362160222100133415ustar00rootroot00000000000000sos-3.9/man/en/sos.conf.5000066400000000000000000000027331362160222100151640ustar00rootroot00000000000000.TH "sos.conf" "5" "SOSREPORT" "sosreport configuration file" .SH NAME sos.conf \- sosreport configuration .SH DESCRIPTION .sp sosreport uses a configuration file at /etc/sos.conf. .SH PARAMETERS .sp There are three sections in the sosreport configuration file: general, plugins and tunables. Options are set using 'ini'-style \fBname = value\fP pairs. Disabling/enabling a boolean option is done the same way like on command line (e.g. process.lsof=off). Some options accept a comma separated list of values. Using options that dont expect a value (like all-logs or no-report) will result in enabling those options, regardless of value set. Sections are parsed in the ordering: .br - \fB[general]\fP .br - \fB[plugins]\fP (disable) .br - \fB[plugins]\fP (enable) .br - \fB[tunables]\fP .TP \fB[general]\fP