|
11 | 11 | [id="about-must-gather_{context}"] |
12 | 12 | = About the must-gather tool |
13 | 13 |
|
14 | | -The `oc adm must-gather` CLI command collects the information from your cluster that is most likely needed for debugging issues, such as: |
| 14 | +The `oc adm must-gather` CLI command collects the information from your cluster that is most likely needed for debugging issues, including: |
15 | 15 |
|
16 | 16 | * Resource definitions |
17 | | -* Audit logs |
18 | 17 | * Service logs |
19 | 18 |
|
20 | | -You can specify one or more images when you run the command by including the `--image` argument. When you specify an image, the tool collects data related to that feature or product. |
| 19 | +By default, the `oc adm must-gather` command uses the default plug-in image and writes into `./must-gather.local`. |
21 | 20 |
|
22 | | -When you run `oc adm must-gather`, a new pod is created on the cluster. The data is collected on that pod and saved in a new directory that starts with `must-gather.local`. This directory is created in the current working directory. |
| 21 | +Alternatively, you can collect specific information by running the command with the appropriate arguments as described in the following sections: |
23 | 22 |
|
| 23 | +* To collect data related to one or more specific features, use the `--image` argument with an image, as listed in a following section. |
| 24 | ++ |
| 25 | +For example: |
| 26 | ++ |
| 27 | +[source,terminal] |
| 28 | +---- |
| 29 | +$ oc adm must-gather --image=registry.redhat.io/container-native-virtualization/cnv-must-gather-rhel8:v4.9.0 |
| 30 | +---- |
| 31 | + |
| 32 | +* To collect the audit logs, use the `-- /usr/bin/gather_audit_logs` argument, as described in a following section. |
| 33 | ++ |
| 34 | +For example: |
| 35 | ++ |
| 36 | +[source,terminal] |
| 37 | +---- |
| 38 | +$ oc adm must-gather -- /usr/bin/gather_audit_logs |
| 39 | +---- |
| 40 | ++ |
| 41 | +[NOTE] |
| 42 | +==== |
| 43 | +Audit logs are not collected as part of the default set of information to reduce the size of the files. |
| 44 | +==== |
| 45 | + |
| 46 | +When you run `oc adm must-gather`, a new pod with a random name is created in a new project on the cluster. The data is collected on that pod and saved in a new directory that starts with `must-gather.local`. This directory is created in the current working directory. |
| 47 | + |
| 48 | +For example: |
| 49 | + |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +NAMESPACE NAME READY STATUS RESTARTS AGE |
| 53 | +... |
| 54 | +openshift-must-gather-5drcj must-gather-bklx4 2/2 Running 0 72s |
| 55 | +openshift-must-gather-5drcj must-gather-s8sdh 2/2 Running 0 72s |
| 56 | +... |
| 57 | +---- |
24 | 58 | // todo: table or ref module listing available images? |
0 commit comments