Solaris: Generate a Core Dump from a Running Process with gcore

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 tech-recipe describes how to generate a core file manually from a running process.


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

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

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

  • Name

    very useful info