The onstat utility reads shared-memory
structures and provides statistics about the database server at the
time that the command runs.
You can combine multiple onstat option flags in a single command. The contents of
shared memory might change as the onstat output
displays. The onstat utility does not place any
locks on shared memory, so running the utility does not affect performance.
You use SQL
administration API commands that are equivalent to onstat commands.
-
onstat Portal: onstat Utility Commands Sorted by Functional Category
The information in this topic lists onstat commands
that are sorted by functional category. -
Monitor the database server status
To monitor the database server status, view the heading
of the onstat command. -
onstat command syntax
The complete syntax for the onstat command,
including information about the interactive mode and how to have options
to execute repeatedly. -
onstat command: Equivalent to the onstat -pu command
If you invoke onstat without any options,
the command is interpreted as onstat -pu (the -p option
and the -u option). -
onstat – command: Print output header
All onstat output includes
a header. The onstat – command displays only the
output header and the value that is returned from this command indicates
the database server mode. -
onstat — command: Print onstat options and functions
Use the onstat — command to display
a listing of all of the onstat options and their
functions. You cannot combine this option with any other flag. -
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. -
onstat -a command: Print overall status of the database server
Use the onstat -a command
to display information about the status of the database server. This
command does not display information about all of the onstat options,
only about those onstat options used for initial troubleshooting. -
onstat -b command: Print buffer information for buffers in use
Use the onstat -b option to display
information about the buffers that are currently in use, including
the total number of resident pages in the buffer pool. -
onstat -B command: Prints information about used buffers
Use the onstat -B option to display
information about buffers that are not on the free-list. -
onstat -c command: Print ONCONFIG file contents
Use the onstat -c command to display
the contents of the ONCONFIG file. -
onstat -C command: Print B-tree scanner information
Use the -C command to display information
about the B-tree scanner subsystem and each B-tree scanner thread. -
onstat -d command: Print chunk information
Use the onstat -d command to show information
about chunks in each storage space. -
onstat -D command: Print page-read and page-write information
Use the onstat -D command to display
page-read and page-write information for the first 50 chunks in each
space. -
onstat -f command: Print dbspace information affected by dataskip
Use the -f command to list the dbspaces
that the dataskip feature currently affects. -
onstat -F command: Print counts
Use the onstat -F command to display
a count for each type of write that flushes pages to disk. -
onstat -g monitoring options
The options that you can use with onstat -g command
are used for support and debugging only. You can include only one
of these options in the onstat -g command. -
onstat -G command: Print TP/XA transaction information
Use the onstat -G command to display
information about global transactions generated through the TP/XA library. -
onstat -h command: Print buffer header hash chain information
Use the onstat -h command to display
information about the buffer header hash chains (sometimes called
"hash buckets") that are used to access pages in each buffer pool. -
onstat -i command: Initiate interactive mode
Use the onstat -i command to put the onstat utility
in the interactive mode. -
onstat -j command: Provide onpload status information
Use the onstat -j command to provide
information about the status of an onpload job. -
onstat -k command: Print active lock information
Use the onstat -k command to print information
about active locks, including the address of the lock in the lock
table. -
onstat -l command: Print physical and logical log information
Use the onstat -l command to display
information about the physical logs, logical logs, and temporary logical
logs. -
onstat -L command: Print the number of free locks
Use the onstat -L command to print the
number of free locks on a lock-free list. -
onstat -m command: Print recent system message log information
Use the onstat -m command to display
the 20 most recent lines of the system message log. -
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. -
onstat -p command: Print profile counts
Use the onstat -p command to display
information about profile counts either since you started the database
server or since you ran the onstat -z command. -
onstat -P command: Print partition information
Use the onstat -P command to display
the partition number and the pages in the buffer pool for all of the
partitions. -
onstat -r command: Repeatedly print selected statistics
Use the onstat -r command to repeatedly
print the statistics for other options specified in the command at
specified intervals. -
onstat -R command: Print LRU, FLRU, and MLRU queue information
Use the onstat -R command to display
detailed information about the LRU queues, FLRU queues, and MLRU queues.
For each queue, the onstat -R command displays
the number of buffers in the queue and the number and percentage of
buffers that have been modified. -
onstat -s command: Print latch information
Use the onstat -s command to display
general latch information, including the resource that the latch controls. -
onstat -t and onstat -T commands: Print tblspace information
Use the onstat -t command
to display tblspace information for active tblspaces. Use the onstat
-T command to display tblspace information for all tblspaces. -
onstat -u command: Print user activity profile
Use the onstat -u command to display
a profile of user activity. -
onstat -x command: Print database server transaction information
Use the onstat -x command to display
transaction information on the database server. -
onstat -X command: Print thread information
Use the onstat -X command to obtain
precise information about the threads that are waiting for buffers. -
onstat -z command: Clear statistics
Use the onstat -z command
to clear database server statistics, including statistics that relate
to Enterprise Replication, and set the profile counts to 0. -
Return codes on exiting the onstat utility
The onstat utility displays a set of
return codes when you exit the utility.