xref: /illumos-gate/usr/src/man/man3rpc/rstat.3rpc (revision 5d9d9091f564c198a760790b0bfa72c44e17912b)
te
Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
RSTAT 3RPC "Dec 30, 1996"
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(8) daemon be configured and available on the remote system indicated by host. The rstat() protocol is used to gather statistics from remote kernel. Statistics will be available on items such as paging, swapping, and cpu utilization.

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(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe
SEE ALSO

rup (1), rpc_clnt_calls (3NSL), attributes (7), rpc.rstatd (8)