2 .\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GCORE 1 "Jun 19, 2006"
8 gcore \- get core images of running processes
12 \fBgcore\fR [\fB-pgF\fR] [\fB-o\fR \fIfilename\fR] [\fB-c\fR \fIcontent\fR] \fIprocess-id\fR...
18 The \fBgcore\fR utility creates a core image of each specified process. By
19 default, the name of the core image file for the process whose process \fBID\fR
20 is \fIprocess-id\fR is \fBcore.\fR\fIprocess-id\fR.
24 The following options are supported:
28 \fB\fB-c\fR \fIcontent\fR\fR
31 Produces core image files with the specified content. The content description
32 uses the same tokens as in \fBcoreadm\fR(1M). The \fB-c\fR option does not
33 apply to cores produced due to the \fB-p\fR or \fB-g\fR flags.
42 Force. Grabs the target process even if another process has control.
51 Produces core image files in the global core file repository with the global
52 content as configured by \fBcoreadm\fR(1M). The command fails if the user does
53 not have permissions to the global core file repository.
59 \fB\fB\fR\fB-o\fR \fIfilename\fR\fR
62 Substitutes \fIfilename\fR in place of \fBcore\fR as the first part of the name
63 of the core image files. \fIfilename\fR can contain the same tokens to be
64 expanded as the paths in \fBcoreadm\fR(1M).
73 Produces a core image file in the process-specific location with the
74 process-specific content for each process as configured by \fBcoreadm\fR(1M).
75 The command fails if the user does not have permissions to the per-process core
82 The following operand is supported:
86 \fB\fIprocess-id\fR\fR
95 Caution should be exercised when using the \fB-F\fR flag. Imposing two
96 controlling processes on one victim process can lead to chaos. Safety is
97 assured only if the primary controlling process, typically a debugger, has
98 stopped the victim process and the primary controlling process is doing nothing
99 at the moment of application of the \fBproc\fR tool in question.
103 The following exit values are returned:
119 On failure, such as non-existent process \fBID\fR.
126 \fB\fB\fR\fBcore.\fR\fB\fIprocess-id\fR\fR\fR
135 See \fBattributes\fR(5) for descriptions of the following attributes:
143 ATTRIBUTE TYPE ATTRIBUTE VALUE
145 Interface Stability See below.
150 The command syntax is Evolving. The Output Formats are Unstable.
154 \fBkill\fR(1), \fBcoreadm\fR(1M), \fBsetrlimit\fR(2), \fBcore\fR(4),
155 \fBproc\fR(4), \fBattributes\fR(5)
159 \fBgcore\fR is unaffected by the \fBsetrlimit\fR(2) system call using the
160 \fBRLIMIT_CORE\fR value.