1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/sysutils/xperfmon/files/patch-ab
Gary Jennejohn 4913bc44ef Update to version 2.0 and add support for libdevstat so that this works
with CAM.

I don't run NFS so I was unable to test whether xperfmon++ still shows
reasonable values for nfclient and nfsserver.

Obtained from: the update came from Lars Koeller, the libdevstat support
was added by me.
1998-09-30 19:32:44 +00:00

313 lines
8.9 KiB
Plaintext

*** ../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
};