xref: /netbsd-src/usr.bin/gcore/gcore.1 (revision 01869ca4d24a86379a68731bf9706a9f0820fe4e)
1*01869ca4Swiz.\"     $NetBSD: gcore.1,v 1.17 2017/07/03 21:34:19 wiz Exp $
2d1020feeSjdolecek.\"
3c79beb47Schristos.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
4c79beb47Schristos.\" All rights reserved.
5c79beb47Schristos.\"
6c79beb47Schristos.\" This code is derived from software contributed to The NetBSD Foundation
7c79beb47Schristos.\" by Christos Zoulas.
88dd56584Schristos.\"
98dd56584Schristos.\" Redistribution and use in source and binary forms, with or without
108dd56584Schristos.\" modification, are permitted provided that the following conditions
118dd56584Schristos.\" are met:
128dd56584Schristos.\" 1. Redistributions of source code must retain the above copyright
138dd56584Schristos.\"    notice, this list of conditions and the following disclaimer.
148dd56584Schristos.\" 2. Redistributions in binary form must reproduce the above copyright
158dd56584Schristos.\"    notice, this list of conditions and the following disclaimer in the
168dd56584Schristos.\"    documentation and/or other materials provided with the distribution.
178dd56584Schristos.\"
18c79beb47Schristos.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19c79beb47Schristos.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20c79beb47Schristos.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21c79beb47Schristos.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22c79beb47Schristos.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23c79beb47Schristos.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24c79beb47Schristos.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25c79beb47Schristos.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26c79beb47Schristos.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27c79beb47Schristos.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28c79beb47Schristos.\" POSSIBILITY OF SUCH DAMAGE.
298dd56584Schristos.\"
308dd56584Schristos.\"
315fd86a82Skamil.Dd March 26, 2017
328dd56584Schristos.Dt GCORE 1
338dd56584Schristos.Os
348dd56584Schristos.Sh NAME
358dd56584Schristos.Nm gcore
368dd56584Schristos.Nd get core images of running process
378dd56584Schristos.Sh SYNOPSIS
388dd56584Schristos.Nm
39089038b4Schristos.Op Fl c Ar corename
40d1020feeSjdolecek.Ar pid
41d1020feeSjdolecek.Op Ar pid ...
428dd56584Schristos.Sh DESCRIPTION
438dd56584Schristos.Nm
448dd56584Schristoscreates a core image of the specified processes
458dd56584Schristossuitable for use with
468dd56584Schristos.Xr gdb 1 .
478dd56584SchristosBy default, the core is written to the file
48*01869ca4Swiz.Dq Pa <progname>.core ,
49c79beb47Schristoswhere
5063a56a56Swiz.Dq Aq Pa progname
518dd56584Schristosis the program name of the process corresponding to the pid that is given on
524e9926bfSwizthe command line.
53089038b4SchristosThis filename can be changed by supplying the
54089038b4Schristos.Fl c Ar corename
55089038b4Schristosargument, or setting
56*01869ca4Swiz.Dq Pa proc.<pid>.corename
57c79beb47Schristoswith
58c79beb47Schristos.Xr sysctl 8 .
598dd56584Schristos.Sh FILES
608dd56584Schristos.Bl -tag -width /var/log/messages -compact
61*01869ca4Swiz.It Pa <progname>.core
628dd56584SchristosThe core image.
63d1020feeSjdolecek.El
644e9926bfSwiz.Sh SEE ALSO
654e9926bfSwiz.Xr gdb 1 ,
664e9926bfSwiz.Xr sysctl 8
678dd56584Schristos.Sh HISTORY
688dd56584Schristos.Nm
69c872f7bcSreedappeared in
70c872f7bcSreed.Bx 4.2 ,
71c872f7bcSreeddisappeared in
728dd56584Schristos.Nx 1.2 ,
738dd56584Schristosand reappeared in
748dd56584Schristos.Nx 2.0 .
75