[SLL] Is gcore for linux possible?

Phil Hughes fyl at ssc.com
Wed May 12 09:06:35 PDT 1999


The amazing Leland Olds wrote:
> Gcore is a program that allows you get a core dump from a running
> process without causing it to abort. It also tags the generated core
> file with the process id. This program is available for solaris, and a
> number of other Unixes, but apparently not Linux.
> 
> Would it be possible to do something like this for Linux by reading
> from the files in /proc/<pid>/* and formatting that information
> appropriately?
> 
> Where is some good documentation of the contents of proc, and the
> format of core files? Is there a better approach to doing this?

You can attach gdb to a running process.  For example, if you are running
snarf and it's pid is 345, you can say
	gdb snarf 345
and it attaches.  It seems like this will get you the same functionality.


-- 
Phil Hughes, SSC, Inc. P.O. Box 55549, Seattle, WA 98155  (206)PUBS-REF
>>> Publishers of pocket references for UNIX, C, ..., Linux Journal <<<
    E-mail: fyl at ssc.com  Phone: (206)782-7733 x104  Fax: (206)782-7191
SSC/Linux Journal web site: http://www.ssc.com/

========================================================================
Contributions/Posts To: linux-list at ssc.com
To Unsubscribe: linux-list-request at ssc.com, "unsubscribe" in message body
Report Problems to: owner-linux-list at ssc.com
List archive at: http://www.ssc.com/mailing-lists/




More information about the linux-list mailing list