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
In production environments, the program will occasionally cause cores to occur due to other unknown reasons such as program bugs. The core of the program will not only cause the query execution to fail, but may cause cluster failure in serious cases. Therefore, the generated core file is very important on-site information and needs to be provided to developers for tracking and tracing.
The packcore tool is used to package the generated core files for developers to debug and track.
packcore is a Python tool released with YMatrix. The package core tool is located at:
$GPHOME/sbin/packcore
$GPHOME/sbin
is not in the environment variable, so it needs to be used through an absolute path.
How to use:
$GPHOME/sbin/packcore -b $GPHOME/bin/postgres postgres.core.4_1635732782.17213
in:
-b $GPHOME/bin/postgres
Specifies the executable file path, because worker processes are derived from postgres master processespostgres.core.4_1635732782.17213
is the generated core fileAfter executing the command, a .tgz
file with the same name as the core file will be generated in the current directory, and the file will be provided to the developer. Includes core files and on-site environment information
The prerequisite for using the packcore tool to package core files is that the operating system needs to generate core files.
To generate a core file, you need to modify the following configuration:
Set coredump file size unlimited:
ulimit -c unlimited
# Persistence method
echo "ulimit -c unlimited" >> /etc/profile
vi /etc/sysctl.conf
Then add kernel.core_pattern=/home/mxadmin/%e.core.%s_%t
to the end
Execute sysctl -p
to make the configuration take effect:
sysctl -p
This configuration determines the location and file name template for the core file generation, where: