xref: /titanic_50/usr/src/cmd/avs/dsstat/report.h (revision 23a1ccea6aac035f084a7a4cdc968687d1b02daf)
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef _REPORT_H
27 #define	_REPORT_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 /* Prototypes */
34 uint64_t hrtime_delta(hrtime_t, hrtime_t);
35 uint32_t u32_delta(uint32_t, uint32_t);
36 uint64_t u64_delta(uint64_t, uint64_t);
37 void io_report(kstat_t *, kstat_t *, sdbcstat_t *);
38 int io_value_check(kstat_io_t *, kstat_io_t *);
39 void cd_report(sdbcstat_t *);
40 void header();
41 
42 /* BEGIN CSTYLED */
43 /* END CSTYLED */
44 
45 #define	VOL_HDR_FMT	"%-16s"
46 #define	VOL_HDR_SIZE	17
47 #define	SET_HDR_TXT	"name"
48 
49 #define	STAT_HDR_FMT	"%3s"
50 #define	STAT_HDR_SIZE	3
51 #define	STAT_HDR_TXT	"s"
52 #define	TYPE_HDR_TXT	"t"
53 
54 #define	ROLE_HDR_FMT	"%5s"
55 #define	ROLE_HDR_SIZE	5
56 #define	ROLE_INF_FMT	" %4s"
57 #define	ROLE_HDR_TXT	"role"
58 
59 #define	PCT_HDR_FMT	"%7s"
60 #define	PCT_HDR_SIZE	7
61 #define	PCT_INF_FMT	" %6.2f"
62 #define	SN_HDR_TXT	"sn"
63 #define	PCT_HDR_TXT	"pct"
64 
65 #define	KPS_HDR_FMT	"%7s"
66 #define	KPS_HDR_SIZE	7
67 #define	KPS_INF_FMT	" %6.0f"
68 #define	KPS_HDR_TXT	"kps"
69 #define	RKPS_HDR_TXT	"rkps"
70 #define	WKPS_HDR_TXT	"wkps"
71 #define	CKPS_HDR_TXT	"ckps"
72 #define	DKPS_HDR_TXT	"dkps"
73 #define	CRKPS_HDR_TXT	"crkps"
74 #define	CWKPS_HDR_TXT	"cwkps"
75 #define	DRKPS_HDR_TXT	"drkps"
76 #define	DWKPS_HDR_TXT	"dwkps"
77 
78 #define	TPS_HDR_FMT	"%6s"
79 #define	TPS_HDR_SIZE	6
80 #define	TPS_INF_FMT	" %5u"
81 #define	TPS_HDR_TXT	"tps"
82 #define	RTPS_HDR_TXT	"rtps"
83 #define	WTPS_HDR_TXT	"wtps"
84 
85 #define	SVT_HDR_FMT	"%5s"
86 #define	SVT_HDR_SIZE	5
87 #define	SVT_INF_FMT	" %4.0f"
88 #define	SVT_HDR_TXT	"svt"
89 
90 #define	HIT_HDR_FMT	"%6s"
91 #define	HIT_HDR_SIZE	6
92 #define	HIT_INF_FMT	" %5.1f"
93 #define	HIT_PAD_FMT	" %5s"
94 #define	HIT_HDR_TXT	"hit"
95 #define	RHIT_HDR_TXT	"rhit"
96 #define	WHIT_HDR_TXT	"whit"
97 
98 #define	QUEUE_HDR_TXT		"q"
99 #define	QUEUE_ITEMS_TXT		"qi"
100 #define	QUEUE_KBYTES_TXT	"qk"
101 #define	QUEUE_ITEMS_HW_TXT	"qhwi"
102 #define	QUEUE_KBYTES_HW_TXT	"qhwk"
103 
104 #define	NO_INFO		"-"
105 
106 #define	DATA_C16	"%-16s"
107 #define	DATA_C2		" %2s"
108 #define	DATA_C4		" %4s"
109 #define	DATA_C5		" %5s"
110 #define	DATA_C6		" %6s"
111 #define	DATA_I32	" %6u"
112 #define	DATA_I64	" %6llu"
113 #define	DATA_F62	" %6.2f"
114 #define	DATA_F60	" %6.0f"
115 #define	DATA_F50	" %5.0f"
116 #define	DATA_F40	" %4.0f"
117 
118 #ifdef	__cplusplus
119 }
120 #endif
121 
122 #endif /* _REPORT_H */
123