GCORE(1) | General Commands Manual | GCORE(1) |
gcore
— get core
images of running processes
gcore |
[-s ] [-v ]
[-b size]
[-o path |
-c pathformat]
pid |
The gcore
program creates a core file
image of the process specified by pid. The resulting
core file can be used with a debugger, e.g. lldb(1), to
examine the state of the process.
The following options are available:
-s
-v
-b
sizeThe following options control the name of the core file:
-o
path-c
pathformatEach special character is introduced by the
%
character. The format characters and their
meanings are:
The default file name used by gcore
is
%N-%P-%T. By default, the core file will be written to
a directory whose name is determined from the
kern.corefile MIB. This can be printed or modified
using sysctl(8).
The directory where the core file is to be written must be accessible to the owner of the target process.
gcore
will not overwrite an existing file,
nor will it create missing directories in the path.
The gcore
utility exits 0 on
success, and >0 if an error occurs.
With the -b
flag,
gcore
writes out as much data as it can up to the
specified limit, even if that results in an incomplete core image. Such a
partial core dump may confuse subsequent programs that attempt to parse the
contents of such files.
February 10, 2016 | Darwin |