[Previous] [Contents] [Next]

dumper

Dump postmortem state of a program (QNX)

Syntax:

dumper [-d path] [-p pid] [-s] &

Options:

-d path
The name of the directory in which postmortem dump files are written. If not specified, the default is the user's home directory.
-p pid
Save a dump file for this process if it terminates for any reason. Don't save a dump file for any other process.
-s
Create sparse dump files (produces much smaller dump files).

Description:

The dumper utility runs in the background and provides a postmortem dump service for all processes. Whenever a program terminates abnormally, a dump of the current state of the program is written to disk. The dump filename is the same as the program name with a .dmp extension. For example, if the program name is experiment the dump will be written to the /home/userid/experiment.dmp file.

You can use the -d option to force all dumps into a single directory rather than into the invoking user's home directory.

The -p option lets you monitor a particular process. You can run multiple copies of dumper, each monitoring a different process.

A dump file may be examined using a debugger:

    wd -tr=pmd programname.dmp

The dump file format is described in the /usr/include/sys/dumper.h C header file.

A program may terminate in one of two ways. It may exit cleanly under its own control, returning an exit status, or it may be forcibly terminated by the receipt of a signal it is not prepared to handle. In the latter case, dumper will write a dump file for the following set of signals:

Signal Description
SIGABRT program-called abort function
SIGBUS parity error
SIGFPE floating-point error or divide by zero
SIGILL illegal instruction executed
SIGSEGV segmentation violation

You can force the dump of a running program by setting one of the preceding signals, assuming that the program is not masking or handling the signal itself. For example:

Force a dump using the kill command and a process ID (pid):
kill -sigabrt pid
Force a dump using the slay utility and the process name:
slay -s sigabrt process_name

Examples:

Start dumper, with dump files to be written to the home directory of the user who was running the process being dumped:

    dumper &

Start dumper, dump files to be placed in the directory /home/dumps:

    dumper -d /home/dumps &

Files:

After initialization has been completed, dumper closes its standard input, standard output and standard error file descriptors. If an error is encountered during initialization, a diagnostic message is written to standard error before dumper terminates. Other than this, no output is produced to these files.

The dumper utility will create dump files in the home directory of the user who was running the program being dumped. These files will be named /home/userid/program.dmp. The directory may be different if the -d path option was specified on the command line.

Exit status:

The dumper utility normally does not terminate. However, it may terminate if it encounters an error on startup (for instance, if it was not run by root) or if it receives a signal.

0
A signal was received and dumper shut down successfully.
1
An error was encountered on startup (not run by root or bad command-line options).

See also:

kill, slay

WATCOM Debugger User's Guide


[Previous] [Contents] [Next]