Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rstat(3rpc) [opensolaris man page]

rstat(3RPC)						       RPC Library Functions						       rstat(3RPC)

NAME
rstat, havedisk - get performance data from remote kernel SYNOPSIS
cc [ flag ... ] file ... -lrpcsvc [ library ... ] #include <rpc/rpc.h> #include <rpcsvc/rstat.h> enum clnt_stat rstat(char *host, struct statstime *statp); int havedisk(char *host); PROTOCOL
/usr/include/rpcsvc/rstat.x DESCRIPTION
These routines require that the rpc.rstatd(1M) daemon be configured and available on the remote system indicated by host. The rstat() pro- tocol is used to gather statistics from remote kernel. Statistics will be available on items such as paging, swapping, and cpu utiliza- tion. rstat() fills in the statstime structure statp for host. statp must point to an allocated statstime structure. rstat() returns RPC_SUCCESS if it was successful; otherwise a enum clnt_stat is returned which can be displayed using clnt_perrno(3NSL). havedisk() returns 1 if host has disk, 0 if it does not, and -1 if this cannot be determined. The following XDR routines are available in librpcsvc: xdr_statstime xdr_statsvar ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
rup(1), rpc.rstatd(1M), rpc_clnt_calls(3NSL), attributes(5) SunOS 5.11 30 Dec 1996 rstat(3RPC)

Check Out this Related Man Page

rstat(3N)																 rstat(3N)

NAME
rstat(), havedisk() - get performance data from remote kernel SYNOPSIS
DESCRIPTION
returns if host has a disk, if it does not, and -1 if this cannot be determined. The host string is either the official name of the host or an alias for it. See hosts(4) for more information regarding host names. fills in the statstime structure for host, and returns if it was successful. The relevant structures are: struct stats { /* RSTATVERS_ORIG */ int cp_time[4]; /* the time spent in each CPU state */ int dk_xfer[4]; /* total number of disk transfers on each of the disk interfaces */ unsigned v_pgpgin; /* total VM pages paged in */ unsigned v_pgpgout; /* total VM pages paged out */ unsigned v_pswpin; /* total VM pages paged swapped in */ unsigned v_pswpout; /* total VM pages paged swapped out */ unsigned v_intr; /* total interrupts */ int if_ipackets; /* inbound packets on all interfaces */ int if_ierrors; /* inbound errors on all interfaces */ int if_opackets; /* outbound packets on all interfaces */ int if_oerrors; /* outbound errors on all interfaces */ int if_collisions; /* collisions seen on all interfaces */ }; struct statsswtch { /* RSTATVERS_SWTCH */ int cp_time[4]; /* the time spent in each CPU state */ int dk_xfer[4]; /* total number of disk transfers on each of the disk interfaces */ unsigned v_pgpgin; /* total VM pages paged in */ unsigned v_pgpgout; /* total VM pages paged out */ unsigned v_pswpin; /* total VM pages paged swapped in */ unsigned v_pswpout; /* total VM pages paged swapped out */ unsigned v_intr; /* total interrupts */ int if_ipackets; /* inbound packets on all interfaces */ int if_ierrors; /* inbound errors on all interfaces */ int if_opackets; /* outbound packets on all interfaces */ int if_oerrors; /* outbound errors on all interfaces */ int if_collisions; /* collisions seen on all interfaces */ unsigned v_swtch; /* total context switches */ long avenrun[3]; /* average number of running jobs */ struct timeval boottime; /* time of last boot */ }; struct statstime { /* RSTATVERS_TIME */ int cp_time[4]; /* the time spent in each CPU state */ int dk_xfer[4]; /* total number of disk transfers on each of the disk interfaces */ unsigned v_pgpgin; /* total VM pages paged in */ unsigned v_pgpgout; /* total VM pages paged out */ unsigned v_pswpin; /* total VM pages paged swapped in */ unsigned v_pswpout; /* total VM pages paged swapped out */ unsigned v_intr; /* total interrupts */ int if_ipackets; /* inbound packets on all interfaces */ int if_ierrors; /* inbound errors on all interfaces */ int if_opackets; /* outbound packets on all interfaces */ int if_oerrors; /* outbound errors on all interfaces */ int if_collisions; /* collisions seen on all interfaces */ unsigned v_swtch; /* total context switches */ long avenrun[3]; /* average number of running jobs */ struct timeval boottime; /* time of last boot */ struct timeval curtime; /* current system time */ }; RPC Info Program number: XDR routines: int xdr_stats(xdrs, stat) XDR *xdrs; struct stats *stat; int xdr_statsswtch(xdrs, stat) XDR *xdrs; struct statsswtch *stat; int xdr_statstime(xdrs, stat) XDR *xdrs; struct statstime *stat; int xdr_timeval(xdrs, tv) XDR *xdrs; struct timeval *tv; Procs: Takes no arguments, returns long which is true if remote host has a disk. Takes no arguments, return struct statsxxx, depending on version. Versions: WARNINGS
User applications that call this routine must be linked with For example, AUTHOR
was developed by Sun Microsystems, Inc. SEE ALSO
rup(1), rstatd(1M). rstat(3N)
Man Page