]> git.saurik.com Git - apple/system_cmds.git/blame - sar.tproj/sar.h
system_cmds-496.tar.gz
[apple/system_cmds.git] / sar.tproj / sar.h
CommitLineData
c3a08f59 1/*
83f6dbe8
A
2 * Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
3 * Reserved.
c3a08f59 4 *
83f6dbe8
A
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.
c3a08f59
A
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,
83f6dbe8
A
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*/
c3a08f59
A
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
30struct drivestats_report
31{
ef8ad44b
A
32 char *next;
33 int32_t present;
34 int32_t avg_count;
35 int32_t drivepath_id;
36 char name[MAXDRIVENAME+1];
37 uint64_t blocksize;
38
39 uint64_t cur_Reads;
40 uint64_t prev_Reads;
41 uint64_t avg_Reads;
42
43 uint64_t cur_BytesRead;
44 uint64_t prev_BytesRead;
45 uint64_t avg_BytesRead;
c3a08f59 46
ef8ad44b
A
47 uint64_t cur_Writes;
48 uint64_t prev_Writes;
49 uint64_t avg_Writes;
c3a08f59 50
ef8ad44b
A
51 uint64_t cur_BytesWritten;
52 uint64_t prev_BytesWritten;
53 uint64_t avg_BytesWritten;
c3a08f59 54
ef8ad44b
A
55 uint64_t cur_LatentReadTime;
56 uint64_t prev_LatentReadTime;
57 uint64_t avg_LatentReadTime;
c3a08f59 58
ef8ad44b
A
59 uint64_t cur_LatentWriteTime;
60 uint64_t prev_LatentWriteTime;
61 uint64_t avg_LatentWriteTime;
c3a08f59 62
ef8ad44b
A
63 uint64_t cur_ReadErrors;
64 uint64_t prev_ReadErrors;
65 uint64_t avg_ReadErrors;
c3a08f59 66
ef8ad44b
A
67 uint64_t cur_WriteErrors;
68 uint64_t prev_WriteErrors;
69 uint64_t avg_WriteErrors;
c3a08f59 70
ef8ad44b
A
71 uint64_t cur_ReadRetries;
72 uint64_t prev_ReadRetries;
73 uint64_t avg_ReadRetries;
c3a08f59 74
ef8ad44b
A
75 uint64_t cur_WriteRetries;
76 uint64_t prev_WriteRetries;
77 uint64_t avg_WriteRetries;
c3a08f59 78
ef8ad44b
A
79 uint64_t cur_TotalReadTime;
80 uint64_t prev_TotalReadTime;
81 uint64_t avg_TotalReadTime;
c3a08f59 82
ef8ad44b
A
83 uint64_t cur_TotalWriteTime;
84 uint64_t prev_TotalWriteTime;
85 uint64_t avg_TotalWriteTime;
c3a08f59
A
86};
87
88struct netstats_report
89{
ef8ad44b
A
90 int32_t valid;
91 int32_t present;
92 int32_t avg_count;
93 uint32_t gen_counter;
94 char tname_unit[MAX_TNAME_UNIT_SIZE +1 ];
c3a08f59 95
ef8ad44b
A
96 uint64_t cur_ipackets;
97 uint64_t prev_ipackets;
98 uint64_t avg_ipackets;
c3a08f59 99
ef8ad44b
A
100 uint64_t cur_ierrors;
101 uint64_t prev_ierrors;
102 uint64_t avg_ierrors;
c3a08f59 103
ef8ad44b
A
104 uint64_t cur_opackets;
105 uint64_t prev_opackets;
106 uint64_t avg_opackets;
c3a08f59 107
ef8ad44b
A
108 uint64_t cur_oerrors;
109 uint64_t prev_oerrors;
110 uint64_t avg_oerrors;
c3a08f59 111
ef8ad44b
A
112 uint64_t cur_collisions;
113 uint64_t prev_collisions;
114 uint64_t avg_collisions;
c3a08f59 115
ef8ad44b
A
116 uint64_t cur_ibytes;
117 uint64_t prev_ibytes;
118 uint64_t avg_ibytes;
c3a08f59 119
ef8ad44b
A
120 uint64_t cur_obytes;
121 uint64_t prev_obytes;
122 uint64_t avg_obytes;
c3a08f59 123
ef8ad44b
A
124 uint64_t cur_imcasts;
125 uint64_t prev_imcasts;
126 uint64_t avg_imcasts;
c3a08f59 127
ef8ad44b
A
128 uint64_t cur_omcasts;
129 uint64_t prev_omcasts;
130 uint64_t avg_omcasts;
c3a08f59 131
ef8ad44b
A
132 uint64_t cur_drops;
133 uint64_t prev_drops;
134 uint64_t avg_drops;
c3a08f59 135};