2 * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
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
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.
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>
27 #define MAXDRIVENAME 31 /* largest drive name we allow */
30 struct drivestats_report
36 char name
[MAXDRIVENAME
+1];
43 u_int64_t cur_BytesRead
;
44 u_int64_t prev_BytesRead
;
45 u_int64_t avg_BytesRead
;
48 u_int64_t prev_Writes
;
51 u_int64_t cur_BytesWritten
;
52 u_int64_t prev_BytesWritten
;
53 u_int64_t avg_BytesWritten
;
55 u_int64_t cur_LatentReadTime
;
56 u_int64_t prev_LatentReadTime
;
57 u_int64_t avg_LatentReadTime
;
59 u_int64_t cur_LatentWriteTime
;
60 u_int64_t prev_LatentWriteTime
;
61 u_int64_t avg_LatentWriteTime
;
63 u_int64_t cur_ReadErrors
;
64 u_int64_t prev_ReadErrors
;
65 u_int64_t avg_ReadErrors
;
67 u_int64_t cur_WriteErrors
;
68 u_int64_t prev_WriteErrors
;
69 u_int64_t avg_WriteErrors
;
71 u_int64_t cur_ReadRetries
;
72 u_int64_t prev_ReadRetries
;
73 u_int64_t avg_ReadRetries
;
75 u_int64_t cur_WriteRetries
;
76 u_int64_t prev_WriteRetries
;
77 u_int64_t avg_WriteRetries
;
79 u_int64_t cur_TotalReadTime
;
80 u_int64_t prev_TotalReadTime
;
81 u_int64_t avg_TotalReadTime
;
83 u_int64_t cur_TotalWriteTime
;
84 u_int64_t prev_TotalWriteTime
;
85 u_int64_t avg_TotalWriteTime
;
88 struct netstats_report
93 unsigned long gen_counter
;
94 char tname_unit
[MAX_TNAME_UNIT_SIZE
+1 ];
96 unsigned long long cur_ipackets
;
97 unsigned long long prev_ipackets
;
98 unsigned long long avg_ipackets
;
100 unsigned long long cur_ierrors
;
101 unsigned long long prev_ierrors
;
102 unsigned long long avg_ierrors
;
104 unsigned long long cur_opackets
;
105 unsigned long long prev_opackets
;
106 unsigned long long avg_opackets
;
108 unsigned long long cur_oerrors
;
109 unsigned long long prev_oerrors
;
110 unsigned long long avg_oerrors
;
112 unsigned long long cur_collisions
;
113 unsigned long long prev_collisions
;
114 unsigned long long avg_collisions
;
116 unsigned long long cur_ibytes
;
117 unsigned long long prev_ibytes
;
118 unsigned long long avg_ibytes
;
120 unsigned long long cur_obytes
;
121 unsigned long long prev_obytes
;
122 unsigned long long avg_obytes
;
124 unsigned long long cur_imcasts
;
125 unsigned long long prev_imcasts
;
126 unsigned long long avg_imcasts
;
128 unsigned long long cur_omcasts
;
129 unsigned long long prev_omcasts
;
130 unsigned long long avg_omcasts
;
132 unsigned long long cur_drops
;
133 unsigned long long prev_drops
;
134 unsigned long long avg_drops
;