onstat -o command: Output shared memory contents to a file

Use the onstat -o command to write the contents of shared memory to a specified file for later analysis. If you do not specify an output file, a file named onstat.out is created in the current directory.

Figure 1: Syntax:

1  onstat   -o
1 nobuffs
1 full
1? outfile

Use the nobuffs option to exclude the buffer pool in the resident segment of shared memory from the output file. This results in a smaller output file.

Use the full option to create an output file that is the same size as the shared memory segments for the HCL OneDB™ instance. You must have enough room in the file system to handle the output.

If you do not specify either the nobuffs or the full option, the output is controlled by the database server DUMPSHMEM configuration parameter setting:

  • If DUMPSHMEM is set to 0 or to 1, onstat -o command writes a full shared-memory dump file.
  • If DUMPSHMEM is set to 2, onstat -o command writes a nobuffs shared-memory dump file that excludes the buffer pool in the resident segment.

By running additional onstat commands against the file, you can gather information from a previously saved shared memory dump. The outfile that you create with the onstat -o command is the infile that you can use as a source file to run the additional onstat commands. For more information, see Running onstat Commands on a Shared Memory Dump File.