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
is
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.
When the creation of the 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,
all the names of the core image files will begin with
filename.
See the
EXAMPLES
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 this case the creation of a core file is not guaranteed.
The possible error conditions include:
A nonexistent or incorrect process ID was specified.
An invalid option was specified.
The directory of the dumpfile or directory from which
gcore
was invoked did not have write permissions.
The
filename.
<pid> directory with
core.
<pid> subdirectory already exists.
The current working directory of the process was not
accessible.
EXAMPLES
Example 1
Dump the core image of process 1030 into the file
core.1030.
Example 2
Dump the core image of process 1030 into the file
test.1030.
Example 3
Dump the core image of processes 1030, 1031, 1032,
and 1033 into the files
core.1030,
core.1031,
core.1032,
and
core.1033.
gcore 1030 1031 1032 1033
Example 4
Dump the core image of processes 1030, 1031, 1032, and 1033
into the files
test.1030,
test.1031,
test.1032,
and
test.1033.
gcore -o test 1030 1031 1032 1033
Example 5
Dump the core image of process 1030 into the file
core.1030
in existing directory
/tmp/testgcore.1030.
gcore -o /tmp/testgcore 1030
WARNINGS
The behavior of
gcore
is not defined if a non-regular file with the identical
name and directory path as the core image is created
while
gcore
is executing.
FILES
- core.process-id
Core image file for
process-id.
AUTHOR
gcore
was developed by Chris Bertin at Hewlett-Packard.