2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 #include <CoreFoundation/CoreFoundation.h>
26 #include <IOKit/IOKitLib.h>
27 #include <IOKit/storage/IOBlockStorageDriver.h>
28 #include <IOKit/storage/IOMedia.h>
29 #include <IOKit/IOBSD.h>
31 #define MAXDRIVENAME 31 /* largest drive name we allow */
34 struct drivestats_report
40 char name
[MAXDRIVENAME
+1];
47 u_int64_t cur_BytesRead
;
48 u_int64_t prev_BytesRead
;
49 u_int64_t avg_BytesRead
;
52 u_int64_t prev_Writes
;
55 u_int64_t cur_BytesWritten
;
56 u_int64_t prev_BytesWritten
;
57 u_int64_t avg_BytesWritten
;
59 u_int64_t cur_LatentReadTime
;
60 u_int64_t prev_LatentReadTime
;
61 u_int64_t avg_LatentReadTime
;
63 u_int64_t cur_LatentWriteTime
;
64 u_int64_t prev_LatentWriteTime
;
65 u_int64_t avg_LatentWriteTime
;
67 u_int64_t cur_ReadErrors
;
68 u_int64_t prev_ReadErrors
;
69 u_int64_t avg_ReadErrors
;
71 u_int64_t cur_WriteErrors
;
72 u_int64_t prev_WriteErrors
;
73 u_int64_t avg_WriteErrors
;
75 u_int64_t cur_ReadRetries
;
76 u_int64_t prev_ReadRetries
;
77 u_int64_t avg_ReadRetries
;
79 u_int64_t cur_WriteRetries
;
80 u_int64_t prev_WriteRetries
;
81 u_int64_t avg_WriteRetries
;
83 u_int64_t cur_TotalReadTime
;
84 u_int64_t prev_TotalReadTime
;
85 u_int64_t avg_TotalReadTime
;
87 u_int64_t cur_TotalWriteTime
;
88 u_int64_t prev_TotalWriteTime
;
89 u_int64_t avg_TotalWriteTime
;
92 struct netstats_report
97 unsigned long gen_counter
;
98 char tname_unit
[MAX_TNAME_UNIT_SIZE
+1 ];
100 unsigned long long cur_ipackets
;
101 unsigned long long prev_ipackets
;
102 unsigned long long avg_ipackets
;
104 unsigned long long cur_ierrors
;
105 unsigned long long prev_ierrors
;
106 unsigned long long avg_ierrors
;
108 unsigned long long cur_opackets
;
109 unsigned long long prev_opackets
;
110 unsigned long long avg_opackets
;
112 unsigned long long cur_oerrors
;
113 unsigned long long prev_oerrors
;
114 unsigned long long avg_oerrors
;
116 unsigned long long cur_collisions
;
117 unsigned long long prev_collisions
;
118 unsigned long long avg_collisions
;
120 unsigned long long cur_ibytes
;
121 unsigned long long prev_ibytes
;
122 unsigned long long avg_ibytes
;
124 unsigned long long cur_obytes
;
125 unsigned long long prev_obytes
;
126 unsigned long long avg_obytes
;
128 unsigned long long cur_imcasts
;
129 unsigned long long prev_imcasts
;
130 unsigned long long avg_imcasts
;
132 unsigned long long cur_omcasts
;
133 unsigned long long prev_omcasts
;
134 unsigned long long avg_omcasts
;
136 unsigned long long cur_drops
;
137 unsigned long long prev_drops
;
138 unsigned long long avg_drops
;