Running onstat Commands on a Shared Memory Dump File

You can run onstat commands against a shared memory dump file. The shared memory dump file can be produced explicitly by using the onstat -o command. If the DUMPSHMEM configuration parameter is set to 1 or set to 2, the dump file is created automatically at the time of an assertion failure.

Syntax:

onstat optionsinfile

When using the command line, enter the source file as the final argument. The following example prints information about all threads for the shared memory dump contained in the file named onstat.out, rather than attempting to attach to the shared memory of a running server.

onstat -g ath onstat.out

For instructions on how to create the memory dump file with onstat -o, see onstat -o command: Output shared memory contents to a file.

Running onstat Commands on a Shared Memory Dump File Interactively

Use onstat -i (interactive mode) to run more than one onstat command against a dump file. Interactive mode can save time because the file is read only once. In command-line mode, each command reads the file.

The following example reads the shared memory dump file and enters interactive mode. Other onstat commands can be executed against the dump file in the normal interactive fashion.

onstat -i source_file

For information about interactive mode, see onstat -i command: Initiate interactive mode.

Running onstat Commands on a Shared Memory Dump File Created Without a Buffer Pool

Certain onstat commands have different output when you run them on a dump file created without the buffer pool (created with onstat -o nobuffs or with the DUMPSHMEM configuration parameter set to 2):
  • If you run onstat -B on a dump file created without the buffer pool, the output will display 0 in the memaddr, nslots, and pgflgs columns.
  • If you run onstat -g seg on a dump file created without the buffer pool, the output will show both the original and nobuffs resident segment size.
  • If you run onstat -P on a shared-memory dump file that does not have the buffer pool, the output is:
    Nobuffs dumpfile -- this information is not available