gcore.1 (2010 09)
g
gcore(1) gcore(1)
NAME
gcore - get core images of running processes
SYNOPSIS
gcore [-o filename ] process-id ...
DESCRIPTION
The
gcore command creates a core image of each specified process. By default, the name of the core
image file for process-id will be core.
process-id. The process information in the core file can be
obtained by using debuggers.
When the
gcore command creates a core image of each specified process, the process is temporarily
stopped. Further, when the creation of core image is complete, the process continues to execute.
Options
-o filename Creates the core file with name of the file as filename
.process-id. If multiple process-id
values are specified, filename will be common for all the core image files. See the EXAM-
PLES section.
Operands
process-id The process ID for which a core image file will be created.
RETURN VALUE
Upon completion,
gcore exits with one of the following values:
0 A core file was successfully created.
>0 An error condition was encountered. In such a case, the creation of a core file is not
guaranteed. The error conditions could be because of
• A nonexistent or incorrect process ID was specified.
• An invalid option was specified.
• The current working directory of the process or directory from which
gcore was invoked
had no write permissions.
• The current working directory of the process was not accessible.
• The file system is full.
EXAMPLES
Example 1
Dump the core image of process 1030 in the file "core.1030".
gcore 1030
Example 2
Dump the core image of the process 1030 in the file "test.1030".
gcore -o test 1030
Example 3
Dump the core image of the processes 1030, 1031, 1032, and 1033 in the files "core.1030", "core.1031",
"core.1032", "core.1033".
gcore 1030 1031 1032 1033
Example 4
Dump the core image of the processes 1030, 1031, 1032, and 1033 in the files test.1030, test.1031,
test.1032, test.1033.
gcore -o test 1030 1031 1032 1033
FILES
core.process-id Core image file for process-id . (Both where gcore is invoked and the current
working directory of the process.)
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1