119 lines
2.8 KiB
C
119 lines
2.8 KiB
C
#ifndef __RPCSVC_RSTAT_H__
|
|
#define __RPCSVC_RSTAT_H__
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#ident "$Revision: 1.7 $"
|
|
/*
|
|
*
|
|
* Copyright 1992, Silicon Graphics, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
|
|
* the contents of this file may not be disclosed to third parties, copied or
|
|
* duplicated in any form, in whole or in part, without the prior written
|
|
* permission of Silicon Graphics, Inc.
|
|
*
|
|
* RESTRICTED RIGHTS LEGEND:
|
|
* Use, duplication or disclosure by the Government is subject to restrictions
|
|
* as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
|
* and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
|
* successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
|
* rights reserved under the Copyright Laws of the United States.
|
|
*/
|
|
/* @(#)rstat.h 1.2 88/05/08 4.0NFSSRC SMI */
|
|
|
|
/*
|
|
* Copyright (c) 1988 by Sun Microsystems, Inc.
|
|
* @(#) from SUN 1.9
|
|
*/
|
|
#include <rpc/types.h>
|
|
#include <rpc/xdr.h>
|
|
|
|
#ifndef CPUSTATES
|
|
#define CPUSTATES 4
|
|
|
|
#define CP_USER 0
|
|
#define CP_NICE 1
|
|
#define CP_SYS 2
|
|
#define CP_IDLE 3
|
|
|
|
#define DK_NDRIVE 4
|
|
#endif
|
|
|
|
#ifndef DST_NONE
|
|
#include <sys/time.h>
|
|
#endif
|
|
|
|
#define RSTATPROG 100001
|
|
#define RSTATVERS_ORIG 1
|
|
#define RSTATVERS_SWTCH 2
|
|
#define RSTATVERS_TIME 3
|
|
#define RSTATVERS 3
|
|
#define RSTATPROC_STATS 1
|
|
#define RSTATPROC_HAVEDISK 2
|
|
|
|
struct stats { /* version 1 */
|
|
int cp_time[CPUSTATES];
|
|
int dk_xfer[DK_NDRIVE];
|
|
unsigned v_pgpgin; /* these are cumulative sum */
|
|
unsigned v_pgpgout;
|
|
unsigned v_pswpin;
|
|
unsigned v_pswpout;
|
|
unsigned v_intr;
|
|
int if_ipackets;
|
|
int if_ierrors;
|
|
int if_opackets;
|
|
int if_oerrors;
|
|
int if_collisions;
|
|
};
|
|
|
|
struct statsswtch { /* version 2 */
|
|
int cp_time[CPUSTATES];
|
|
int dk_xfer[DK_NDRIVE];
|
|
unsigned v_pgpgin; /* these are cumulative sum */
|
|
unsigned v_pgpgout;
|
|
unsigned v_pswpin;
|
|
unsigned v_pswpout;
|
|
unsigned v_intr;
|
|
int if_ipackets;
|
|
int if_ierrors;
|
|
int if_opackets;
|
|
int if_oerrors;
|
|
int if_collisions;
|
|
unsigned v_swtch;
|
|
long avenrun[3];
|
|
struct timeval boottime;
|
|
};
|
|
struct statstime { /* version 3 */
|
|
int cp_time[CPUSTATES];
|
|
int dk_xfer[DK_NDRIVE];
|
|
unsigned v_pgpgin; /* these are cumulative sum */
|
|
unsigned v_pgpgout;
|
|
unsigned v_pswpin;
|
|
unsigned v_pswpout;
|
|
unsigned v_intr;
|
|
int if_ipackets;
|
|
int if_ierrors;
|
|
int if_opackets;
|
|
int if_oerrors;
|
|
int if_collisions;
|
|
unsigned v_swtch;
|
|
long avenrun[3];
|
|
struct timeval boottime;
|
|
struct timeval curtime;
|
|
};
|
|
|
|
extern bool_t xdr_stats(XDR *, struct stats *);
|
|
extern bool_t xdr_statsswtch(XDR *, struct statsswtch *);
|
|
extern bool_t xdr_statstime(XDR *, struct statstime *);
|
|
extern bool_t xdr_timeval(XDR *, struct timeval *);
|
|
|
|
extern int rstat(const char *, struct statstime *);
|
|
extern int havedisk(const char *);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* !__RPCSVC_RSTAT_H__ */
|