**Q1: What if the collected log files are too large? **
A: The default maximum file size returned by a single node is 5GB (controlled by the system configuration obdiag.basic.file_size_limit). If the total size of a single collection return exceeds this limit, the return will be limited and Error: File too large will be returned in the result. The query time range can be adjusted, such as configuring --inner_config obdiag.basic.file_size_limit=2G in the command or modifying file_size_limit in /opt/oceanbase-diagnostic-tool/conf/inner_config.yml.
Summary:
+------------------+----------------------+--------+------------+--------+------------+
| Node | Status | Size | Password | Time | PackPath |
+==================+======================+========+============+========+============+
| xxx.xxx.xxx.xxx | Error:File too large | 0.000B | | 21 s | |
+------------------+----------------------+--------+------------+--------+------------+
| xxx.xxx.xxx.xxx | Error:File too large | 0.000B | | 70 s | |
+------------------+----------------------+--------+------------+--------+------------+
```**Q2: What if the number of collected logs is too large? **
A: By default, the upper limit of the number of files returned by a single node at a time is 50 (controlled by the system configuration `obdiag.basic.file_number_limit`). When the number of files exceeds this limit, the excess will not be returned, and an `Error: Too many files xx > 50` message will appear in the result. You can reduce the query time range or increase the limit, such as modifying the `file_number_limit` parameter in the configuration file path, or adding the following internal parameters when executing the command:
```shell
--inner_config obdiag.basic.file_number_limit=100
The system configuration file path is /opt/oceanbase-diagnostic-tool/conf/inner_config.yml (the actual path shall prevail during source code installation).
**Q3: Error zip: command not found. **
A: Obdiag 3.2.0 (not included) used to use the zip tool of the target host for compression when collecting information and transmitting it back, so you need to install the zip tool on the host being collected.
**Q4: When executing source /usr/local/oceanbase-diagnostic-tool/init.sh, it is required to repeatedly confirm whether it needs to be overwritten. **
A: It may be because the cp command has been rewritten and the -i prefix has been added. It is recommended to check the ~/.bashrc file to see if the cp command has been rewritten, delete -i and then execute source ~/.bashrc to reset the cp command.
Description
This problem only exists in versions before obdiag V3.2.0 and has been solved since V3.2.0.
**Q5: Why is there no command auto-completion under Debian system? **
A: Some Debian systems will not automatically source /etc/profile.d/obdiag.sh. Users can manually add the source /etc/profile.d/obdiag.sh statement to ~/.bashrc.
Q6: What should I do if I don’t want to fill in the ssh username and ssh password when the obdiag config command is executed?
A: Just open the ssh password-free ssh between the remote node (usually the OBServer node) and the obdiag deployment node. Example: Machine A needs to use ssh to log in to machine B without a password.
# step1: On machine A, generate SSH key pair (press Enter for defaults)
# id_rsa.pub (public key)
ssh-keygen -t rsa
ls ~/.ssh
# step2: Copy machine A's public key to machine B
ssh-copy-id -i ~/.ssh/id_rsa.pub user@machine_b_ip
```**Q7: When there are parameters with special characters in the input, obdiag has a problem with parsing the parameters, and the command recognition is incorrect. **
A: You can use temporary environment variables to pass in parameters to avoid the problem of the shell parsing special characters (such as `!`). For example:
```shell
PASSWORD='xxxxx_!XSP'
obdiag gather scene run --scene=observer.perf_sql \
--env host=xx.xx.xx.xx --env port=2881 --env user=xxx@xxx --env password=$PASSWORD --env database=xx \
--env trace_id=YBxxxxx
```**Q8: How to view the detailed log of a certain obdiag execution? **
A: Trace ID will be output after each execution. Use `obdiag display-trace <trace_id>` to view detailed logs of this execution. The log file is located by default at `~/.obdiag/log/obdiag.log`.