onstat -g afr command: Print allocated memory fragments

Use the onstat -g afr command to display information about the allocated memory fragments for a specified session or shared-memory pool. Each session is allocated a pool of shared memory.

Syntax:

onstat -gafr { pool_name | sessionid | pool_address }

This command requires an additional argument to specify either a pool name, a session ID, or a pool address. Each session is allocated a memory pool with the same name as the session ID.

The pool_name is the name of the shared-memory pool. Run the onstat -g mem command to identify the pool name.

The sessionid is the session ID. Run the onstat -g ses command to identify the session ID.

The pool_address is the address of the shared-memory pool. Run the onstat -g mem command or the onstat -g ses command to identify the pool address.

Example output

Figure 2: onstat -g afr command output
Allocations for pool name global:
addr             size       memid        fileid   location
4b231000         3288       overhead     306      mtshpool.c:617
4b231cd8         72         mcbmsg       1637     rldmsg.c:92
4b231d20         160        mcbmsg       1637     rldmsg.c:92
4b231dc0         64         osenv        2909     osenv.c:1164
4b231e00         64         osenv        2909     osenv.c:1971
4b231e40         64         osenv        2909     osenv.c:1164
4b231e80         64         osenv        2909     osenv.c:1971

Output description

addr (hexadecimal)
Memory address of the pool fragment.
size (decimal)
Size, in bytes, of the pool fragment.
memid (string)
Memory ID of the pool fragment.
fileid (decimal)
Internal use only. Code file identifier for the allocation.
location (string)
Internal use only. Line number in the code for the allocation.