summaryrefslogtreecommitdiff
path: root/sysutils/xperfmon/files/patch-ab
blob: a3d29f3b6d85ecfe8ffadb4224cc5554c8370016 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
*** ../xperfmon++/StripCharP.h	Wed Jul 27 22:29:30 1994
--- ./StripCharP.h	Thu Apr 30 15:03:13 1998
***************
*** 62,71 ****
  #define HIGHLIGHT  1 << 1
  #define ALL_GCS (FOREGROUND | HIGHLIGHT)
  
  /* New fields for the PerfChart widget instance record */
  
  typedef struct {
!     double valuedata[2048];	/* record of data points */
      Pixel	fgpixel;	/* color index for graph */
      Pixel	hipixel;	/* color index for lines */
      Pixel       warnColor;
--- 62,73 ----
  #define HIGHLIGHT  1 << 1
  #define ALL_GCS (FOREGROUND | HIGHLIGHT)
  
+ #define NUM_VALUES 2048
+ 
  /* New fields for the PerfChart widget instance record */
  
  typedef struct {
!     double valuedata[NUM_VALUES]; /* record of data points */
      Pixel	fgpixel;	/* color index for graph */
      Pixel	hipixel;	/* color index for lines */
      Pixel       warnColor;
*** ../xperfmon++/TimeChart.h	Wed Jul 27 22:29:31 1994
--- ./TimeChart.h	Thu Apr 30 15:03:14 1998
***************
*** 88,99 ****
  #define XtCFillRect "FillRect"
  
  #define XtNgetValue "getValue"
! #define XtNhighlight "highlight"
  #define XtNjumpScroll "jumpScroll"
  #define XtNminScale "minScale"
  #define XtNscale "scale"
  #define XtNfillRect "fillRect"
! #define XtNupdate "update"
  #define XtNvmunix "vmunix"
   
  typedef struct _TimeChartRec *TimeChartWidget;
--- 88,99 ----
  #define XtCFillRect "FillRect"
  
  #define XtNgetValue "getValue"
! /* #define XtNhighlight "highlight" */
  #define XtNjumpScroll "jumpScroll"
  #define XtNminScale "minScale"
  #define XtNscale "scale"
  #define XtNfillRect "fillRect"
! /* #define XtNupdate "update" */
  #define XtNvmunix "vmunix"
   
  typedef struct _TimeChartRec *TimeChartWidget;
*** ../xperfmon++/system.h	Wed Jul 27 22:29:34 1994
--- ./system.h	Thu Apr 30 22:41:43 1998
***************
*** 20,26 ****
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL PCS
   * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
!  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   *
   * Original Author:  Emanuel Jay Berkenbilt, MIT Project Athena
--- 20,26 ----
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL PCS
   * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
!  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   *
   * Original Author:  Emanuel Jay Berkenbilt, MIT Project Athena
***************
*** 32,38 ****
   * documentation for any purpose and without fee is hereby granted, provided that
   * the above copyright notice appear in all copies and that both that
   * copyright notice and this permission notice appear in supporting
!  * documentation, and that the name of NASA and Sterling Software (collectively 
   * or individually) are not be used in advertising or
   * publicity pertaining to distribution of the software without specific,
   * written prior permission.  NASA and Sterling Software makes no representations about the
--- 32,38 ----
   * documentation for any purpose and without fee is hereby granted, provided that
   * the above copyright notice appear in all copies and that both that
   * copyright notice and this permission notice appear in supporting
!  * documentation, and that the name of NASA and Sterling Software (collectively
   * or individually) are not be used in advertising or
   * publicity pertaining to distribution of the software without specific,
   * written prior permission.  NASA and Sterling Software makes no representations about the
***************
*** 43,49 ****
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NASA & STERLING SOFTWARE
   * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
!  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   *
   * 1994 Revision
--- 43,49 ----
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NASA & STERLING SOFTWARE
   * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
!  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   *
   * 1994 Revision
***************
*** 55,61 ****
  
  /* This file information needed by both system.c and Perfmon.c */
  
! #define NUM_POSSIBLE_STATS     11
  #define MAX_STATS NUM_POSSIBLE_STATS + 1
  
  #define LINES_PER_LABEL 2
--- 55,65 ----
  
  /* This file information needed by both system.c and Perfmon.c */
  
! #if __FreeBSD_version >= 220000
! # define NUM_POSSIBLE_STATS     14
! #else
! # define NUM_POSSIBLE_STATS     11
! #endif
  #define MAX_STATS NUM_POSSIBLE_STATS + 1
  
  #define LINES_PER_LABEL 2
***************
*** 77,93 ****
      for (stat = 0; stat < num_stats; stat++)
  
  #define	NO_STAT			-1
! #define USER_CPU_PERCENTAGE	0
! #define SYSTEM_CPU_PERCENTAGE	1
! #define IDLE_CPU_PERCENTAGE	2
! #define FREE_MEM		3
! #define DISK_TRANSFERS		4
! #define INTERRUPTS		5
! #define INPUT_PACKETS		6
! #define OUTPUT_PACKETS		7
! #define COLLISION_PACKETS	8
  #define NFS_CLIENT_CALLS        9
  #define NFS_SERVER_CALLS       10
  
  struct statistic {
      int min_val, max_val;
--- 81,114 ----
      for (stat = 0; stat < num_stats; stat++)
  
  #define	NO_STAT			-1
! #if __FreeBSD_version >= 220000
! #define LOAD                    0
! #define USER_CPU_PERCENTAGE	1
! #define NICE_CPU_PERCENTAGE     2
! #define SYSTEM_CPU_PERCENTAGE	3
! #define INTER_CPU_PERCENTAGE    4
! #define IDLE_CPU_PERCENTAGE	5
! #define FREE_MEM		6
! #define DISK_TRANSFERS		7
! #define INTERRUPTS		8
! #define INPUT_PACKETS		9
! #define OUTPUT_PACKETS	       10
! #define COLLISION_PACKETS      11
! #define NFS_CLIENT_CALLS       12
! #define NFS_SERVER_CALLS       13
! #else
! #define USER_CPU_PERCENTAGE     0
! #define SYSTEM_CPU_PERCENTAGE   1
! #define IDLE_CPU_PERCENTAGE     2
! #define FREE_MEM                3
! #define DISK_TRANSFERS          4
! #define INTERRUPTS              5
! #define INPUT_PACKETS           6
! #define OUTPUT_PACKETS          7
! #define COLLISION_PACKETS       8
  #define NFS_CLIENT_CALLS        9
  #define NFS_SERVER_CALLS       10
+ #endif
  
  struct statistic {
      int min_val, max_val;
***************
*** 113,118 ****
--- 134,155 ----
  
  #define VALID_UPDATE(x) ((x <= MAX_TIME) && (x > 0))
  
+ #if __FreeBSD_version >= 220000
+ #define SYS_LOAD 0
+ #define USR_CPU  1
+ #define NICE_CPU 2
+ #define SYS_CPU  3
+ #define INT_CPU  4
+ #define IDL_CPU  5
+ #define FRE_MEM  6
+ #define DSK_XFR  7
+ #define INTRPTS  8
+ #define INP_PKT  9
+ #define OUT_PKT 10
+ #define COL_PKT 11
+ #define NFS_CLT 12
+ #define NFS_SRV 13
+ #else
  #define USR_CPU 0
  #define SYS_CPU 1
  #define IDL_CPU 2
***************
*** 124,129 ****
--- 161,167 ----
  #define COL_PKT 8
  #define NFS_CLT 9
  #define NFS_SRV 10
+ #endif
  #define LAST_ITEM NFS_SRV	/* must equal last item above */
  #define NUM_GRAPHS LAST_ITEM+1
  
***************
*** 146,168 ****
--- 184,238 ----
  }AppData, *AppDataPtr;
  
  static char *topNames[] = {
+ #if __FreeBSD_version >= 220000
+     "Load",
+ #endif
      "User",
+ #if __FreeBSD_version >= 220000
+     "Nice",
+ #endif
      "System",
+ #if __FreeBSD_version >= 220000
+     "Interrpt",
+ #endif
      "Idle",
      "Free",
      "Disk",
+ #if __FreeBSD_version >= 220000
+     "Inter-",
+ #else
      "Interrupts",
+ #endif
      "Input",
      "Output",
+ #if __FreeBSD_version >= 220000
+     "Collis",
+     "NFS Clt",
+     "NFS Srv",
+ #else
      "Collision",
      "NFS Client",
      "NFS Server",
+ #endif
  };
  static char *widgetLabels[] = {
+ #if __FreeBSD_version >= 220000
+     "Load",
+ #endif
      "User",
+ #if __FreeBSD_version >= 220000
+     "Nice",
+ #endif
      "System",
+ #if __FreeBSD_version >= 220000
+     "Inter",
+ #endif
      "Idle",
+ #if __FreeBSD_version >= 220000
+     "Swap",
+ #else
      "Free",
+ #endif
      "Disk",
      "Intrpts",
      "Input",
***************
*** 171,177 ****
--- 241,264 ----
      "NFSClient",
      "NFSServer",
  };
+ 
  static char *botNames[] = {
+ #if __FreeBSD_version >= 220000
+     "(* 100)",
+     "CPU (%)",
+     "CPU (%)",
+     "CPU (%)",
+     "CPU (%)",
+     "CPU (%)",
+     "Swap (%)",
+     "Trsf/s",
+     "rupts/s",
+     "Pkts/s",
+     "Pkts/s",
+     "Pkts/s",
+     "Calls/s",
+     "Calls/s",
+ #else
      "CPU",
      "CPU",
      "CPU",
***************
*** 183,186 ****
--- 270,274 ----
      "Packets",
      "Calls",
      "Calls",
+ #endif
  };