Creating a process dump manually

rUse the gcore program to examine failure-prone programs, or if your Industrial PC is in an infinite loop or something situations. The process dump is particularly useful for taking a snapshot of a running process and analyzing processes under TwinCAT/BSD.

By default, the process dump is written to the file core.pid. The file can then be analyzed with a debugger such as gdb.

Proceed as follows:

1. Determine the process ID (pid) of the desired process with the command pgrep -l <processname>. The command ps -A can be used to list all processes.
2. Enter the command gcore <pid> in the console. Sample: gcore 6674
3. The command gcore 6674 generates a file with the name core.6674
The file is created in the current directory. This file can then be read and analyzed with a debugger. The option -c can be used to specify your own file name.
Sample: gcore -c testfile 6674