HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
p
pstat(2) pstat(2)
Use of this function is limited to UID==0.
On success, the function returns the number of DNLC entries copied. In case of failure, the
value of -1 is returned and errno is set indicating the cause of the failure.
pstat_getmsg()
Returns information specific to a particular
System V message queue. There is one
instance of this context for each
System V
message queue on the system. For each
instance requested, data, up to a maximum of
elemsize bytes, is returned in the
structs pst_msginfo pointed to by buf. The
elemcount parameter specifies the
number of
structs pst_msginfo that are available at
buf to be filled in. The index
parameter specifies the starting index within the context of
System V message queues.
As a shortcut, information for a single message queue may be obtained by setting
elem-
count
to zero and setting index to the
msqid of that message queue.
pstat_getnode()
Returns information specific about a SCA system node. There is one instance of this context
for each SCA node on the system, for each instance requested, up to a maximum of
elem-
size
bytes, is returned in the struct pst_node
pointed to by buf. The elem-
count
parameter specifies the number of struct pst_node that are available at buf
to be filled in. The index parameter specifies the starting logical node id that is requested.
pstat_getpathname()
Returns the full pathname of an opened file in buf if it is available in the system cache of
recent names looked up (DNLC). The fid parameter uniquely identifies the opened file.
This fid is obtained from calls to pstat_getfile()
, pstat_getfile2(),
pstat_getproc(),or
pstat_getprocvm(). The value of elemcount should be
at least one greater than the length of the pathname to be returned. The
PATH_MAX vari-
able from pathconf(2) can be used for this purpose. 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.
On success, the function returns the length of the pathname copied starting at the location
specified by
buf. If the pathname is not available in the system cache, 0 is returned and
errno is not set. On other failures, the value of -1 is returned and errno is set indicat-
ing the cause of the failure. This call does not work for sockets.
pstat_getpmq()
Returns information specific to a particular POSIX message queue. There is one instance
of this context for each POSIX message queue on the system. For each instance requested,
data, up to a maximum of
elemsize bytes, is returned in the structs pst_pmqinfo
pointed to by buf. The elemcount parameter specifies the number of structs
pst_pmqinfo that are available at buf to be filled in. The index parameter specifies
the starting index within the context of POSIX message queues.
pstat_getproc()
Returns information specific to a particular process. There is one instance of this context
for each active process on the system. For each instance requested, data, up to a maximum
of elemsize bytes, is returned in the structs pst_status pointed to by buf. The
elemcount parameter specifies the number of structs pst_status that are avail-
able at buf to be filled in. The index parameter specifies the starting index within the
context of processes. As a shortcut, information for a single process may be obtained by
setting elemcount to zero and setting index to the PID of that process.
pstat_getprocessor()
Returns information specific to a particular processor (the only processor on a uniprocessor
system). There is one instance of this context for each processor on the system. For each
instance requested, data, up to a maximum of elemsize bytes, is returned in the
structs pst_processor pointed to by buf. The elemcount parameter specifies
the number of structs pst_processor that are available at buf to be filled in. The
index parameter specifies the starting index within the context of processors.
pstat_getproclocality()
Returns information specific to a particular process’s memory placement for each locality.
See the pstat_getproclocality(2) manpage.
280 Hewlett-Packard Company − 7 − HP-UX 11i Version 2: December 2007 Update