PSTAT Interfaces
39
pst_shminfo
This structure describes System V shared memory segment) information. Each structure returned
describes on segment identifier on the system. Header file: <sys/pstat/ipc_pstat_body.h>
_T_ULONG_T psh_idx; /* Index for further pstat() requests */
_T_LONG_T psh_uid; /* UID of shm segment owner */
_T_LONG_T psh_gid; /* GID of shm segment owner */
_T_LONG_T psh_cuid; /* UID of shm segment creator */
_T_LONG_T psh_cgid; /* GID of shm segment creator */
_T_ULONG_T psh_mode; /* mode of shm segment (9 bits) */
_T_ULONG_T psh_seq; /* sequence number of shm segment */
_T_ULONG_T psh_key; /* IPC key of shm segment ID */
_T_ULONG_T psh_segsz; /* size of shm segment (bytes) */
_T_LONG_T psh_cpid; /* PID of shm segment creator */
_T_LONG_T psh_lpid; /* PID of last shmop() */
_T_ULONG_T psh_nattch; /* current # of procs attached (accurate)*/
_T_ULONG_T psh_cnattch; /* current # attached/in mem (inaccurate)*/
_T_LONG_T psh_atime; /* last shmat() time (since 1970) */
_T_LONG_T psh_dtime; /* last shmdt() time (since 1970) */
_T_LONG_T psh_ctime; /* last change time (since 1970) */
_T_ULONG_T psh_flags; /* flags for the shm segment */
int32_t psh_valid; /* Valid vector. PSH_SEGSZ à 0x1 */
Flag bit definitions for psh_flags:
PS_SHM_ALLOC à 0x1 /* shared memory segment is in use */
PS_SHM_DEST à 0x2 /* shm segment to be deleted on last detach */
PS_SHM_CLEAR à0x4 /* shm segment to be zeroed on first attach */
pst_socket
Header file: <sys/pstat/socket_pstat_body.h>
uint32_t pst_hi_fileid; /* File ID */
uint32_t pst_lo_fileid;
uint32_t pst_hi_nodeid; /* Socket node ID */
uint32_t pst_lo_nodeid;
uint32_t pst_peer_hi_nodeid; /* Peer Socket node ID; for AF_UNIX only */
uint32_t pst_peer_lo_nodeid;
_T_LONG_T pst_flags; /* Is a stream? */
uint32_t pst_type; /* generic type */
uint32_t pst_options; /* Option flags per socket */
uint32_t pst_linger; /* time to linger while closing */
uint32_t pst_state; /* Internal socket state */
uint32_t pst_family; /* domain protocol; a member of */
uint32_t pst_protocol; /* protocol number for this family(such as
* IPPROTO_*), if applicable */
uint32_t pst_qlimit; /* max #of queued connections */
uint32_t pst_qlen; /* # connections on incoming q ready to be
* accepted*/
_T_ULONG_T pst_idata; /* actual chars in inbound buffer */
uint32_t pst_ibufsz; /* max actual char count */
_T_ULONG_T pst_rwnd; /* advertised rcv window, if applicable */
_T_ULONG_T pst_odata; /* actual chars in outbound buffer */
uint32_t pst_obufsz; /* max actual char count */
_T_ULONG_T pst_swnd; /* current send window, if applicable */