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