Solaris: Generate a core dump from a running process with gcore

Contributor Icon Contributed by qmchenry Date Icon March 31, 2004  
Tag Icon Tagged: Solaris system administration

A core dump is a snapshot of the memory occupied by a process plus additional debugging information. Core files are typically generated when a process terminates unexpectedly. This recipe describes manually generating a core file from a running process.


To generate a core file named ‘core’ in the current working directory for the process with a process id of 345, use:

gcore 345

If you want to control the name of the core dump file, use the -o option with a filename or path and filename, such as core.test or /tmp/core.1

gcore -o /tmp/core.1 345

Previous recipe | Next recipe |
 

 
close Reblog this comment
blog comments powered by Disqus