pstat.2 (2010 09)

p
pstat(2) pstat(2)
Synopsis
#include <sys/pstat.h>
int pstat_getstatic(
struct pst_static *buf,
size_t elemsize ,
size_t elemcount ,
int index
);
Description
pstat_getstatic()
returns information about the system. Although this data usually does not
change frequently, it may change while the system is running due to manually or automatically generated
administrative changes in the associated kernel tunables, online addition/deletion of resources, or other
events. There is one global instance of this context. Up to a maximum of elemsize bytes of data is
returned in the
pst_static structure pointed to by buf. The elemcount parameter must be
1. The
index parameter must be
0.
PSTAT FUNCTION
Name
pstat_getstream()
- get detailed information for a stream
Synopsis
#include <sys/pstat.h>
int pstat_getstream(
struct pst_stream *buf,
size_t elemsize ,
size_t elemcount ,
int moduleskip ,
struct pst_fid *fid
);
Description
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, up to a
maximum of elemsize bytes of data is returned in the
pst_stream structures pointed to by buf. The
elemcount parameter specifies the number of
pst_stream structures that are available at buf to be
filled in. The moduleskip parameter indicates the number of modules to skip before returning informa-
tion 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 Transport
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 indicate that the Transport details are available
for the open file descriptor. The fid parameter uniquely identifies the file. This ID is obtained from calls
to
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.
The use of this function is limited to UID 0 or an effective UID match. See
pstat_getfiledetails() for the definition of 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,ordriver 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 FUNCTION
Name
pstat_getswap() - get information for a swap area
14 Hewlett-Packard Company 14 HP-UX 11i Version 3: September 2010