]> git.saurik.com Git - apple/system_cmds.git/blame - sar.tproj/sar.h
system_cmds-279.6.1.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 *
d904471c
A
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
12 * this file.
c3a08f59
A
13 *
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,
d904471c
A
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
20 * under the License."
c3a08f59
A
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24
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>
30
31#define MAXDRIVENAME 31 /* largest drive name we allow */
32
33
34struct drivestats_report
35{
36 char *next;
37 int present;
38 int avg_count;
39 int drivepath_id;
40 char name[MAXDRIVENAME+1];
41 u_int64_t blocksize;
42
43 u_int64_t cur_Reads;
44 u_int64_t prev_Reads;
45 u_int64_t avg_Reads;
46
47 u_int64_t cur_BytesRead;
48 u_int64_t prev_BytesRead;
49 u_int64_t avg_BytesRead;
50
51 u_int64_t cur_Writes;
52 u_int64_t prev_Writes;
53 u_int64_t avg_Writes;
54
55 u_int64_t cur_BytesWritten;
56 u_int64_t prev_BytesWritten;
57 u_int64_t avg_BytesWritten;
58
59 u_int64_t cur_LatentReadTime;
60 u_int64_t prev_LatentReadTime;
61 u_int64_t avg_LatentReadTime;
62
63 u_int64_t cur_LatentWriteTime;
64 u_int64_t prev_LatentWriteTime;
65 u_int64_t avg_LatentWriteTime;
66
67 u_int64_t cur_ReadErrors;
68 u_int64_t prev_ReadErrors;
69 u_int64_t avg_ReadErrors;
70
71 u_int64_t cur_WriteErrors;
72 u_int64_t prev_WriteErrors;
73 u_int64_t avg_WriteErrors;
74
75 u_int64_t cur_ReadRetries;
76 u_int64_t prev_ReadRetries;
77 u_int64_t avg_ReadRetries;
78
79 u_int64_t cur_WriteRetries;
80 u_int64_t prev_WriteRetries;
81 u_int64_t avg_WriteRetries;
82
83 u_int64_t cur_TotalReadTime;
84 u_int64_t prev_TotalReadTime;
85 u_int64_t avg_TotalReadTime;
86
87 u_int64_t cur_TotalWriteTime;
88 u_int64_t prev_TotalWriteTime;
89 u_int64_t avg_TotalWriteTime;
90};
91
92struct netstats_report
93{
94 int valid;
95 int present;
96 int avg_count;
97 unsigned long gen_counter;
98 char tname_unit[MAX_TNAME_UNIT_SIZE +1 ];
99
100 unsigned long long cur_ipackets;
101 unsigned long long prev_ipackets;
102 unsigned long long avg_ipackets;
103
104 unsigned long long cur_ierrors;
105 unsigned long long prev_ierrors;
106 unsigned long long avg_ierrors;
107
108 unsigned long long cur_opackets;
109 unsigned long long prev_opackets;
110 unsigned long long avg_opackets;
111
112 unsigned long long cur_oerrors;
113 unsigned long long prev_oerrors;
114 unsigned long long avg_oerrors;
115
116 unsigned long long cur_collisions;
117 unsigned long long prev_collisions;
118 unsigned long long avg_collisions;
119
120 unsigned long long cur_ibytes;
121 unsigned long long prev_ibytes;
122 unsigned long long avg_ibytes;
123
124 unsigned long long cur_obytes;
125 unsigned long long prev_obytes;
126 unsigned long long avg_obytes;
127
128 unsigned long long cur_imcasts;
129 unsigned long long prev_imcasts;
130 unsigned long long avg_imcasts;
131
132 unsigned long long cur_omcasts;
133 unsigned long long prev_omcasts;
134 unsigned long long avg_omcasts;
135
136 unsigned long long cur_drops;
137 unsigned long long prev_drops;
138 unsigned long long avg_drops;
139
140
141};