HP-UX Reference (11i v1 05/09) - 2 System Calls (vol 5)
p
pstat(2) pstat(2)
instance requested, data, up to a maximum of
elemsize bytes, are 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_getprocvm()
Returns information specific to a particular process’ address space. There is one instance of
this context for each process region contained in the process’ address space. For each
instance requested, data, up to a maximum of
elemsize bytes, are returned in the
struct pst_vm_status
pointed to by buf. Only at most one instance (process
region) is returned for each call to
pstat_getprocvm(). The
elemcount parameter
identifies the process for which address space information is to be returned. An
elem-
count
parameter of zero indicates that address space information for the currently exe-
cuting process should be returned. The index parameter specifies the starting index
(beginning with 0) within the context of process regions for the indicated process. For
example, an
index of 3 indicates the 4th process region within the indicated process’
address space. As a shortcut, information for a specific process (other than the currently
executing one) may be obtained by setting elemcount
to the PID of that process. More
information on VM regions mapped to files can be obtained with the
pstat_getfiledetails()
call.
pstat_getpset()
Returns information specific to a particular processor set. There is one instance of this con-
text for each processor set on the system. For each instance requested, data, up to a max-
imum of
elemsize bytes, are returned in the struct pst_pset pointed by buf. The
elemcount parameter specifies the number of structs pst_pset that are available
at buf to be filled in. The index parameter specifies the starting index within the con-
text of processor sets. As a shortcut, information for a single processor set may be obtained
by setting elemcount to zero and setting index to the pset id of that processor set.
pstat_getsem()
Returns information specific to a particular System V semaphore set. There is one instance
of this context for each System V semaphore set on the system. For each instance requested,
data, up to a maximum of elemsize bytes, are returned in the structs
pst_seminfo pointed to by buf. The elemcount parameter specifies the number of
structs pst_seminfo that are available at buf to be filled in. The index parameter
specifies the starting index within the context of
System V semaphore sets. As a shortcut,
information for a single semaphore set may be obtained by setting elemcount to zero and
setting index to the semid of that semaphore set.
pstat_getshm()
Returns information specific to a particular System V shared memory segment. There is one
instance of this context for each System V shared memory segment on the system. For each
instance requested, data, up to a maximum of elemsize bytes, are returned in the
structs pst_shminfo pointed to by buf. The elemcount parameter specifies the
number of structs pst_shminfo that are available at buf to be filled in. The
index
parameter specifies the starting index within the context of System V shared memory seg-
ments. As a shortcut, information for a single shared memory segment may be obtained by
setting elemcount to zero and setting index to the shmid of that shared memory seg-
ment.
pstat_getsocket()
Returns detailed information specific to a socket. For the specified socket, there is one
instance of this context. For each call, data up to a maximum of elemsize bytes are
returned in the struct pst_socket pointed to by buf. The fid parameter uniquely
identifies the socket. This fid is obtained from calls to pstat_getfile() or
pstat_getfile2(). 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 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
Section 2−−244 Hewlett-Packard Company − 7 − HP-UX 11i Version 1: September 2005