HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

g
gcore(1) gcore(1)
NAME
gcore - get core images of running processes
SYNOPSIS
gcore [-o filename] process-id...
DESCRIPTION
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.
process-id The process ID for which a core image file will be created.
EXAMPLES
Dump the core image of process 1030 in the file "core.1030".
gcore 1030
Dump the core image of the process 1030 in the file "test.1030".
gcore -o test 1030
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
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
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 core file is not guaranteed. The
error conditions could be because of
A non-existent or incorrect process ID was specified.
An invalid option was specified.
The current working directory of the process or directory from which gcore invoked had no
write permissions.
The current working directory of the process was not accessible.
The file system is full.
FILES
core.process-id core image file for process-id. ( Both where gcore is invoked and the current working
directory of the process )
AUTHOR
gcore was developed by Chris Bertin (HP).
SEE ALSO
adb(1), gdb(1), kill(1), ttrace(2), a.out(4), core(4)
Section 1324 Hewlett-Packard Company 1 HP-UX 11i Version 1: September 2005