Collect logs

更新时间:
复制 MD 格式

Use the pdbcli trace command to track issues and collect all component logs from a target node.

Syntax

Run the following command to collect all component logs from all nodes. By default, the command collects log files from the last three days.

pdbcli trace tar-log

Parameters

Parameter

Parameter type

Description

-f, --from-days

INT

The number of days of logs to collect, counting back from the current date. The default is 3 days.

-s, --max-size

STRING

The maximum size for the collected log files. The default is 10 MB.

-o, --output-dir

STRING

The local folder where collected logs are stored. The default is /tmp.

-t, --target-host

STRING

The node from which to collect all component logs. If this parameter is not specified, logs are collected from all nodes.

--remote-user

STRING

The account on the target node to use for the connection. Use this parameter if the target node does not have a trust relationship with the root account on the pdbcli node. The specified account must have sudo permissions.

Note

If the specified account cannot use passwordless sudo, set its sudo password. Use the ansible_sudo_pass parameter in the all.vars section of the config.yaml file.