HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)
p
pstat(2) pstat(2)
int pstat(
int, union pstun, size_t, size_t, int
);
Remarks
The underlying function pstat() is provided for backward compatibility. Use of the
pstat_get*()
wrapper functions is recommended (for example, pstat_getproc()
) to avoid the polymorphic typing of
the
union pstun parameter.
DESCRIPTION
The pstat functions return information about various system contexts. The contents of the various asso-
ciated data structures, structs pst_crashdev , pst_crashinfo
, pst_diskinfo , pst_dynamic ,
pst_fileinfo , pst_fileinfo2
, pst_filedetails
, pst_ipcinfo, pst_lvinfo ,
pst_mpathnode
, pst_msginfo , pst_node , pst_processor
, pst_seminfo , pst_shminfo ,
pst_stable , pst_static, pst_status, pst_socket ,
pst_stream , pst_swapinfo ,
pst_vminfo , pst_vm_status
, and pst_pset are declared in the header files
<sys/pstat.h>
,<sys/pstat/*_pstat_body.h>
. The headers contain descriptions of the fields
of each of the context data structures.
Summary of Available Contexts
The
pstat routines support the following contexts of information. Detailed descriptions of each routine
follow.
Short
Context Struct Routine Instances Cut
Static pst_static pstat_getstatic() 1
Dynamic pst_dynamic pstat_getdynamic() 1
VM pst_vminfo pstat_getvminfo() 1
IPC pst_ipcinfo pstat_getipc() 1
Stable Store pst_stable pstat_getstable() 1
Crash Dumps pst_crashinfo pstat_getcrashinfo() 1
Processor pst_processor pstat_getprocessor() 1 per processor
Disk pst_diskinfo pstat_getdisk() 1 per disk
Swap pst_swapinfo pstat_getswap() 1 per swap area
Dump Areas pst_crashdev pstat_getcrashdev() 1 per dump area
Node pst_node pstat_getnode() 1 per node
Process pst_status pstat_getproc() 1 per process yes
LW Process lwp_status pstat_getlwp() 1 per lwp/thread yes
Process VM pst_vm_status pstat_getprocvm() 1 per process region yes
LVM Vol pst_lvinfo pstat_getlv() 1 per lvol yes
Sema Set pst_seminfo pstat_getsem() 1 per sem set yes
Msg Queue pst_msginfo pstat_getmsg() 1 per msg queue yes
Shared Mem pst_shminfo pstat_getshm() 1 per shm seg yes
Proc Set pst_pset pstat_getpset() 1 per proc set yes
Open File pst_fileinfo pstat_getfile() 1 per file yes
Open File pst_fileinfo2 pstat_getfile2() 1 per file yes
Open File pst_ pstat_ 1 per file/call
filedetails getfiledetails()
Open Socket pst_socket pstat_getsocket() 1 per socket/call
Open Stream pst_stream pstat_getstream() 1 per stream/call
Open File char * pstat_getpathname() 1 per file/call
DNLC pst_mpathnode pstat_getmpathname() 1 per DNLC entry
Wrapper Function Descriptions
pstat_getcrashdev()
Returns information specific to a particular crash dump device. There is one instance of
this context for each crash dump device configured on the system. For each instance
requested, data, up to a maximum of elemsize bytes, are returned in the structs
pst_crashdev pointed to by buf. The elemcount parameter specifies the number of
structs pst_crashdev that are available at buf to be filled in. The index parame-
ter specifies the starting index within the context of crash dump devices.
Section 2−−240 Hewlett-Packard Company − 3 − HP-UX 11i Version 1: September 2005