YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Stream Processing
DR (Disaster Recovery)
Configuration Parameters
Index
Extension
SQL Reference
FAQ
This document introduces the log collection and packaging tools mxpacklogs.
*.tar.gz
package under /tmp
.*.tar.gz
package.--hosts
and --base-data-dirs
.In the following example, mdw is Master and sdw is non-Master.
Get all host log information
[mxadmin@mdw ~]$ mxpacklogs
[<user name>@sdw ~]$ mxpacklogs --dbhost 172.31.33.128 --dbport 5432 --username mxadmin --password 123
Get log information under the specified host
sdw1
and sdw2
. The base-data-dirs
of both machines are /mxdata_20221229075012
.[<user name>@sdw ~]$ mxpacklogs --hosts sdw1,sdw2 --base-data-dirs /mxdata_20221229075012
sdw1
and sdw2
. The base-data-dirs
of sdw1
is /mxdata_20221229075012
, and the base-data-dirs
of sdw2
is /data1/mxdata_20221229075013
. [<user name>@sdw ~]$ mxpacklogs --hosts sdw1,sdw2 --base-data-dirs /mxdata_20221229075012,/data1/mxdata_20221229075013
| Parameter name | Default value|Description |
| --- | --- |
| --base-data-dirs | Data directory in database meta information | Optional. This parameter is only required if the database is not accessible. Provide it to the mxdata_xxxx
directory level. Format: mxpacklogs --base-data-dirs /data/mxdata_20230324145536
|
| --hosts | Logs of all hosts in the cluster | -- hosts
can collect logs of hosts of a specific segment to avoid excessive space and time overhead. Format: mxpacklogs --hosts sdw1,sdw2
or mxpacklogs --hosts sdw1 --hosts sdw2
|
| -h / --dbhost | 127.0.0.1 | Database Server Host |
| -p / --dbport | 5432 | Database Server Port |
| --debug | Not involved | Turn on debug log output |
| --help | Not involved | Print help information |
| --host | 127.0.0.1 | The host to install the supervisor/mxgate service |
| --mode | api | The output format is api or cli |
| -W / --password | NULL | Database user password |
| --port | 4617 | supervisor server port |
| -U / --username | mxadmin | Database username |
| --validate | Not involved | Verification mode - Trial run |
| --verbose | Not involved | Turn on detailed log output |
| -v / --version | Not involved | Display tool version |
| --path | /opt/ymatrix/matrixdb[x] | The matrixdb installation path on the supervisor host; [x] is the database version number, such as matrixdb5
, matrixdb6
|
Notes!
For more information about log content, please see Log.