1.\" Copyright (c) 1983, 1990, 1992, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)gcore.1 8.2 (Berkeley) 04/18/94 7.\" 8.Dd "" 9.Dt GCORE 1 10.Os BSD 4.2 11.Sh NAME 12.Nm gcore 13.Nd get core images of running process 14.Sh SYNOPSIS 15.Nm gcore 16.Op Fl s 17.Op Fl c Ar core 18.Ar exec pid 19.Sh DESCRIPTION 20.Nm Gcore 21creates a core image of the specified process, 22suitable for use with 23.Xr gdb 1 . 24By default, the core is written to the file 25.Dq Pa core.<pid> . 26Both the executable image, 27.Ar exec , 28and the process identifier, 29.Ar pid , 30must be given on the command line. 31.Pp 32The options are: 33.Bl -tag -width indent 34.It Fl c 35Write the core file to the specified file instead of 36.Dq Pa core.<pid> . 37.It Fl s 38Stop the process while gathering the core image, and resume it 39when done. This guarantees that the resulting core dump will 40be in a consistent state. The process is resumed even if it was 41already stopped. 42The same effect can be achieved manually with 43.Xr kill 1 . 44.El 45.Sh FILES 46.Bl -tag -width /var/log/messages -compact 47.It Pa core.<pid> 48The core image. 49.EL 50.Dp 51.Sh HISTORY 52.Nm Gcore 53appeared in 4.2BSD. 54.Sh BUGS 55Context switches or paging activity that occur while 56.Nm gcore 57is running may cause the program to become confused. 58For best results, use -s to temporarily stop the target process. 59.Pp 60.Nm Gcore 61is not compatible with the original 4.2BSD version. 62In particular, 4.4BSD requires the 63.Ar exec 64argument. 65