4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
21 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22 /* All Rights Reserved */
26 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
27 * Use is subject to license terms.
33 #pragma ident "%Z%%M% %I% %E% SMI"
36 * sa.h contains struct sa and defines variables used in sadc.c and sar.c.
37 * RESTRICTION: the data types defined in this file must not be changed.
38 * sar writes these types to disk as binary data and to ensure version to
39 * version compatibility they must not be changed.
42 #include <sys/kstat.h>
48 typedef struct iodevinfo
{
49 struct iodevinfo
*next
;
55 #define KMEM_SMALL 0 /* small KMEM request index */
56 #define KMEM_LARGE 1 /* large KMEM request index */
57 #define KMEM_OSIZE 2 /* outsize KMEM request index */
58 #define KMEM_NCLASS 3 /* # of KMEM request classes */
60 typedef struct kmeminfo
{
61 ulong_t km_mem
[KMEM_NCLASS
]; /* amount of mem owned by KMEM */
62 ulong_t km_alloc
[KMEM_NCLASS
]; /* amount of mem allocated */
63 ulong_t km_fail
[KMEM_NCLASS
]; /* # of failed requests */
67 * structure sa defines the data structure of system activity data file
71 int valid
; /* non-zero for valid data */
72 time_t ts
; /* time stamp */
74 cpu_sysinfo_t csi
; /* per-CPU system information */
75 cpu_vminfo_t cvmi
; /* per-CPU vm information */
76 sysinfo_t si
; /* global system information */
77 vminfo_t vmi
; /* global vm information */
78 kmeminfo_t kmi
; /* kernel mem allocation info */
80 ulong_t szinode
; /* inode table size */
81 ulong_t szfile
; /* file table size */
82 ulong_t szproc
; /* proc table size */
83 ulong_t szlckr
; /* file record lock table size */
85 ulong_t mszinode
; /* max inode table size */
86 ulong_t mszfile
; /* max file table size */
87 ulong_t mszproc
; /* max proc table size */
88 ulong_t mszlckr
; /* max file rec lock table size */
90 ulong_t niodevs
; /* number of I/O devices */
92 /* An array of iodevinfo structs come next in the sadc files */
95 typedef struct cpu64_sysinfo
{
96 uint64_t cpu
[CPU_STATES
];
97 uint64_t wait
[W_STATES
];
138 uint64_t mutex_adenters
;
149 uint64_t win_suo_cnt
;
152 typedef struct cpu64_vminfo
{
173 uint64_t kernel_asflt
;
186 typedef struct sysinfo64
{