HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
p
pstat(2) pstat(2)
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_getsem()
Returns information specific to a particular System V semaphore set. There is one instance
of this context for each SystemV 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 particularSystem 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
pst_hi_nodeid and pst_lo_nodeid. The members
pst_boundaddr and
pst_remaddr contain data of the form struct sockaddr, sockaddr_un,
sockaddr_in, sockaddr_in6
, etc. depending on the socket family.
pstat_getstable()
Returns information contained in the systems stable storage area. There is one global
instance of this context. Data, up to a maximum of elemsize bytes, are returned in the
struct pst_stable pointed to by buf. The elemcount parameter must be 1. The
index parameter must be 0.
pstat_getstatic()
Returns static information about the system. This data does not vary while the system is
running. There is one global instance of this context. Data, up to a maximum of elem-
size
bytes, are returned in the struct pst_static pointed to by buf. The
Section 2224 7 HP-UX Release 11i: December 2000
___
___