aboutsummaryrefslogtreecommitdiffstats
path: root/man/en/sos-report.1
blob: f6bd6c6a03668075a57fa08e9524234b8d5c9824 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
.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
          [--label label] [--case-id id]\fR
          [--threads threads]\fR
          [--plugin-timeout TIMEOUT]\fR
          [--cmd-timeout TIMEOUT]\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-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-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 \--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 \--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 <jhunsake@redhat.com>
.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