PSTAT Interfaces

4
IPC
Stable Store
Crash Dumps
pst_ipcinfo
pst_stable
pst_crashinfo
pstat_getipc()
pstat_getstable()
pstat_getcrashinfo()
1
1
1
Processor
Disk
Swap Areas
Dump Areas
Node
pst_processor
pst_diskinfo
pst_swapinfo
pst_crashdev
pst_node
pstat_getprocessor()
pstat_getdisk()
pstat_getswap()
pstat_getcrashdev()
pstat_getnode()
1 per processor
1 per disk
1 per swap area
1 per dump area
1 per node
Process
LW Process
Process Region
LVM Volume
Sema Set
Msg Queue
Shared Memory
pst_status
lwp_status
pst_vm_status
pst_lvinfo
pst_seminfo
pst_msginfo
pst_shminfo
pstat_getproc()
pstat_getlwp()
pstat_getprocvm()
pstat_getlv()
pstat_getsem()
pstat_getmsg()
pstat_getshm()
1 per process
1 per LWP/thread
1 per process region
1 per logical volume
1 per semaphore set
1 per message queue
1 per shm segment
yes
yes
yes
yes
yes
yes
yes
Open File
Open File
pst_fileinfo
pst_fileinfo2
pstat_getfile()
pstat_getfile2()
1 per open file/process
1 per open file/process
yes
yes
Open File
Open Socket
Open Stream
Open File
pst_filedetails
pst_socket
pst_stream
char *
pstat_getfiledetails()
pstat_getsocket()
pstat_getstream()
pstat_getpathname()
1 per open file/call
1 per open socket/call
1 per open stream/call
1 per open file/call
DNLC pst_mpathnode pstat_getmpathname() 1 per DNLC entry
A wide (64-bit) version of the pstat interfaces is available for narrow (32-bit) applications
to use. A narrow application could use the flag -D_PSTAT64 at compile time to switch to the wide
interfaces. Using this compiler flag in a narrow application is equivalent to using the default
interfaces on a wide system. The data structures defined in the respective header files have types
such as _T_LONG_T. The reason for this is to have two different data structures, one for 64 bit and
one for 32-bit. This is achieved as follows (from <sys/pstat.h>):
# if defined(_PSTAT64)
# define _T_ULONG_T uint64_t
# define _T_LONG_T int64_t
# else
# define _T_ULONG_T uint32_t
# define _T_LONG_T int32_t
# endif
For 32-bit application running on 64-bit kernels, it is possible that certain fields of the
contexts may overflow. For example, the size of a file in pst_filedetails can overflow when large
files are supported. To detect this situation, a valid vector is provided in all the data structures
that require one. This vector will indicate if a certain field in the structure is valid or not. User
should check this vector when EOVERFLOW is set. Macros for field validity are also provided.
Initially, all the bits in the vector are set. These bits will be cleared in valid vector if the
corresponding members overflow.