]> git.saurik.com Git - apple/system_cmds.git/blob - sar.tproj/sar.h
system_cmds-433.8.tar.gz
[apple/system_cmds.git] / sar.tproj / sar.h
1 /*
2 * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
3 * Reserved.
4 *
5 * This file contains Original Code and/or Modifications of Original Code
6 * as defined in and that are subject to the Apple Public Source License
7 * Version 2.0 (the 'License'). You may not use this file except in
8 * compliance with the License. Please obtain a copy of the License at
9 * http://www.opensource.apple.com/apsl/ and read it before using this
10 * file.
11 *
12 * The Original Code and all software distributed under the License are
13 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
17 * Please see the License for the specific language governing rights and
18 * limitations under the License.
19 */
20
21 #include <CoreFoundation/CoreFoundation.h>
22 #include <IOKit/IOKitLib.h>
23 #include <IOKit/storage/IOBlockStorageDriver.h>
24 #include <IOKit/storage/IOMedia.h>
25 #include <IOKit/IOBSD.h>
26
27 #define MAXDRIVENAME 31 /* largest drive name we allow */
28
29
30 struct drivestats_report
31 {
32 char *next;
33 int present;
34 int avg_count;
35 int drivepath_id;
36 char name[MAXDRIVENAME+1];
37 u_int64_t blocksize;
38
39 u_int64_t cur_Reads;
40 u_int64_t prev_Reads;
41 u_int64_t avg_Reads;
42
43 u_int64_t cur_BytesRead;
44 u_int64_t prev_BytesRead;
45 u_int64_t avg_BytesRead;
46
47 u_int64_t cur_Writes;
48 u_int64_t prev_Writes;
49 u_int64_t avg_Writes;
50
51 u_int64_t cur_BytesWritten;
52 u_int64_t prev_BytesWritten;
53 u_int64_t avg_BytesWritten;
54
55 u_int64_t cur_LatentReadTime;
56 u_int64_t prev_LatentReadTime;
57 u_int64_t avg_LatentReadTime;
58
59 u_int64_t cur_LatentWriteTime;
60 u_int64_t prev_LatentWriteTime;
61 u_int64_t avg_LatentWriteTime;
62
63 u_int64_t cur_ReadErrors;
64 u_int64_t prev_ReadErrors;
65 u_int64_t avg_ReadErrors;
66
67 u_int64_t cur_WriteErrors;
68 u_int64_t prev_WriteErrors;
69 u_int64_t avg_WriteErrors;
70
71 u_int64_t cur_ReadRetries;
72 u_int64_t prev_ReadRetries;
73 u_int64_t avg_ReadRetries;
74
75 u_int64_t cur_WriteRetries;
76 u_int64_t prev_WriteRetries;
77 u_int64_t avg_WriteRetries;
78
79 u_int64_t cur_TotalReadTime;
80 u_int64_t prev_TotalReadTime;
81 u_int64_t avg_TotalReadTime;
82
83 u_int64_t cur_TotalWriteTime;
84 u_int64_t prev_TotalWriteTime;
85 u_int64_t avg_TotalWriteTime;
86 };
87
88 struct netstats_report
89 {
90 int valid;
91 int present;
92 int avg_count;
93 unsigned long gen_counter;
94 char tname_unit[MAX_TNAME_UNIT_SIZE +1 ];
95
96 unsigned long long cur_ipackets;
97 unsigned long long prev_ipackets;
98 unsigned long long avg_ipackets;
99
100 unsigned long long cur_ierrors;
101 unsigned long long prev_ierrors;
102 unsigned long long avg_ierrors;
103
104 unsigned long long cur_opackets;
105 unsigned long long prev_opackets;
106 unsigned long long avg_opackets;
107
108 unsigned long long cur_oerrors;
109 unsigned long long prev_oerrors;
110 unsigned long long avg_oerrors;
111
112 unsigned long long cur_collisions;
113 unsigned long long prev_collisions;
114 unsigned long long avg_collisions;
115
116 unsigned long long cur_ibytes;
117 unsigned long long prev_ibytes;
118 unsigned long long avg_ibytes;
119
120 unsigned long long cur_obytes;
121 unsigned long long prev_obytes;
122 unsigned long long avg_obytes;
123
124 unsigned long long cur_imcasts;
125 unsigned long long prev_imcasts;
126 unsigned long long avg_imcasts;
127
128 unsigned long long cur_omcasts;
129 unsigned long long prev_omcasts;
130 unsigned long long avg_omcasts;
131
132 unsigned long long cur_drops;
133 unsigned long long prev_drops;
134 unsigned long long avg_drops;
135
136
137 };