onstat -g nsc command: Print current shared memory connection information
Use the onstat -g nsc command to display information about shared memory connections either for all of the current connections or for a specified connection ID.
If no client_id is provided, information about all current shared memory connections to the database server is given. If a client_id is provided then this command gives more detailed information about the shared memory connection with that ID.
Example output
This is output of onstat -g nsc with no client_id. It shows that there is only one user currently connecting to the database server through shared memory. That connection has an ID of 0.
This example shows output from running the command using a client_id of 0.
Output description
- clientid
- Server assigned ID
- clientPID
- Client process ID
- state
- State of connection
- Connected
- The client has established a connection with the server.
- Con1
- The server has successfully set up a connection with the client, but the client has not yet been notified of it.
- Waiting
- The server is in the process of setting up a connection with the client.
- Reject
- Client connection has been rejected by the server, normally because the server is shutting down or not yet in on-line mode.
- Closed
- Server has closed the connection with the client. Client might not be aware of the fact yet.
- Not connected
- Server is initializing internal structures for the connection.
- Unknown
- Connection has been closed and the client is aware of the fact. Server is cleaning up internal structures.
- #serverbufs
- Database server buffers currently allocated
- #clientbufs
- Client buffers currently allocated
- #rdwrts
- The total number of reads and writes performed through this connection since it was created.
The following items are only in the output
if you run the onstat -g nsc command with a client_id:
- needbuf
- Indicates if server is waiting for a buffer to be freed
- 0
- False
- 1
- True
- segid
- Shared memory segment ID
- semid
- Semaphore ID
- semnum
- Semaphore number in the semaphore ID
- be_semid
- Backend semaphore ID
- be_semnum
- Backend semaphore number in the semaphore ID
- be_curread
- ID of backend buffer being read
- be_curwrite
- ID of backend buffer being written
- fe_curread
- ID of frontend buffer being read
- fe_currwrite
- ID of frontend buffer being written
- be_nextread
- ID of next backend buffer to be read
- be_nextwrite
- ID of next backend buffer to be written
- fe_nextread
- ID of next frontend buffer to be read
- fe_nextwrite
- ID of next frontend buffer to be written
- readyqueue
- Queue of the shared memory buffer ids
- Buffers
- i
- Internal location key of message buffer
- bufid
- Message buffer ID
- status
- Status of message buffer
- offset
- Offset of memory buffer in shared memory segments
- fe_addr
- Frontend address of message buffer