4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 % * Version 2 rstat; for backwards compatibility only.
27 % * Copyright (c) 1985, 1990, 1991 by Sun Microsystems, Inc.
30 %/* from rstat_v2.x */
34 %#pragma ident "%Z%%M% %I% %E% SMI"
38 const RSTAT_V2_CPUSTATES = 4;
39 const RSTAT_V2_DK_NDRIVE = 4;
45 const RSTAT_V2_CPU_USER = 0;
46 const RSTAT_V2_CPU_NICE = 1;
47 const RSTAT_V2_CPU_SYS = 2;
48 const RSTAT_V2_CPU_IDLE = 3;
51 * GMT since 0:00, January 1, 1970
53 struct rstat_v2_timeval {
54 int tv_sec; /* seconds */
55 int tv_usec; /* and microseconds */
58 struct statsswtch { /* RSTATVERS_SWTCH */
59 int cp_time[RSTAT_V2_CPUSTATES];
60 int dk_xfer[RSTAT_V2_DK_NDRIVE];
61 int v_pgpgin; /* these are cumulative sum */
72 rstat_v2_timeval boottime;
77 * Does not have current time
79 version RSTATVERS_SWTCH {
81 RSTATPROC_STATS(void) = 1;
84 RSTATPROC_HAVEDISK(void) = 2;