1 RSTAT(3RPC) RPC Library Functions RSTAT(3RPC) 2 3 4 5 NAME 6 rstat, havedisk - get performance data from remote kernel 7 8 SYNOPSIS 9 cc [ flag ... ] file ... -lrpcsvc [ library ... ] 10 #include <rpc/rpc.h> 11 #include <rpcsvc/rstat.h> 12 13 enum clnt_stat rstat(char *host, struct statstime *statp); 14 15 16 int havedisk(char *host); 17 18 19 PROTOCOL 20 /usr/include/rpcsvc/rstat.x 21 22 DESCRIPTION 23 These routines require that the rpc.rstatd(1M) daemon be configured and 24 available on the remote system indicated by host. The rstat() protocol 25 is used to gather statistics from remote kernel. Statistics will be 26 available on items such as paging, swapping, and cpu utilization. 27 28 29 rstat() fills in the statstime structure statp for host. statp must 30 point to an allocated statstime structure. rstat() returns RPC_SUCCESS 31 if it was successful; otherwise a enum clnt_stat is returned which can 32 be displayed using clnt_perrno(3NSL). 33 34 35 havedisk() returns 1 if host has disk, 0 if it does not, and -1 if this 36 cannot be determined. 37 38 39 The following XDR routines are available in librpcsvc: 40 41 xdr_statstime 42 xdr_statsvar 43 44 45 46 ATTRIBUTES 47 See attributes(5) for descriptions of the following attributes: 48 49 50 51 52 +---------------+-----------------+ 53 |ATTRIBUTE TYPE | ATTRIBUTE VALUE | 54 +---------------+-----------------+ 55 |MT-Level | MT-Safe | 56 +---------------+-----------------+ 57 58 SEE ALSO 59 rpc_clnt_calls(3NSL), attributes(5) 60 61 62 63 December 30, 1996 RSTAT(3RPC)