SOS(REPORT) | SOS(REPORT) |
sos report - Collect and package diagnostic and support data
sos report
[-l|--list-plugins]
[-n|--skip-plugins plugin-names]
[-e|--enable-plugins plugin-names]
[-o|--only-plugins plugin-names]
[-a|--alloptions] [-v|--verbose]
[-k plug.opt|--plugin-option plug.opt]
[--no-report] [--config-file conf]
[--no-postproc]
[--preset preset] [--add-preset add_preset]
[--del-preset del_preset] [--desc description]
[--batch] [--build] [--debug] [--dry-run]
[--estimate-only] [--label label] [--case-id id]
[--threads threads]
[--plugin-timeout TIMEOUT]
[--cmd-timeout TIMEOUT]
[--namespaces NAMESPACES]
[--container-runtime RUNTIME]
[-s|--sysroot SYSROOT]
[-c|--chroot {auto|always|never}
[--tmp-dir directory]
[-p|--profile profile-name]
[--list-profiles]
[--verify]
[--log-size]
[--journal-size]
[--all-logs]
[--since YYYYMMDD[HHMMSS]]
[--skip-commands commands]
[--skip-files files]
[--allow-system-changes]
[--low-priority]
[-z|--compression-type method]
[--encrypt]
[--encrypt-key KEY]
[--encrypt-pass PASS]
[--upload] [--upload-url url] [--upload-user user]
[--upload-directory dir] [--upload-pass pass]
[--upload-no-ssl-verify] [--upload-method]
[--upload-protocol protocol]
[--experimental]
[-h|--help]
report 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.
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.
Note that if using -p, --profile this option will not enable further plugins. Use -o, --only-plugins to extend the list of plugins enabled by profiles.
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'.
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.
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 --list-presets, use the --desc 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.
Note that if there are specific plugins outside of the profile(s) passed to this option that you would also want to enable, use -o, --only-plugins to add those plugins to the list.
See sos report --list-profiles for a list of currently supported profiles.
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 by the --journal-size option instead.
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.
By default, this is set to 100 MiB. Setting this value to 0 removes all size limitations, as does the use of the --all-logs option. This may drastically increase the size of the final sos report tarball.
When run with --batch, using this option will cause sos to look for either the SOSENCRYPTKEY or SOSENCRYPTPASS environment variables. If set, this will implicitly enable the --encrypt-key or --encrypt-pass 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 --encrypt-key and --encrypt-pass below for more information.
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.
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.
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.
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.
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 none, off, or disabled will cause plugins to NOT 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)
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.
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.
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.
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.
This option is ignored when uploading to the Red Customer Portal or Red Hat Secure FTP server in favour of web token authentication.
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 may 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.
This option is ignored when uploading to the Red Customer Portal or Red Hat Secure FTP server in favour of web token authentication.
This option has no effect on upload protocols other than HTTPS.
Default behavior is to perform SSL verification against all upload locations.
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 sftp 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'.
sos(1) sos-clean(1) sos-collect(1) sos.conf(5)
Maintained on GitHub at https://github.com/sosreport/sos
See AUTHORS file in the package documentation.
1 | Mon Mar 25 2013 |