HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)
p
pstat(2) pstat(2)
);
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 parame-
ter 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 max-
imum of elemsize bytes of data is returned in the
pst_stream structures pointed to by buf. The elem-
count 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 information about any
modules. Head information is returned for every call. 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
Synopsis
#include <sys/pstat.h>
int pstat_getswap(
struct pst_swapinfo *
buf,
size_t
elemsize,
size_t
elemcount,
int
index
);
Description
pstat_getswap() returns information specific to a particular swap area. There is one instance of this
context for each swap area (block or file system) configured into the system. For each instance requested,
up to a maximum of elemsize bytes of data is returned in the pst_swapinfo structures pointed to by
buf. The elemcount parameter specifies the number of pst_swapinfo structures that are available at
304 Hewlett-Packard Company − 14 − HP-UX 11i Version 3: February 2007