pax_global_header00006660000000000000000000000064142765236260014527gustar00rootroot0000000000000052 comment=7a98f67b0b39408fef83729d19025fa238d60e75 sos-4.4/000077500000000000000000000000001427652362600122025ustar00rootroot00000000000000sos-4.4/.cirrus.yml000066400000000000000000000157011427652362600143160ustar00rootroot00000000000000--- # Main environment vars to set for all tasks env: FEDORA_VER: "35" FEDORA_PRIOR_VER: "34" FEDORA_NAME: "fedora-${FEDORA_VER}" FEDORA_PRIOR_NAME: "fedora-${FEDORA_PRIOR_VER}" UBUNTU_NAME: "ubuntu-22.04" UBUNTU_PRIOR_NAME: "ubuntu-20.04" CENTOS_9_NAME: "centos-stream-9" CENTOS_8_NAME: "centos-stream-8" CENTOS_PROJECT: "centos-cloud" FEDORA_PROJECT: "fedora-cloud" SOS_PROJECT: "sos-devel-jobs" UBUNTU_PROJECT: "ubuntu-os-cloud" # These are generated images pushed to GCP from Red Hat # FEDORA_PRIOR to be switched to "stock" images from the Fedora Project # once the F36 image is pushed. FEDORA_PRIOR_IMAGE_NAME: "f${FEDORA_PRIOR_VER}-server-sos-testing" FOREMAN_CENTOS_IMAGE_NAME: "foreman-25-centos-8-sos-testing" FOREMAN_DEBIAN_IMAGE_NAME: "foreman-25-debian-10-sos-testing" # Images exist on GCP already CENTOS_9_IMAGE_NAME: "centos-stream-9-v20220621" CENTOS_8_IMAGE_NAME: "centos-stream-8-v20220621" FEDORA_IMAGE_NAME: "fedora-cloud-base-gcp-${FEDORA_VER}-1-2-x86-64" UBUNTU_IMAGE_NAME: "ubuntu-2204-jammy-v20220622" UBUNTU_PRIOR_IMAGE_NAME: "ubuntu-2004-focal-v20220701" # Default task timeout timeout_in: 30m # enable auto cancelling concurrent builds on main when multiple PRs are # merged at once auto_cancellation: true gcp_credentials: ENCRYPTED[!77d4c8251094346c41db63cb05eba2ff98eaff04e58c5d0e2a8e2c6f159f7d601b3fe9a2a4fce1666297e371f2fc8752!] # Run a simple lint on the community cluster flake8_task: alias: "flake8_test" name: "Flake8 linting test" container: image: alpine/flake8:latest flake_script: flake8 sos # Run a check on newer upstream python versions to check for possible # breaks/changes in common modules. This is not meant to check any of the actual # collections or archive integrity. py_break_task: alias: "py_break" name: "Breakage test python-$PY_VERSION" container: image: "python:${PY_VERSION}" matrix: - env: PY_VERSION: "latest" - env: PY_VERSION: "3.9" # This image has 2 py environments. Install to the one sos uses. setup_script: pip3 install -t /usr/lib/python3/dist-packages -r requirements.txt main_script: ./bin/sos report --batch # Make sure a user can manually build an rpm from the checkout rpm_build_task: alias: "rpm_build" name: "RPM Build From Checkout" container: image: "fedora" setup_script: dnf -y install rpm-build rpmdevtools gettext python3-devel main_script: | rpmdev-setuptree python3 setup.py sdist cp dist/sos*.tar.gz ~/rpmbuild/SOURCES rpmbuild -bs sos.spec rpmbuild -bb sos.spec # Run the stage one (no mocking) tests across all distros on GCP report_stageone_task: alias: "stageone_report" name: "Report Stage One - $BUILD_NAME" gce_instance: &standardvm image_project: "${PROJECT}" image_name: "${VM_IMAGE_NAME}" type: e2-medium matrix: - env: PROJECT: ${CENTOS_PROJECT} BUILD_NAME: ${CENTOS_9_NAME} VM_IMAGE_NAME: ${CENTOS_9_IMAGE_NAME} - env: PROJECT: ${CENTOS_PROJECT} BUILD_NAME: ${CENTOS_8_NAME} VM_IMAGE_NAME: ${CENTOS_8_IMAGE_NAME} - env: PROJECT: ${FEDORA_PROJECT} BUILD_NAME: ${FEDORA_NAME} VM_IMAGE_NAME: ${FEDORA_IMAGE_NAME} - env: PROJECT: ${SOS_PROJECT} BUILD_NAME: ${FEDORA_PRIOR_NAME} VM_IMAGE_NAME: ${FEDORA_PRIOR_IMAGE_NAME} - env: PROJECT: ${UBUNTU_PROJECT} BUILD_NAME: ${UBUNTU_NAME} VM_IMAGE_NAME: ${UBUNTU_IMAGE_NAME} - env: PROJECT: ${UBUNTU_PROJECT} BUILD_NAME: ${UBUNTU_PRIOR_NAME} VM_IMAGE_NAME: ${UBUNTU_PRIOR_IMAGE_NAME} remove_sos_script: &remove_sos | if [ $(command -v apt) ]; then apt -y purge sosreport apt update --allow-releaseinfo-change apt -y install python3-pip fi if [ $(command -v dnf) ]; then dnf -y remove sos dnf -y install python3-pip ethtool fi setup_script: &setup 'pip3 install avocado-framework==94.0 python-magic pyyaml' # run the unittests separately as they require a different PYTHONPATH in # order for the imports to work properly under avocado unittest_script: PYTHONPATH=. avocado run tests/unittests/ main_script: PYTHONPATH=tests/ avocado run --test-runner=runner -t stageone tests/{cleaner,collect,report,vendor}_tests on_failure: fail_script: &faillogs | ls -d /var/tmp/avocado* /root/avocado* 2> /dev/null | xargs tar cf sos-fail-logs.tar log_artifacts: path: "sos-fail-logs.tar" # IFF the stage one tests all pass, then run stage two for latest distros report_stagetwo_task: alias: "stagetwo_report" name: "Report Stage Two - $BUILD_NAME" depends_on: stageone_report gce_instance: *standardvm matrix: - env: PROJECT: ${CENTOS_PROJECT} BUILD_NAME: ${CENTOS_9_NAME} VM_IMAGE_NAME: ${CENTOS_9_IMAGE_NAME} - env: PROJECT: ${CENTOS_PROJECT} BUILD_NAME: ${CENTOS_8_NAME} VM_IMAGE_NAME: ${CENTOS_8_IMAGE_NAME} - env: PROJECT: ${FEDORA_PROJECT} BUILD_NAME: ${FEDORA_NAME} VM_IMAGE_NAME: ${FEDORA_IMAGE_NAME} - env: PROJECT: ${UBUNTU_PROJECT} BUILD_NAME: ${UBUNTU_NAME} VM_IMAGE_NAME: ${UBUNTU_IMAGE_NAME} remove_sos_script: *remove_sos install_pexpect_script: | if [ $(command -v apt) ]; then apt -y install python3-pexpect fi if [ $(command -v dnf) ]; then dnf -y install python3-pexpect fi setup_script: *setup main_script: PYTHONPATH=tests/ avocado run --test-runner=runner -t stagetwo tests/{cleaner,collect,report,vendor}_tests on_failure: fail_script: *faillogs log_artifacts: path: "sos-fail-logs.tar" report_foreman_task: skip: "!changesInclude('.cirrus.yml', '**/{__init__,apache,foreman,foreman_tests,candlepin,pulp,pulpcore}.py')" alias: "foreman_integration" name: "Integration Test - Foreman ${FOREMAN_VER}" depends_on: stageone_report gce_instance: &bigvm <<: *standardvm type: e2-standard-2 matrix: - env: PROJECT: ${SOS_PROJECT} VM_IMAGE_NAME: ${FOREMAN_CENTOS_IMAGE_NAME} FOREMAN_VER: "2.5 - CentOS Stream 8" - env: PROJECT: ${SOS_PROJECT} VM_IMAGE_NAME: ${FOREMAN_DEBIAN_IMAGE_NAME} FOREMAN_VER: "2.5 - Debian 10" remove_sos_script: *remove_sos setup_script: *setup main_script: PYTHONPATH=tests/ avocado run --test-runner=runner -t foreman tests/product_tests/foreman/ on_failure: fail_script: *faillogs log_artifacts: path: "sos-fail-logs.tar" sos-4.4/.editorconfig000066400000000000000000000001531427652362600146560ustar00rootroot00000000000000root = true [*] end_of_line = lf insert_final_newline = true [*.py] indent_style = space indent_size = 4 sos-4.4/.fmf/000077500000000000000000000000001427652362600130305ustar00rootroot00000000000000sos-4.4/.fmf/version000066400000000000000000000000021427652362600144300ustar00rootroot000000000000001 sos-4.4/.github/000077500000000000000000000000001427652362600135425ustar00rootroot00000000000000sos-4.4/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000014461427652362600173500ustar00rootroot00000000000000--- 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 **? - [ ] Are any related Issues or existing PRs [properly referenced](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) via a Closes (Issue) or Resolved (PR) line?sos-4.4/.gitignore000066400000000000000000000006371427652362600142000ustar00rootroot00000000000000*~ *.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-4.4/.packit.yaml000066400000000000000000000007451427652362600144250ustar00rootroot00000000000000downstream_package_name: sos jobs: - job: copr_build metadata: targets: - fedora-development-x86_64 - fedora-development-aarch64 - fedora-development-ppc64le - fedora-development-s390x trigger: pull_request - job: tests trigger: pull_request metadata: targets: - fedora-all - epel-8 - epel-9 specfile_path: sos.spec synced_files: - sos.spec - .packit.yaml upstream_package_name: sos notifications: pull_request: successful_build: true sos-4.4/AUTHORS000066400000000000000000000120041427652362600132470ustar00rootroot00000000000000Individuals ----------- 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-4.4/LICENSE000066400000000000000000000431141427652362600132120ustar00rootroot00000000000000 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-4.4/MANIFEST.in000066400000000000000000000000201427652362600137300ustar00rootroot00000000000000include po/*.po sos-4.4/README.md000066400000000000000000000105161427652362600134640ustar00rootroot00000000000000[![Build Status](https://api.cirrus-ci.com/github/sosreport/sos.svg?branch=main)](https://cirrus-ci.com/github/sosreport/sos) [![Documentation Status](https://readthedocs.org/projects/sos/badge/?version=main)](https://sos.readthedocs.io/en/main/?badge=main) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/sosreport/sos.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/sosreport/sos/context:python) # 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 main (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] ## Chat The SoS project has rooms in Matrix and in Libera.Chat. Matrix Room: #sosreport:matrix.org Libera.Chat: #sos These rooms are bridged, so joining either is sufficient as messages from either will appear in both. The Freenode #sos room **is no longer used by this project**. ## Mailing list The [sos-devel][4] list 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 main branch as a 'fast forward' merge (i.e. without creating a merge commit). Use the `git rebase` command to update your branch to the current main if necessary. Please refer to the [contributor guidelines][0] for guidance on formatting patches and commit messages. Before sending a [pull request][0], it is advisable to check your contribution against the `flake8` linter, the unit tests, and the stage one avocado test suite: ``` # from within the git checkout $ flake8 sos $ nosetests -v tests/unittests/ # as root # PYTHONPATH=tests/ avocado run --test-runner=runner -t stageone tests/{cleaner,collect,report,vendor}_tests ``` Note that the avocado test suite will generate and remove several reports over its execution, but no changes will be made to your local system. All contributions must pass the entire test suite before being accepted. ## 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 ``` python3 setup.py build_sphinx -a ``` ### Wiki For more in-depth information on the project's features and functionality, please see [the GitHub wiki][9]. If you are interested in contributing an entirely new plugin, or extending sos to support your distribution of choice, please see these wiki pages: * [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 ./bin/sos report ``` The command `sosreport` is still available, as a legacy redirector, and can be used like this: ``` $ sudo ./bin/sosreport ``` To see a list of all available plugins and plugin options, run ``` $ sudo ./bin/sos report -l ``` To install locally (as root): ``` # python3 setup.py install ``` ### 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/ [7]: https://www.sphinx-doc.org/ [8]: https://www.readthedocs.org/ [9]: https://github.com/sosreport/sos/wiki sos-4.4/bin/000077500000000000000000000000001427652362600127525ustar00rootroot00000000000000sos-4.4/bin/sos000077500000000000000000000011241427652362600135020ustar00rootroot00000000000000#!/usr/bin/python3 # 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. import sys import os try: sys.path.insert(0, os.getcwd()) from sos import SoS except KeyboardInterrupt: raise SystemExit() if __name__ == '__main__': sos = SoS(sys.argv[1:]) sos.execute() # vim:ts=4 et sw=4 sos-4.4/bin/sos-collector000077500000000000000000000020511427652362600154660ustar00rootroot00000000000000#!/usr/bin/python3 # 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. """ sos entry point. """ import sys import os import time try: # allow running from the git checkout, even though as of 4.0 we are moving # binaries into a bin/ top-level directory. sys.path.insert(0, os.getcwd()) from sos import SoS except KeyboardInterrupt: raise SystemExit() if __name__ == '__main__': msg = ("Please note the 'sos-collector' command has been deprecated in " " favor of the new 'sos' command, E.G. 'sos collect'.\n" "Redirecting to 'sos collect %s'" % (' '.join(sys.argv[1:]) or '')) print(msg) time.sleep(0.5) args = sys.argv[1:] args.insert(0, 'collect') sos = SoS(args) sos.execute() # vim:ts=4 et sw=4 sos-4.4/bin/sosreport000077500000000000000000000020411427652362600147350ustar00rootroot00000000000000#!/usr/bin/python3 # 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. """ sos entry point. """ import sys import os import time try: # allow running from the git checkout, even though as of 4.0 we are moving # binaries into a bin/ top-level directory. sys.path.insert(0, os.getcwd()) from sos import SoS except KeyboardInterrupt: raise SystemExit() if __name__ == '__main__': msg = ("Please note the 'sosreport' command has been deprecated in favor " "of the new 'sos' command, E.G. 'sos report'.\n" "Redirecting to 'sos report %s'" % (' '.join(sys.argv[1:]) or '')) print(msg) time.sleep(0.5) args = sys.argv[1:] args.insert(0, 'report') sos = SoS(args) sos.execute() # vim:ts=4 et sw=4 sos-4.4/docs/000077500000000000000000000000001427652362600131325ustar00rootroot00000000000000sos-4.4/docs/archive.rst000066400000000000000000000005051427652362600153050ustar00rootroot00000000000000``sos.archive`` --- Archive Interface ===================================== .. automodule:: sos.archive :noindex: :members: :undoc-members: :show-inheritance: .. autoclass:: sos.archive.Archive :members: :undoc-members: .. autoclass:: sos.archive.FileCacheArchive :members: :undoc-members: sos-4.4/docs/clusters.rst000066400000000000000000000003051427652362600155260ustar00rootroot00000000000000``sos.collector.clusters`` --- Cluster Interface ================================================= .. automodule:: sos.collector.clusters :members: :undoc-members: :show-inheritance: sos-4.4/docs/conf.py000066400000000000000000000200541427652362600144320ustar00rootroot00000000000000#!/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 = '4.4' # The full version, including alpha/beta/rc tags. release = '4.4' # 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-4.4/docs/index.rst000066400000000000000000000046631427652362600150040ustar00rootroot00000000000000SoS === 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 main (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 main branch as a 'fast forward' merge (i.e. without creating a merge commit). Use the git rebase command to update your branch to the current main branch 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:: python3 setup.py install 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 === Core Reference ^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 4 archive clusters parsers policies plugins reporting utilities sos-4.4/docs/parsers.rst000066400000000000000000000002721427652362600153440ustar00rootroot00000000000000``sos.cleaner.parsers`` --- Parser Interface ============================================= .. automodule:: sos.cleaner.parsers :members: :undoc-members: :show-inheritance: sos-4.4/docs/plugins.rst000066400000000000000000000002651427652362600153500ustar00rootroot00000000000000``sos.report.plugins`` --- Plugin Interface =========================================== .. automodule:: sos.report.plugins :members: :undoc-members: :show-inheritance: sos-4.4/docs/policies.rst000066400000000000000000000002431427652362600154720ustar00rootroot00000000000000``sos.policies`` --- Policy Interface ===================================== .. automodule:: sos.policies :members: :undoc-members: :show-inheritance: sos-4.4/docs/reporting.rst000066400000000000000000000003011427652362600156670ustar00rootroot00000000000000``sos.report.reporting`` --- Reporting Interface ================================================ .. automodule:: sos.report.reporting :members: :undoc-members: :show-inheritance: sos-4.4/docs/utilities.rst000066400000000000000000000002521427652362600156760ustar00rootroot00000000000000``sos.utilities`` --- Utilites Interface ======================================== .. automodule:: sos.utilities :members: :undoc-members: :show-inheritance: sos-4.4/man/000077500000000000000000000000001427652362600127555ustar00rootroot00000000000000sos-4.4/man/en/000077500000000000000000000000001427652362600133575ustar00rootroot00000000000000sos-4.4/man/en/sos-clean.1000066400000000000000000000143031427652362600153260ustar00rootroot00000000000000.TH SOS CLEAN 1 "Thu May 21 2020" .SH NAME sos clean - Obfuscate sensitive data from one or more sosreports .SH SYNOPSIS .B sos clean TARGET [options] [\-\-domains] [\-\-disable-parsers] [\-\-keywords] [\-\-keyword-file] [\-\-map-file] [\-\-jobs] [\-\-no-update] [\-\-keep-binary-files] [\-\-archive-type] .SH DESCRIPTION \fBsos clean\fR or \fBsos mask\fR is an sos subcommand used to obfuscate sensitive information from previously generated sosreports that is not covered by the standard plugin-based post processing executed during report generation, for example IP addresses. .LP Data obfuscated via this utility is done so consistently, meaning for example an IP address of 192.168.1.1 in an unprocessed sosreport that gets obfuscated to, for example, 100.0.0.1, will be changed to 100.0.0.1 in all occurrences found in the report. Additionally, by default all such obfuscations are stored in "maps" that will be persistently saved to /etc/sos/cleaner/default_mapping and be re-used on subsequent runs. .LP This utility may also be used in-line with \fBsos report\fR and \fB sos collect\fR by specifying the \fB\-\-clean\fR or \fB\-\-mask\fR option. .LP When called directly via \fBsos clean\fR, the obfuscated archive is written as an additional file, meaning the original unprocessed report still remains on the filesystem. When called via \fBreport\fR or \fBcollect\fR, the changes are done in-line and thus only an obfuscated archive is written and available. In either case, a mapping file containing the relationships between unprocessed and obfuscated elements will be written in the same location as the resulting archive. This mapping file should be kept private by system administrators. .SH REQUIRED ARGUMENTS .B TARGET .TP The path to the archive that is to be obfuscated. This may be an archive or an unbuilt sos temporary directory. If an archive, it will first be extracted and then after obfuscation is complete re-compressed using the same compression method as the original. .SH OPTIONS .TP .B \-\-domains DOMAINS Provide a comma-delimited list of domain names to obfuscate, in addition to those matching the hostname of the system that created the sosreport. Subdomains that match a domain given via this option will also be obfuscated. For example, if \fB\-\-domains redhat.com\fR is specified, then 'redhat.com' will be obfuscated, as will 'www.redhat.com' and subdomains such as 'foo.redhat.com'. .TP .B \-\-disable-parsers PARSERS Provide a comma-delimited list of parsers to disable when cleaning an archive. By default all parsers are enabled. Note that using this option is very likely to leave sensitive information in place in the target archive, so only use this option when absolutely necessary or you have complete trust in the party/parties that may handle the generated report. Valid values for this option are currently: \fBhostname\fR, \fBip\fR, \fBmac\fR, \fBkeyword\fR, and \fBusername\fR. .TP .B \-\-keywords KEYWORDS Provide a comma-delimited list of keywords to scrub in addition to the default parsers. Keywords provided by this option will be obfuscated as "obfuscatedwordX" where X is an integer based on the keyword's index in the parser. Note that keywords will be replaced as both standalone words and in substring matches. .TP .B \-\-keyword-file FILE Provide a file that contains a list of keywords that should be obfuscated. Each word must be specified on a newline within the file. .TP .B \-\-map-file FILE Provide a location to a valid mapping file to use as a reference for existing obfuscation pairs. If one is found, the contents are loaded before parsing is started. This allows consistency between runs of this command for obfuscated pairs. By default, sos will write the generated private map file to /etc/sos/cleaner/default_mapping so that consistency is maintained by default. Users may use this option to reference a map file from a different run (perhaps one that was done on another system). Default: /etc/sos/cleaner/default_mapping .TP .B \-\-jobs JOBS The number of concurrent archives to process, if more than one. If this utility is called by \fBsos collect\fR then the value of the jobs option for that utility will be used here. Default: 4 .TP .B \-\-no-update Do not write the mapping file contents to /etc/sos/cleaner/default_mapping .TP .B \-\-keep-binary-files Keep unprocessable binary files in the archive, rather than removing them. Note that binary files cannot be obfuscated, and thus keeping them in the archive may result in otherwise sensitive information being included in the final archive. Users should review any archive that keeps binary files in place before sending to a third party. Default: False (remove encountered binary files) .TP .B \-\-archive-type TYPE Specify the type of archive that TARGET was generated as. When sos inspects a TARGET archive, it tries to identify what type of archive it is. For example, it may be a report generated by \fBsos report\fR, or a collection of those reports generated by \fBsos collect\fR, which require separate approaches. This option may be useful if a given TARGET archive is known to be of a specific type, but due to unknown reasons or some malformed/missing information in the archive directly, that is not properly identified by sos. The following are accepted values for this option: \fBauto\fR Automatically detect the archive type \fBreport\fR An archive generated by \fBsos report\fR \fBcollect\fR An archive generated by \fBsos collect\fR \fBinsights\fR An archive generated by the \fBinsights-client\fR package The following may also be used, however note that these do not attempt to pre-load any information from the archives into the parsers. This means that, among other limitations, items like host and domain names may not be obfuscated unless an obfuscated mapping already exists on the system from a previous execution. \fBdata-dir\fR A plain directory on the filesystem. \fBtarball\fR A generic tar archive not associated with any known tool .SH SEE ALSO .BR sos (1) .BR sos-report (1) .BR sos-collect (1) .BR sos.conf (5) .SH MAINTAINER .nf Jake Hunsaker .fi .SH AUTHORS & CONTRIBUTORS See \fBAUTHORS\fR file in the package documentation. sos-4.4/man/en/sos-collect.1000066400000000000000000000406641427652362600157020ustar00rootroot00000000000000.TH SOS COLLECT 1 "April 2020" .SH NAME sos collect \- Collect sosreports from multiple (cluster) nodes .SH SYNOPSIS .B sos collect [\-a|\-\-all\-options] [\-b|\-\-become] [\-\-batch] [\-c CLUSTER_OPTIONS] [\-\-chroot CHROOT] [\-\-case\-id CASE_ID] [\-\-cluster\-type CLUSTER_TYPE] [\-\-container\-runtime RUNTIME] [\-e ENABLE_PLUGINS] [--encrypt-key KEY]\fR [--encrypt-pass PASS]\fR [\-\-group GROUP] [\-j|\-\-jobs JOBS] [\-\-save\-group GROUP] [\-\-nopasswd-sudo] [\-k PLUGIN_OPTION] [\-\-label LABEL] [\-\-log-size SIZE] [\-n SKIP_PLUGINS] [\-\-nodes NODES] [\-\-no\-pkg\-check] [\-\-no\-local] [\-\-primary PRIMARY] [\-\-image IMAGE] [\-\-force-pull-image TOGGLE, --pull TOGGLE] [\-\-registry-user USER] [\-\-registry-password PASSWORD] [\-\-registry-authfile FILE] [\-o ONLY_PLUGINS] [\-p SSH_PORT] [\-\-password] [\-\-password\-per\-node] [\-\-preset PRESET] [\-\-skip-commands COMMANDS] [\-\-skip-files FILES] [\-s|\-\-sysroot SYSROOT] [\-\-ssh\-user SSH_USER] [\-\-sos-cmd SOS_CMD] [\-t|\-\-threads THREADS] [\-\-timeout TIMEOUT] [\-\-transport TRANSPORT] [\-\-tmp\-dir TMP_DIR] [\-v|\-\-verbose] [\-\-verify] [\-z|\-\-compression-type COMPRESSION_TYPE] .PP .SH DESCRIPTION collect is an sos subcommand to collect sosreports from multiple nodes and package them in a single useful tar archive. sos collect can be run either on a workstation that has SSH key authentication setup for the nodes in a given cluster, or from a "primary" node in a cluster that has SSH keys configured for the other nodes. Some sosreport options are supported by sos-collect and are passed directly to the sosreport command run on each node. .SH OPTIONS .TP \fB\-a\fR, \fB\-\-alloptions\fR Enables all sosreport options. This does NOT enable all sos collect options. .TP \fB\-b\fR, \fB\-\-become\fR Become the root user on the remote node when connecting as a non-root user. .TP \fB\-\-batch\fR Run in non-interactive mode. This will skip prompts for user input, with the exception of a prompt for the SSH password. .TP \fB\-\-all\-logs\fR Sosreport option. Collects all logs regardless of size. Default: no .TP \fB\-c\fR CLUSTER_OPTIONS Specify options used by cluster profiles. The format is 'profile.option_name=value'. For example, for the ovirt plugin if you wanted to restrict node enumeration to a specific cluster you would use \fB'-c ovirt.cluster=example_cluster'\fR. Available cluster options can be listed by running \fB'sos collect -l'\fR. .TP \fB\-\-chroot\fR CHROOT Sosreport option. Set the chroot mode. When \fB\-\-sysroot\fR is used commands default to executing with SYSROOT as the root directory. This can be overridden by setting \fB\-\-chroot\fR to "always" (always chroot) or "never" (always run in the host namespace). .TP \fB\-\-case\-id\fR CASE_ID Sosreport option. Specifies a case number identifier. .TP \fB\-\-cluster\-type\fR CLUSTER_TYPE When run by itself, sos collect will attempt to identify the type of cluster at play. This is done by checking package or configuration information against the localhost, or the primary node if \fB"--primary"\fR is supplied. Setting \fB--cluster-type\fR skips this step and forcibly sets a particular profile. Using a value of \fBnone\fR or \fBjbon\fR (just a bunch of nodes) will effectively disable all cluster-specific checks, and cause sos collect to only use the nodes specified by the \fB--nodes\fR option. Note that in this scenario, regex string(s) for node names will be ignored. Example: \fBsos collect --cluster-type=kubernetes\fR will force the kubernetes profile to be run, and thus set sosreport options and attempt to determine a list of nodes using that profile. .TP \fB\-\-container\-runtime\fR RUNTIME \fB sos report\fR option. Using this with \fBcollect\fR will pass this option thru to nodes with sos version 4.3 or later. This option controls the default container runtime plugins will use for collections. See \fBman sos-report\fR. .TP \fB\-e\fR ENABLE_PLUGINS, \fB\-\-enable\-plugins\fR ENABLE_PLUGINS Sosreport option. Use this to enable a plugin that would otherwise not be run. This option supports providing a comma-delimited list of plugins. .TP .B \--encrypt-key KEY Encrypts the resulting archive that sos collect produces using GPG. KEY must be an existing key in the user's keyring as GPG does not allow for keyfiles. KEY can be any value accepted by gpg's 'recipient' option. Note that the user running sos collect must match the user owning the keyring from which keys will be obtained. In particular this means that if sudo is used to run sos collect, the keyring must also be set up using sudo (or direct shell access to the account). Users should be aware that encrypting the final archive will result in sos using double the amount of temporary disk space - the encrypted archive must be written as a separate, rather than replacement, file within the temp directory that sos writes the archive to. However, since the encrypted archive will be the same size as the original archive, there is no additional space consumption once the temporary directory is removed at the end of execution. This means that only the encrypted archive is present on disk after sos finishes running. If encryption fails for any reason, the original unencrypted archive is preserved instead. IMPORTANT: As of this version of sos collect, only the final archive on the local machine running sos collect will be encrypted. The individual sos reports that are collected on the nodes will be collected unencrypted. .TP .B \--encrypt-pass PASS The same as \--encrypt-key, but use the provided PASS for symmetric encryption rather than key-pair encryption. .TP \fB\-\-group\fR GROUP Specify an existing host group definition to use. Host groups are pre-defined settings for the cluster-type, primary node, and nodes options saved in JSON-formatted files under /var/lib/sos collect/. If cluster_type and/or primary are set in the group, sos collect behaves as if these values were specified on the command-line. If nodes is defined, sos collect \fBextends\fR the \fB\-\-nodes\fR option, if set, with the nodes or regexes listed in the group. Note that sos collect will only write group definitions to /var/lib/sos collect/ however the GROUP value may be a filename for any group definitions that exist outside of the default location. If you are manually writing these files, use the value \fBnull\fR when a python NoneType is expected. Caveat: use \fBstring\fR 'none' if setting cluster_type to none. .TP \fB\-\-save\-group\fR GROUP Save the results of this run of sos collect to a host group definition. sos-colllector will write a JSON-formatted file with name GROUP to /var/lib/sos collect/ with the settings for cluster-type, primary, and the node list as discovered by cluster enumeration. Note that this means regexes are not directly saved to host groups, but the results of matching against those regexes are. .TP \fB\-j\fR JOBS \fB\-\-jobs\fR JOBS Specify the number of concurrent node collections that should be run. If the number of nodes enumerated exceeds the number of JOBS, then sos collect will start collecting from the first X number of nodes and then continue to iterate through the remaining nodes as sosreport collection finishes. Defaults to 4. .TP \fB\-\-nopasswd-sudo\fR Use this option when connecting as a non-root user that has passwordless sudo configured. If this option is omitted and a bogus sudo password is supplied, collection of sosreports may exhibit unexpected behavior and/or fail entirely. .TP \fB\-k\fR PLUGIN_OPTION, \fB\-\-plugin\-option\fR PLUGIN_OPTION Sosreport option. Set a plugin option to a particular value. This takes the form of plugin_name.option_name=value. Example: To enable the kubernetes "all" option in sosreport use \fB-k kubernetes.all=on\fR. .TP \fB\-\-label\fR LABEL Specify a label to be added to the archive names. This label will be applied to both the sos collect archive and the sosreport archives. If a cluster sets a default label, the user-provided label will be appended to that cluster default. .TP \fB \--log-size\fR SIZE Places a limit on the size of collected logs and output in MiB. Note that this causes sos to capture the last X amount of the file or command output collected. By default, this is set to 25 MiB and applies to all files and command output collected with the exception of journal collections, which are limited to 100 MiB. Setting this value to 0 removes all size limitations, and any files or commands collected will be collected in their entirety, which may drastically increase the size of the final sos report tarball and the memory usage of sos during collection of commands, such as very large journals that may be several GiB in size. .TP \fB\-n\fR SKIP_PLUGINS, \fB\-\-skip\-plugins\fR SKIP_PLUGINS Sosreport option. Disable (skip) a particular plugin that would otherwise run. This is useful if a particular plugin is prone to hanging for one reason or another. This option supports providing a comma-delimited list of plugins. .TP \fB\-\-nodes\fR NODES Provide a comma-delimited list of nodes to collect sosreports from, or a regex string to be used to compare discovered node names against. If using a regex, only nodes matching the regex will be used - i.e. it can be used as a whitelist but not a blacklist. This option can be handed multiple regex strings separated by commas. Additionally, both whole node names/addresses and regex strings may be provided at the same time. .TP \fB\-\-no\-pkg\-check\fR Do not perform package checks. Most cluster profiles check against installed packages to determine if the cluster profile should be applied or not. Use this with \fB\-\-cluster-type\fR if there are rpm or apt issues on the primary/local node. .TP \fB\-\-no\-local\fR Do not collect a sosreport from the local system. If \fB--primary\fR is not supplied, it is assumed that the host running sosreport is part of the cluster that is to be collected. Use this option to skip collection of a local sosreport. This option is NOT needed if \fB--primary\fR is provided. .TP \fB\-\-primary\fR PRIMARY Specify a primary node IP address or hostname for the cluster. If provided, then sos collect will check the primary node, not localhost, for determining the type of cluster in use. .TP \fB\-\-image IMAGE\fR Specify an image to use for the temporary container created for collections on containerized host, if you do not want to use the default image specifed by the host's policy. Note that this should include the registry. .TP \fB\-\-force-pull-image TOGGLE, \-\-pull TOGGLE\fR When collecting an sos report from a containerized host, force the host to always pull the specified image, even if that image already exists on the host. This is useful to ensure that the latest version of that image is always in use. Disabling this option will use whatever version of the image is present on the node, and only attempt a pull if there is no copy of the image present at all. Enable with true/on/yes or disable with false/off/no Default: true .TP \fB\-\-registry-user USER\fR Specify the username to authenticate to the registry with in order to pull the container image .TP \fB\-\-registry-password PASSWORD\fR Specify the password to authenticate to the registry with in order to pull the container image. If no password is required, leave this blank. .TP \fB\-\-registry-authfile FILE\fR Specify the filename to use for providing authentication credentials to the registry to pull the container image. Note that this file must exist on the node(s) performing the pull operations, not the node from which \fBsos collect\fR was run. .TP \fB\-o\fR ONLY_PLUGINS, \fB\-\-only\-plugins\fR ONLY_PLUGINS Sosreport option. Run ONLY the plugins listed. Note that a cluster profile will NOT override this option. This may cause the sosreports generated to not contain the relevant output for a given type of cluster. This option supports providing a comma-delimited list of plugins. .TP \fB\-\-password\fR Specifying this option will cause sos collect to prompt the user for an SSH password that will be used to connect to all nodes. If you have differing passwords for the same user across cluster nodes, you should ideally deploy SSH keys, but the \-\-password\-per\-node option is also available. .TP \fB\-\-password\-per\-node\fR When using this option, sos collect will prompt the user for the SSH password for each node that will have an sosreport collected from it individually before attempting to connect to the nodes. .TP \fB\-\-preset\fR PRESET Specify a sos preset to use, note that this requires sos-3.6 or later to be installed on the node. The given preset must also exist on the remote node - local presets are not used. If \fB\-\-preset\fR is specified and a given node either does not have that preset defined, or has a version of sos prior to 3.6, this option is ignored for that node. .TP \fB\-p\fR SSH_PORT, \fB\-\-ssh\-port\fR SSH_PORT Specify SSH port for all nodes. Use this if SSH runs on any port other than 22. .TP \fB\-\-skip-commands\fR COMMANDS A comma delimited list of commands to skip execution of, but still allowing the rest of the plugin that calls the command to run. This will generally need to be some form of UNIX shell-style wildcard matching. For example, using a value of \fBhostname\fR will skip only that single command, while using \fBhostname*\fR will skip all commands with names that begin with the string "hostname". .TP \fB\-\-skip-files\fR FILES A comma delimited list of files or filepath wildcard matches to skip collection of. Values may either be exact filepaths or paths using UNIX shell-style wildcards, for example \fB/etc/sos/*\fR. .TP \fB\-\-ssh\-user\fR SSH_USER Specify an SSH user for sos collect to connect to nodes with. Default is root. sos collect will prompt for a sudo password for non-root users. .TP \fB\-s\fR SYSROOT, \fB\-\-sysroot\fR SYSROOT Sosreport option. Specify an alternate root file system path. .TP \fB\-\-sos-cmd\fR SOS_CMD Define all options that sosreport should be run with on the nodes. This will override any other commandline options as well as any options specified by a cluster profile. The sosreport command will execute as 'sosreport --batch SOS_CMD'. The BATCH option cannot be removed from the sosreport command as it is required to run sosreport non-interactively for sos collect to function. .TP \fB\-t\fR THREADS \fB\-\-threads\fR THREADS Report option. Specify the number of collection threads to run. The report process on each node will run THREADS number of plugins concurrently during the collection process. Defaults to 4. .TP \fB\-\-timeout\fR TIMEOUT Timeout for sosreport generation on each node, in seconds. Note that sosreports are collected in parallel, so you can approximate the total runtime of sos collect via timeout*(number of nodes/jobs). Default is 180 seconds. .TP \fB\-\-transport\fR TRANSPORT Specify the type of remote transport to use to manage connections to remote nodes. \fBsos collect\fR uses locally installed binaries to connect to and interact with remote nodes, instead of directly establishing those connections. By default, OpenSSH's ControlPersist feature is preferred, however certain cluster types may have preferences of their own for how remote sessions should be established. The types of transports supported are currently as follows: \fBauto\fR Allow the cluster type to determine the transport used \fBcontrol_persist\fR Use OpenSSH's ControlPersist feature. This is the default behavior \fBoc\fR Use a \fBlocally\fR configured \fBoc\fR binary to deploy collection pods on OCP nodes .TP \fB\-\-tmp\-dir\fR TMP_DIR Specify a temporary directory to save sos archives to. By default one will be created in /tmp and then removed after sos collect has finished running. This is NOT the same as specifying a temporary directory for sosreport on the remote nodes. .TP \fB\-v\fR \fB\-\-verbose\fR Print debug information to screen. .TP \fB\-\-verfiy\fR Sosreport option. Passes the "--verify" option to sosreport on the nodes which causes sosreport to validate plugin-specific data during collection. Note that this option may considerably extend the time it takes sosreport to run on the nodes. Consider increasing \fB\-\-timeout\fR when using this option. .TP \fB\-z\fR COMPRESSION, \fB\-\-compression-type\fR COMPRESSION Sosreport option. Override the default compression type. .SH SEE ALSO .BR sos (1) .BR sos-report (1) .BR sos-clean (1) .BR sos.conf (5) .SH MAINTAINER Jake Hunsaker sos-4.4/man/en/sos-collector.1000077700000000000000000000000001427652362600205352sos-collect.1ustar00rootroot00000000000000sos-4.4/man/en/sos-help.1000066400000000000000000000034351427652362600152000ustar00rootroot00000000000000.TH SOS HELP 1 "Fri Nov 05 2021" .SH NAME sos help - get detailed help information on sos commands and components .SH SYNOPSIS .B sos help TOPIC .SH DESCRIPTION \fBsos help\fR is used to retrieve more detailed information on the various SoS commands and components than is directly available in either other manpages or --help output. This information could for example be investigating a specific plugin to learn more about its purpose, use case, collections, available plugin options, edge cases, and more. .LP Most aspects of SoS' operation can be investigated this way - the top level functions such as \fB report, clean,\fR and \fBcollect\fR, as well as constructs that allow those functions to work; e.g. \fBtransports\fR within \fBsos collect\fR that define how that function connects to remote nodes. .SH REQUIRED ARGUMENTS .B TOPIC .TP The section or topic to retrieve detailed help information for. TOPIC takes the general form of \fBcommand.component.entity\fR, with \fBcomponent\fR and \fBentity\fR being optional. .LP Top-level \fBcommand\fR help sections will often direct users to \fBcomponent\fR sections which in turn may point to further \fBentity\fR subsections. Some of the more useful or interesting sections are listed below: \fBTopic\fR \fBDescription\fR \fBreport\fR The \fBsos report\fR command \fBreport.plugins\fR Information on what report plugins are \fBreport.plugins.$plugin\fR Information on a specific plugin \fBclean\fR or \fBmask\fR The \fBsos clean|mask\fR command \fBcollect\fR The \fBsos collect\fR command \fBcollect.clusters\fR How \fBcollect\fR enumerates nodes in a cluster \fBpolicies\fR How SoS behaves on different distributions sos-4.4/man/en/sos-mask.1000077700000000000000000000000001427652362600171372sos-clean.1ustar00rootroot00000000000000sos-4.4/man/en/sos-report.1000066400000000000000000000505261427652362600155660ustar00rootroot00000000000000.TH SOS REPORT 1 "Mon Mar 25 2013" .SH NAME sos report \- Collect and package diagnostic and support data .SH SYNOPSIS .B sos report [-l|--list-plugins]\fR [-n|--skip-plugins plugin-names]\fR [-e|--enable-plugins plugin-names]\fR [-o|--only-plugins plugin-names]\fR [-a|--alloptions] [-v|--verbose]\fR [-k plug.opt|--plugin-option plug.opt]\fR [--no-report] [--config-file conf]\fR [--no-postproc]\fR [--preset preset] [--add-preset add_preset]\fR [--del-preset del_preset] [--desc description]\fR [--batch] [--build] [--debug] [--dry-run]\fR [--estimate-only] [--label label] [--case-id id]\fR [--threads threads]\fR [--plugin-timeout TIMEOUT]\fR [--cmd-timeout TIMEOUT]\fR [--namespaces NAMESPACES]\fR [--container-runtime RUNTIME]\fR [-s|--sysroot SYSROOT]\fR [-c|--chroot {auto|always|never}\fR [--tmp-dir directory]\fR [-p|--profile profile-name]\fR [--list-profiles]\fR [--verify]\fR [--log-size]\fR [--all-logs]\fR [--since YYYYMMDD[HHMMSS]]\fR [--skip-commands commands]\fR [--skip-files files]\fR [--allow-system-changes]\fR [-z|--compression-type method]\fR [--encrypt]\fR [--encrypt-key KEY]\fR [--encrypt-pass PASS]\fR [--upload] [--upload-url url] [--upload-user user]\fR [--upload-directory dir] [--upload-pass pass]\fR [--upload-no-ssl-verify] [--upload-method]\fR [--upload-protocol protocol]\fR [--experimental]\fR [-h|--help]\fR .SH DESCRIPTION \fBreport\fR is an sos subcommand that generates an archive of configuration and diagnostic information from the running system. The archive may be stored locally or centrally for recording or tracking purposes or may be sent to technical support representatives, developers or system administrators to assist with technical fault-finding and debugging. .LP Sos is modular in design and is able to collect data from a wide range of subsystems and packages that may be installed. An HTML report summarizing the collected information is optionally generated and stored within the archive. .SH OPTIONS .TP .B \-l, \--list-plugins List all available plugins and their options. Plug-ins that would not be enabled by the current configuration are listed separately. .TP .B \-n, --skip-plugins PLUGNAME[,PLUGNAME] Disable the specified plugin(s). Multiple plug-ins may be specified by repeating the option or as a comma-separated list. .TP .B \-e, --enable-plugins PLUGNAME[,PLUGNAME] Enable the specified plugin(s) that would otherwise be disabled. Multiple plugins may be specified by repeating the option or as a comma-separated list. Note that if using \fB-p, --profile\fR this option will \fBnot\fR enable further plugins. Use \fB-o, --only-plugins\fR to extend the list of plugins enabled by profiles. .TP .B \-o, --only-plugins PLUGNAME[,PLUGNAME] Enable the specified plugin(s) only (all other plugins should be disabled). Multiple plugins may be specified by repeating the option or as a comma-separated list. .TP .B \-k PLUGNAME.PLUGOPT[=VALUE], \--plugin-option=PLUGNAME.PLUGOPT[=VALUE] Specify plug-in options. The option PLUGOPT is enabled, or set to the specified value in the plug-in PLUGNAME. .TP .B \-a, \--alloptions Set all boolean options to True for all enabled plug-ins. .TP .B \-v, \--verbose Increase logging verbosity. May be specified multiple times to enable additional debugging messages. .TP .B \-q, \--quiet Only log fatal errors to stderr. .TP .B \--no-report Disable HTML report writing. .TP .B \--config-file CONFIG Specify alternate configuration file. .TP .B \-\-no-postproc Disable postprocessing globally for all plugins. This will mean data is not obfuscated/sanitized from the archive during collection. Note that this means data such as password, SSH keys, certificates, etc... will be collected in plain text. To selectively disable postprocessing on a per-plugin basis, use the 'postproc' plugin option available to all plugins, e.g. '-k podman.postproc=off'. .TP .B \--preset PRESET Specify an existing preset to use for sos options. Presets are pre-configured sets of options for both sos and sos plugins. For example a preset may enable a certain set of plugins, disable others, or enable specific plugin options. They may also specify sos options such as log-size or package verification. User defined presets are saved under /var/lib/sos/presets as JSON-formatted files. .TP .B \--add-preset ADD_PRESET [options] Add a preset with name ADD_PRESET that enables [options] when called. For example, 'sos report --add-preset mypreset --log-size=50 -n logs' will enable a user to run 'sos report --preset mypreset' that sets the maximum log size to 50 and disables the logs plugin. Note: to set a description for the preset that is displayed with \fB--list-presets\fR, use the \fB--desc\fR option. Note: to set a behaviour note of the preset, use --note option. Note: The root filesystem, as seen by sos if running within a container, must be writable to save presets using this option. .TP .B \--del-preset DEL_PRESET Deletes the preset with name DEL_PRESET from the filesystem so that it can no longer be used. .TP .B \--list-presets Display a list of available presets and what options they carry. .TP .B \--desc DESCRIPTION When using \fB--add-preset\fR use this option to add a description of the preset that will be displayed when using \fB--list-presets\fR. .TP .B \-s, \--sysroot SYSROOT Specify an alternate root file system path. Useful for collecting reports from containers and images. .TP .B \-c, \--chroot {auto|always|never} Set the chroot mode. When \--sysroot is used commands default to executing with SYSROOT as the root directory (unless disabled by a specific plugin). This can be overridden by setting \--chroot to "always" (always chroot) or "never" (always run in the host namespace). .TP .B \--tmp-dir DIRECTORY Specify alternate temporary directory to copy data as well as the compressed report. .TP .B \--list-profiles Display a list of available profiles and the plugins that they enable. .TP .B \-p, \--profile, \--profiles NAME Only run plugins that correspond to the given profile. Multiple profiles may be specified as a comma-separated list; the set of plugins executed is the union of each of the profile's plugin sets. Note that if there are specific plugins outside of the profile(s) passed to this option that you would also want to enable, use \fB-o, --only-plugins\fR to add those plugins to the list. See \fBsos report --list-profiles\fR for a list of currently supported profiles. .TP .B \--verify Instructs plugins to perform plugin-specific verification during data collection. This may include package manager verification, log integrity testing or other plugin defined behaviour. Use of \--verify may cause the time taken to generate a report to be considerably longer. .TP .B \--log-size Places a limit on the size of collected logs and output in MiB. Note that this causes sos to capture the last X amount of the file or command output collected. By default, this is set to 25 MiB and applies to all files and command output collected with the exception of journal collections, which are limited to 100 MiB. Setting this value to 0 removes all size limitations, and any files or commands collected will be collected in their entirety, which may drastically increase the size of the final sos report tarball and the memory usage of sos during collection of commands, such as very large journals that may be several GiB in size. .TP .B \--all-logs Tell plugins to collect all possible log data ignoring any size limits and including logs in non-default locations. This option may significantly increase the size of reports. .TP .B \--since YYYYMMDD[HHMMSS] Limits the collection of log archives to those newer than this date. A log archive is any file not found in /etc, that has either a numeric or a compression-type file extension for example ".zip". ".1", ".gz" etc.). This also affects \--all-logs. The date string will be padded with zeros if HHMMSS is not specified. .TP .B \--skip-commands COMMANDS A comma delimited list of commands to skip execution of, but still allowing the rest of the plugin that calls the command to run. This will generally need to be some form of UNIX shell-style wildcard matching. For example, using a value of \fBhostname\fR will skip only that single command, while using \fBhostname*\fR will skip all commands with names that begin with the string "hostname". .TP .B \--skip-files FILES A comma delimited list of files or filepath wildcard matches to skip collection of. Values may either be exact filepaths or paths using UNIX shell-style wildcards, for example \fB/etc/sos/*\fR. .TP .B \--allow-system-changes Run commands even if they can change the system (e.g. load kernel modules). .TP .B \-z, \--compression-type METHOD Override the default compression type specified by the active policy. .TP .B \-\-encrypt Encrypt the resulting archive, and determine the method by which that encryption is done by either a user prompt or environment variables. When run with \fB--batch\fR, using this option will cause sos to look for either the \fBSOSENCRYPTKEY\fR or \fBSOSENCRYPTPASS\fR environment variables. If set, this will implicitly enable the \fB--encrypt-key\fR or \fB--encrypt-pass\fR options, respectively, to the values set by the environment variable. This enables the use of these options without directly setting those options in a config file or command line string. Note that use of an encryption key has precedence over a passphrase. Otherwise, using this option will cause sos to prompt the user to choose the method of encryption to use. Choices will be [P]assphrase, [K]ey, [E]nv vars, or [N]o encryption. If passphrase or key the user will then be prompted for the respective value, env vars will cause sos to source the information in the manner stated above, and choosing no encryption will disable encryption. See the sections on \fB--encrypt-key\fR and \fB--encrypt-pass\fR below for more information. .TP .B \--encrypt-key KEY Encrypts the resulting archive that sosreport produces using GPG. KEY must be an existing key in the user's keyring as GPG does not allow for keyfiles. KEY can be any value accepted by gpg's 'recipient' option. Note that the user running sosreport must match the user owning the keyring from which keys will be obtained. In particular this means that if sudo is used to run sosreport, the keyring must also be set up using sudo (or direct shell access to the account). Users should be aware that encrypting the final archive will result in sos using double the amount of temporary disk space - the encrypted archive must be written as a separate, rather than replacement, file within the temp directory that sos writes the archive to. However, since the encrypted archive will be the same size as the original archive, there is no additional space consumption once the temporary directory is removed at the end of execution. This means that only the encrypted archive is present on disk after sos finishes running. If encryption fails for any reason, the original unencrypted archive is preserved instead. .TP .B \--encrypt-pass PASS The same as \--encrypt-key, but use the provided PASS for symmetric encryption rather than key-pair encryption. .TP .B \--batch Generate archive without prompting for interactive input. .TP .B \--name NAME Deprecated. See \--label .TP .B \--label LABEL Specify an arbitrary identifier to associate with the archive. Labels will be appended after the system's short hostname and may contain alphanumeric characters. .TP .B \--threads THREADS Specify the number of threads sosreport will use for concurrency. Defaults to 4. .TP .B \--plugin-timeout TIMEOUT Specify a timeout in seconds to allow each plugin to run for. A value of 0 means no timeout will be set. A value of -1 is used to indicate the default timeout of 300 seconds. Note that this option sets the timeout for all plugins. If you want to set a timeout for a specific plugin, use the 'timeout' plugin option available to all plugins - e.g. '-k logs.timeout=600'. The plugin-specific timeout option will override this option. For example, using \'--plugin-timeout=60 -k logs.timeout=600\' will set a timeout of 600 seconds for the logs plugin and 60 seconds for all other enabled plugins. .TP .B \--cmd-timeout TIMEOUT Specify a timeout limit in seconds for a command execution. Same defaults logic from --plugin-timeout applies here. This option sets the command timeout for all plugins. If you want to set a cmd timeout for a specific plugin, use the 'cmd-timeout' plugin option available to all plugins - e.g. '-k logs.cmd-timeout=600'. Again, the same plugin/global precedence logic as for --plugin-timeout applies here. Note that setting --cmd-timeout (or -k logs.cmd-timeout) high should be followed by increasing the --plugin-timeout equivalent, otherwise the plugin can easily timeout on slow commands execution. .TP .B \--namespaces NAMESPACES For plugins that iterate collections over namespaces that exist on the system, for example the networking plugin collecting `ip` command output for each network namespace, use this option to limit the number of namespaces that will be collected. Use '0' (default) for no limit - all namespaces will be used for collections. Note that specific plugins may provide a similar `namespaces` plugin option. If the plugin option is used, it will override this option. .TP .B \--container-runtime RUNTIME Force the use of the specified RUNTIME as the default runtime that plugins will use to collect data from and about containers and container images. By default, the setting of \fBauto\fR results in the local policy determining what runtime will be the default runtime (in configurations where multiple runtimes are installed and active). If no container runtimes are active, this option is ignored. If there are runtimes active, but not one with a name matching RUNTIME, sos will abort. Setting this to \fBnone\fR, \fBoff\fR, or \fBdisabled\fR will cause plugins to \fBNOT\fR leverage any active runtimes for collections. Note that if disabled, plugins specifically for runtimes (e.g. the podman or docker plugins) will still collect general data about the runtime, but will not inspect existing containers or images. Default: 'auto' (policy determined) .TP .B \--case-id NUMBER Specify a case identifier to associate with the archive. Identifiers may include alphanumeric characters, commas and periods ('.'). .TP .B \--build Do not archive copied data. Causes sosreport to leave an uncompressed archive as a temporary file or directory tree. .TP .B \--debug Enable interactive debugging using the python debugger. Exceptions in sos or plug-in code will cause a trap to the pdb shell. .TP .B \--dry-run Execute plugins as normal, but do not collect any file content, command output, or string data from the system. The resulting logs may be used to understand the actions that sos would have taken without the dry run option. .TP .B \--estimate-only Estimate disk space requirements when running sos report. This can be valuable to prevent sosreport working dir to consume all free disk space. No plugin data is available at the end. Plugins will be collected sequentially, size of collected files and commands outputs will be calculated and the plugin files will be immediatelly deleted prior execution of the next plugin. This still can consume whole free disk space, though. Please note, size estimations may not be accurate for highly utilized systems due to changes between an estimate and a real execution. Also some difference between estimation (using `stat` command) and other commands used (i.e. `du`). A rule of thumb is to reserve at least double the estimation. .TP .B \--upload If specified, attempt to upload the resulting archive to a vendor defined location. This option is implied if --upload-url is used. You may be prompted for a username and password if these are not defined by the vendor as well. If these credentials are not provided, sos will still run and create an archive but will not attempt an automatic upload, instead relying on the end user to upload it as needed. The sosreport archive will still remain on the local filesystem even after a successful upload. Note that depending on the distribution sos is being run on, or the vendor policy detected during execution, there may be dependencies that are not strictly required by the package at installation time. For example, for HTTPS uploads the python-requests library must be available. If this library is not available, HTTPS uploads will not be attempted. .TP .B \--upload-url URL If a vendor does not provide a default upload location, or if you would like to upload the archive to a different location, specify the address here. A support protocol MUST be specified in this URL. Currently uploading is supported for HTTPS, SFTP, and FTP protocols. If your destination server listens on a non-standard port, specify the listening port in the URL. .TP .B \-\-upload-user USER If a vendor does not provide a default user for uploading, specify the username here. If this option is unused and upload is request, and a vendor default is not set, you will be prompted for one. If --batch is used and this option is omitted, no username will be collected and thus uploads will fail if no vendor default is set. You also have the option of providing this value via the SOSUPLOADUSER environment variable. If this variable is set, then no username prompt will occur and --batch may be used provided all other required values (case number, upload password) are provided. .TP .B \-\-upload-pass PASS Specify the password to use for authentication with the destination server. If this option is omitted and upload is requested, you will be prompted for one. If --batch is used, this prompt will not occur, so any uploads are likely to fail unless this option is used. Note that this will result in the plaintext string appearing in `ps` output that may be collected by sos and be in the archive. If a password must be provided by you for uploading, it is strongly recommended to not use --batch and enter the password when prompted rather than using this option. You also have the option of providing this value via the SOSUPLOADPASSWORD environment variable. If this variable is set, then no password prompt will occur and --batch may be used provided all other required values (case number, upload user) are provided. .TP .B \--upload-directory DIR Specify a directory to upload to, if one is not specified by a vendor default location or if your destination server does not allow writes to '/'. .TP .B \--upload-method METHOD Specify the HTTP method to use for uploading to the provided --upload-url. Valid values are 'auto' (default), 'put', or 'post'. The use of 'auto' will default to the method required by the policy-default upload location, if one exists. This option has no effect on upload protocols other than HTTPS. .TP .B \--upload-no-ssl-verify Disable SSL verification for HTTPS uploads. This may be used to allow uploading to locations that have self-signed certificates, or certificates that are otherwise untrusted by the local system. Default behavior is to perform SSL verification against all upload locations. .TP .B \--upload-protocol PROTO Manually specify the protocol to use for uploading to the target \fBupload-url\fR. Normally this is determined via the upload address, assuming that the protocol is part of the address provided, e.g. 'https://example.com'. By using this option, sos will skip the protocol check and use the method defined for the specified PROTO. For RHEL systems, setting this option to \fBsftp\fR will skip the initial attempt to upload to the Red Hat Customer Portal, and only attempt an upload to Red Hat's SFTP server, which is typically used as a fallback target. Valid values for PROTO are: 'auto' (default), 'https', 'ftp', 'sftp'. .TP .B \--experimental Enable plugins marked as experimental. Experimental plugins may not have been tested for this port or may still be under active development. .TP .B \--help Display usage message. .SH SEE ALSO .BR sos (1) .BR sos-clean (1) .BR sos-collect (1) .BR sos.conf (5) .SH MAINTAINER .nf Jake Hunsaker .fi .SH AUTHORS & CONTRIBUTORS See \fBAUTHORS\fR file in the package documentation. .nf .SH TRANSLATIONS .nf Translations are handled by transifex (https://fedorahosted.org/transifex/) .fi .fi sos-4.4/man/en/sos.1000066400000000000000000000154471427652362600142600ustar00rootroot00000000000000.TH sos 1 "April 2020" .SH NAME sos \- A unified tool for collecting system logs and other debug information .SH SYNOPSIS \fBsos\fR component [options] .SH DESCRIPTION \fBsos\fR is a diagnostic data collection utility, used by system administrators, support representatives, and the like to assist in troubleshooting issues with a system or group of systems. The most well known function is \fB sos report\fR or \fBsosreport\fR as it was previously known. An sos archive is typically requested by support organizations to collect baseline configuration and system data from which to begin the troubleshooting process. .SH COMPONENTS sos supports several subcommands or components. Each provides a different set of information for the user. Supported components are as follows .TP .B report Report generates an archive of system information including configuration files and command output. Information included in the report is based upon plugins that are activated automatically when certain criteria, such as installed packages, files, services, or system architecture is detected. See \fBsos report --help\fR and \fBman sos-report\fR for more information. May also be invoked via the alias \fBrep\fR or the deprecated command \fBsosreport\fR. .TP .B collect Collect is used to capture reports on multiple systems simultaneously. These systems can either be defined by the user at the command line and/or defined by clustering software that exists either on the local system or on a "primary" system that is able to inform about other nodes in the cluster. When running collect, sos report will be run on the remote nodes, and then the resulting archives will be copied from those nodes to the local system running sos collect. Archives are then removed from the remote systems. See \fBsos collect --help\fR and \fBman sos-collect\fR for more information. May also be invoked via the alias \fBsos collector\fR or the deprecated command \fBsos-collector\fR. .TP .B clean|cleaner|mask This subcommand takes input of either 1) an sosreport tarball, 2) a collection of sosreport tarballs such as from \fBcollect\fR, or 3) the unpackaged directory of an sosreport and obfuscates potentially sensitive system information that is not covered by the standard postprocessing of \fBsos report\fR. Such data includes IP addresses, networks, MAC addresses, and more. Data obfuscated by this command will remain consistent throughout the report and across reports provided in the same invocation. Additionally, care is taken to maintain network topology relationships between matched data items. See \fB sos clean --help\fR and \fBman sos-clean\fR for more information. May be invoked via either \fBsos clean\fR, \fBsos cleaner\fR, \fBsos mask\fR, or via the \fB--clean\fR, \fB--cleaner\fR or \fB --mask\fR options for \fBreport\fR and \fBcollect\fR. .TP .B help This subcommand is used to retrieve more detailed information on the various SoS commands and components than is directly available in either other manpages or --help output. See \fB sos help --help\fR and \fB man sos-help\fR for more information. .SH GLOBAL OPTIONS sos components provide their own set of options, however the following are available to be set across all components. .B \-\-batch Do not prompt interactively, user will not be prompted for any data .TP .B \-\-encrypt Encrypt the resulting archive, and determine the method by which that encryption is done by either a user prompt or environment variables. When run with \fB--batch\fR, using this option will cause sos to look for either the \fBSOSENCRYPTKEY\fR or \fBSOSENCRYPTPASS\fR environment variables. If set, this will implicitly enable the \fB--encrypt-key\fR or \fB--encrypt-pass\fR options, respectively, to the values set by the environment variable. This enables the use of these options without directly setting those options in a config file or command line string. Note that use of an encryption key has precedence over a passphrase. Otherwise, using this option will cause sos to prompt the user to choose the method of encryption to use. Choices will be [P]assphrase, [K]ey, [E]nv vars, or [N]o encryption. If passphrase or key the user will then be prompted for the respective value, env vars will cause sos to source the information in the manner stated above, and choosing no encryption will disable encryption. See the sections on \fB--encrypt-key\fR and \fB--encrypt-pass\fR below for more information. .TP .B \--encrypt-key KEY Encrypts the resulting archive that sosreport produces using GPG. KEY must be an existing key in the user's keyring as GPG does not allow for keyfiles. KEY can be any value accepted by gpg's 'recipient' option. Note that the user running sosreport must match the user owning the keyring from which keys will be obtained. In particular this means that if sudo is used to run sosreport, the keyring must also be set up using sudo (or direct shell access to the account). Users should be aware that encrypting the final archive will result in sos using double the amount of temporary disk space - the encrypted archive must be written as a separate, rather than replacement, file within the temp directory that sos writes the archive to. However, since the encrypted archive will be the same size as the original archive, there is no additional space consumption once the temporary directory is removed at the end of execution. This means that only the encrypted archive is present on disk after sos finishes running. If encryption fails for any reason, the original unencrypted archive is preserved instead. .TP .B \--encrypt-pass PASS The same as \--encrypt-key, but use the provided PASS for symmetric encryption rather than key-pair encryption. .TP .B \--config-file CONFIG Specify alternate configuration file. .TP .B \-s, \--sysroot SYSROOT Specify an alternate root file system path. .TP .B \--tmp-dir DIRECTORY Specify alternate temporary directory to copy data during execution. .TP .B \--threads THREADS Specify the number of threads sosreport will use for concurrency. Defaults to 4. .TP .B \-v, \--verbose Increase logging verbosity. May be specified multiple times to enable additional debugging messages. The following table summarizes the effects of different verbosity levels: 1 (-v) : Enable debug messages for sos.log. Show individual plugins starting. 2 (-vv) : Also print debug messages to console. 3 (-vvv) : Enable debug messages for archive file operations. Note this will dramatically increase the amount of logging. .TP .B \-q, \--quiet Only log fatal errors to stderr. .TP .B \-z, \-\-compression-type {auto|xz|gzip} Compression type to use when compression the final archive output .TP .B \--help Display usage message. .SH SEE ALSO .BR sos.conf (5) .SH MAINTAINER .nf Jake Hunsaker .fi .SH AUTHORS & CONTRIBUTORS See \fBAUTHORS\fR file in the package documentation. sos-4.4/man/en/sos.conf.5000066400000000000000000000106501427652362600151770ustar00rootroot00000000000000.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/sos.conf, and there are subdirectories under /etc/sos that are used for specific purposes. Note that non-root users may override options set in /etc/sos/sos.conf by creating their own sos.conf under $HOME/.config/sos. The order in which options are loaded is as follows: 1. System configuration file at /etc/sos/sos.conf 2. User-specific configuration file at $HOME/.config/sos/sos.conf (for sos components that support non-root) 3. In the case of running \fBsos report\fR, presets either automatically loaded due to system configuration, or specified via \fB--preset\fR 4. Command line values In other words, config files will override defaults, presets override config files, and command line values override presets and config files. .SH SUBDIRECTORIES The following subdirectories exist under /etc/sos and are used as noted below .TP \fBextras.d\fP This directory is used to store configuration files used by the sos_extras plugin. The plugin traverses this directory and for each file there it executes commands or collects files optionally with sizelimit. Expected content of an extras file is as follows: - empty lines or those starting with '#' are ignored - add_copy_spec called to lines starting by ':', optionally followed by sizelimit - otherwise, whole line will be executed as a command. Example: command1 --arg1 val1 command2 :/path/to/file :/path/to/files* sizelimit WARNING: be careful what files to collect or what commands to execute: - avoid calling potentially dangerous or system altering commands, like: - using multiple commands on a line (via pipes, semicolon etc.) - executing commands on background - setting env.variables (as those will be ignored) - altering a system (not only by "rm -rf") - be aware, no secret obfuscation is made .TP \fBgroups.d\fP This directory is used to store host group configuration files for \fBsos collect\fP. These files can specify any/all of the \fBprimary\fP, \fBnodes\fP, and \fBcluster-type\fP options. Users may create their own private host groups in $HOME/.config/sos/groups.d/. If a host group of the same name is saved in both the user's homedir and this directory, the homedir configuration file will have precedence. When run as non-root, \fBsos collect\fP will save host groups to the user's home dir, and create the necessary directory structure if required. Note that non-root users may load host groups defined under /etc/sos/groups.d/, but they may not write new groups or update existing groups saved there. .TP \fBpresets.d\fP This directory is used to store preset configuration files for \fBsos report\fP. Presets may be used to save standard sets of options. See \fBman sos-report\fP for more information. .SH PARAMETERS .sp There are sections for each sos component, as well as global values and those for plugin options. 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 don't 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[global]\fP .br - \fB[component]\fP .br - \fB[plugin_options]\fP .TP \fB[global]\fP