HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
p
pstat(2) pstat(2)
On success, the function returns 1. On failure, the value of
-1 is returned and errno is
set indicating the cause of the failure. For AF_UNIX sockets that are opened to files, more
information about the files can be obtained with the
pstat_getfiledetails()
call.
In case of AF_UNIX sockets, the fields
pst_peer_hi_nodeid
and
pst_peer_lo_nodeid
can be used to find the peer socket by matching them with
pst_hi_nodeid and pst_lo_nodeid
. The members pst_boundaddr
and
pst_remaddr contain data of the form structsockaddr
, sockaddr_un ,
sockaddr_in , sockaddr_in6 , etc. depending on the socket family.
pstat_getstable()
Returns information contained in the system’s stable storage area. There is one global
instance of this context. Data, up to a maximum of
elemsize bytes, is returned in the
struct pst_stable pointed to by buf. The
elemcount parameter must be 1. The
index parameter must be 0.
pstat_getstatic()
Returns information about the system. This data may change while the system is running
due to administrative changes in the associated kernel tunables. There is one global
instance of this context. Data, up to a maximum of
elemsize bytes, is returned in the
struct pst_static pointed to by buf. The elemcount parameter must be 1. The
index parameter must be 0.
pstat_getstream()
Returns detailed information specific to a stream. For the specified stream, there is one
instance of this context for the stream head, each module, and the driver. For each call,
data, up to a maximum of
elemsize bytes, is returned in the structs pst_stream
pointed to by buf. The elemcount parameter specifies the number of structs
pst_stream that are available at buf to be filled in. The moduleskip parameter
indicates the number of modules to skip before returning information about any modules.
Head information is returned for every call. When applications are compiled with the
_PSTAT_STREAM_GET_XPORT
flag, the pstat_getstream() API reports the Tran-
sport protocol details for XTI/TLI-based TCP/UDP end-points.
pstat_getstream()
returns the Transport protocol information in the instance that contains the Stream head
information. It sets the
PS_STR_XPORT_DATA
bit in the pst_extn_flags to indi-
cate that the Transport details are available for the open file descriptor. The
fid parame-
ter uniquely identifies the file. This id is obtained from calls to
pstat_getfile()
or
pstat_getfile2().
On success, the function returns the number of structures returned starting at the location
specified by
buf. This is at least 1 as the head information is always returned. On failure,
the value of -1 is returned and errno is set indicating the cause of the failure.
Use of this function is limited to UID==0 or effective UID match. Please refer
pstat_getfiledetails()
call for more information on Effective UID match.
The
type field can be PS_STR_HEAD ,PS_STR_MODULE
or PS_STR_DRIVER. The
union
val in pst_stream structure will represent the structures head, module,or
driver in the respective cases. If the flag PS_STR_ISACLONE
is set in pst_flag for
head, the field pst_dev_seq in head represents the clone driver sequence number for
the stream.
pstat_getswap()
Returns information specific to a particular swap area. There is one instance of this context
for each swap area (block or filesystem) configured into the system. For each instance
requested, data, up to a maximum of elemsize bytes, is returned in the structs
pst_swapinfo pointed to by buf. The elemcount parameter specifies the number of
structs pst_swapinfo that are available at buf to be filled in. The index parame-
ter specifies the starting index within the context of swap areas.
pstat_getvminfo()
Returns information about the virtual memory subsystem. There is one global instance of
this context. Data, up to a maximum of elemsize bytes, is returned in the struct
pst_vminfo
pointed to by buf. The elemcount parameter must be 1. The index
parameter must be 0.
282 Hewlett-Packard Company − 9 − HP-UX 11i Version 2: December 2007 Update