pstat.2 (2010 09)
p
pstat(2) pstat(2)
for this pstat call.
For those pstat functions that return at most only one structure, such as
pstat_getdynamic()
,
an error return with [EOVERFLOW] set means that the only structure requested is the structure
that caused the error return with [EOVERFLOW].
Once the structure that caused the error return with [EOVERFLOW] has been determined, the particular
fields of that structure that do not contain valid data can be determined as follows. Please note that all
preceding structures were filled in by the kernel, and fields from those structures need not be checked in
this manner.
Such fields can be determined using the validity macros explicitly defined for the corresponding
pst_* data structure and the corresponding validity vector for that particular structure. These
validity macros correspond to one specific field within the given
pst_* data structure. If the bit-
wise AND of a particular validity macro with its corresponding validity vector evaluates to
0, the
field corresponding to that validity macro does not contain valid data. Otherwise, that field contains
valid data. The only candidate fields to have resulted in this condition are those fields with validity
macros explicitly defined in the corresponding
pst_* data structure. The other fields within that
particular structure need not be checked using this method.
See also the ERRORS section below.
ERRORS
If a pstat function fails,
errno is set to one of the following values. If an underlying function fails,
errno may be set to a value not specified here; see errno (2) for such errors.
[EACCES] The UID is not 0 (superuser) and the effective UID does not match for
pstat_getfiledetails()
, pstat_getsocket(), pstat_getstream()
,or
pstat_getpathname()
. See pstat_getfiledetails() for the definition of
effective UID match.
[EFAULT] buf or fid points to an invalid address.
[EINTR] For
pstat_getsocket()
the operation was terminated due to the receipt of a signal;
no data was transferred.
[EINVAL] For
pstat_getfile2()
, pstat_getlv(), pstat_getmsg(),
pstat_getproc(), pstat_getprocvm()
, pstat_getpset(),
pstat_getsem(),or
pstat_getshm(), elemcount was not 0, and index was less
than
0.
[EINVAL] elemsize is less than or equal to
0
or elemsize is larger than the size of the associated data
structure. For example, elemsize is greater than
sizeof(struct pst_processor)
for pstat_getprocessor()
.
[EINVAL] elemsize is less than or equal to
0
or elemsize is larger than the size of the associated data
structure. For example, elemsize is greater than
sizeof(struct pst_stream)
for
pstat_getstream().
[EINVAL] For
pstat_getcrashinfo(), pstat_getdynamic()
, pstat_getipc(),
pstat_getstable(), pstat_getstatic()
,orpstat_getvminfo(), elemcount
is not
1 or index is not 0.
[EINVAL] For
pstat_getcrashdev(), pstat_getdisk()
, pstat_getnode(),
pstat_getpmq(), pstat_getprocessor()
, pstat_getpsem(),or
pstat_getswap(), elemcount is not greater than or equal to 1 or index is not greater
than or equal to 0.
[EINVAL] For
pstat_getnode(), index is not a valid logical node ID.
[EINVAL] For
pstat_getpathname(), elemcount is less than or equal to 0.
[EINVAL]
pstat_getfiledetails() was called for a socket other than the AF_UNIX family,
or pstat_getpathname() was called for a socket.
[EINVAL]
pstat_getsocket() was called for a file that is not of type socket.
[EINVAL]
pstat_getcommandline() was called with pid less than 0 or elemcount not equal to
1.
16 Hewlett-Packard Company − 16 − HP-UX 11i Version 3: September 2010