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]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
34 * Internal flags to denote data collection status
36 #define GOT_SET_KSTAT 0x01
37 #define GOT_IO_KSTAT 0x02
38 #define GOT_COMPLETE_SDBC (GOT_SET_KSTAT | GOT_IO_KSTAT)
40 #define SDBC_COMPLETE(x) (((x) & (GOT_COMPLETE_SDBC)) != \
43 #define SDBC_KBYTES 0x01
44 #define SDBC_INTAVG 0x02
48 typedef struct sdbcstat_s
55 struct sdbcstat_s
*next
;
58 typedef struct sdbcvals_t
73 uint32_t write_cancellations
;
76 uint32_t total_writes
;
79 extern kstat_t
*sdbc_global
;
82 int sdbc_discover(kstat_ctl_t
*);
83 int sdbc_update(kstat_ctl_t
*);
85 sdbcstat_t
*sdbc_getstat(char *);
86 int sdbc_getvalues(sdbcstat_t
*, sdbcvals_t
*, int);
92 #endif /* _SDBC_STATS_H */