Metadata-Version: 2.4
Name: sosdiff
Version: 0.4.1
Summary: Compare two sosreports and show the differences.
Home-page: https://github.com/pafernanr/sosdiff
Author: Pablo Fernández Rodríguez
License: GPLv3
Keywords: sos sosreport
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: summary

### sosdiff
Compare two [sosreport](https://github.com/sosreport/sos) and show the differences.

- To compare them `sosdiff` reads the file `sos_reports/sos.json` and lists the differences:
  - ***[-]   :: Plugin is missing on sosreport2. 
  - ***[--]  :: Entity is missing on sosreport2. 
  - ***[---] :: File is missing on sosreport2.
  - ***[/]   :: File content is different. Optionally show `diff` command output.
  - ***[+]   :: Plugin is present on sosreport2 and missing on sosreport1.
  - ***[++]  :: Entity is present on sosreport2 and missing on sosreport1.
  - ***[+++] :: File is present on sosreport2 and missing on sosreport1.
- Some files are exluded to avoid "Too many levels of symbolic links" errors. `[r'^/sys/class/.*$', r'^/sys/devices/.*$',]`
  - Refer to [excluded_href](https://github.com/pafernanr/sosdiff/blob/main/sosdiff/lib/util.py)
- The configuration file is `~/.sosdiff/configuration.ini`. Alternative configuration can be used. E.g:
  ~~~
  sosdiff -c ~/.sosdiff/troubleshoot_netwoking.ini
  ~~~
   
#### Installation
There are multiple ways to to install `sosdiff`.

- Using `pip`.
  ~~~
  pip install sosdiff
  ~~~

- Using the prebuild packages at [Latest Release](https://github.com/pafernanr/sosdiff/releases/latest)

#### Usage
~~~
usage: sosdiff [-h] [-c <config_file>] [-d] [-f] [-e EXCLUDE_FILES] [-i INCLUDE_FILES] [-n SKIP_PLUGINS] [-o ONLY_PLUGINS] [-s] [-t]
               sospath1 sospath2

Compare two sosreports and show the differences.

positional arguments:
  sospath1              Path to first sosreport folder.
  sospath2              Path to second sosreport folder.

options:
  -h, --help            show this help message and exit
  -c <config_file>, --configuration <config_file>
                        Configuration file. Defaults to `/home/pablofr/.sosdiff/configuration.ini`
  -d, --diff            Show `diff` when files content don't match.
  -f, --no-diff         Hide `diff` when files content don't match.
  -e EXCLUDE_FILES, --exclude-files EXCLUDE_FILES
                        Exclude files matching this regexp. Can be used multiple times.
  -i INCLUDE_FILES, --include-files INCLUDE_FILES
                        Include files matching this regexp. Can be used multiple times.
  -n SKIP_PLUGINS, --skip-plugins SKIP_PLUGINS
                        Disable these plugins. Can be used multiple times.
  -o ONLY_PLUGINS, --only-plugins ONLY_PLUGINS
                        Enable these plugins only. Can be used multiple times.
  -s, --no-text         Show colors in the output.
  -t, --text            Hide colors in the outuput.
~~~
