diff options
author | gj <gj@FreeBSD.org> | 1998-10-01 03:32:44 +0800 |
---|---|---|
committer | gj <gj@FreeBSD.org> | 1998-10-01 03:32:44 +0800 |
commit | e5076b3059d30654e727d1fcc77f8544c311d79d (patch) | |
tree | cb323fda5536564b065bb22c41f24d782a80ab6a /sysutils/xperfmon | |
parent | 08362b5028b7134500ac64d5ef85ed34adeeb2cc (diff) | |
download | freebsd-ports-gnome-e5076b3059d30654e727d1fcc77f8544c311d79d.tar.gz freebsd-ports-gnome-e5076b3059d30654e727d1fcc77f8544c311d79d.tar.zst freebsd-ports-gnome-e5076b3059d30654e727d1fcc77f8544c311d79d.zip |
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.
Diffstat (limited to 'sysutils/xperfmon')
-rw-r--r-- | sysutils/xperfmon/Makefile | 19 | ||||
-rw-r--r-- | sysutils/xperfmon/files/freebsd_system.c | 248 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-aa | 540 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-ab | 755 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-ac | 336 | ||||
-rw-r--r-- | sysutils/xperfmon/pkg-descr | 40 |
6 files changed, 1208 insertions, 730 deletions
diff --git a/sysutils/xperfmon/Makefile b/sysutils/xperfmon/Makefile index 72246ca6575d..eb078185d646 100644 --- a/sysutils/xperfmon/Makefile +++ b/sysutils/xperfmon/Makefile @@ -1,19 +1,30 @@ # New ports collection makefile for: xperfmon++ V1.40 # Version required: 1.1 # Date created: 14 March 97 -# Whom: Lars Koeller <Lars_Koeller@odie.physik2.uni-rostock.de> +# Whom: Lars Koeller <Lars.Koeller@Uni-Bielefeld.DE> # -# $Id: Makefile,v 1.15 1998/02/21 20:26:15 steve Exp $ +# $Id: Makefile,v 1.12 1997/03/15 12:32:52 asami Exp $ # DISTNAME= xperfmon++ -PKGNAME= xperfmon++-1.40 +PKGNAME= xperfmon++-2.0 CATEGORIES= sysutils x11 -MASTER_SITES= ftp://proteus.arc.nasa.gov/pub/ +# In Germany try this +MASTER_SITES= ftp://proteus.arc.nasa.gov/pub/ \ + ftp://ftp.uni-bielefeld.de/pub/systems/FreeBSD/lkoeller + DISTFILES= xperfmon++v1.1.tar.Z MAINTAINER= Lars.Koeller@Uni-Bielefeld.DE USE_IMAKE= yes +pre-configure: + if [ -e /usr/lib/libdevstat.a ]; then \ + cd ${WRKSRC} ; \ + ${MV} Imakefile Imakefile.in ; \ + ${SED} -e "s:EXTRA_DEFINES=:EXTRA_DEFINES= -DHAVE_DEVSTAT:" Imakefile.in > Imakefile.i1 ; \ + ${SED} -e "s:FreeBSDFLAGS=:FreeBSDFLAGS= -ldevstat:" Imakefile.i1 > Imakefile ; \ + fi + .include <bsd.port.mk> diff --git a/sysutils/xperfmon/files/freebsd_system.c b/sysutils/xperfmon/files/freebsd_system.c index f81966510b86..a4cd856c9b1a 100644 --- a/sysutils/xperfmon/files/freebsd_system.c +++ b/sysutils/xperfmon/files/freebsd_system.c @@ -48,10 +48,10 @@ #include <sys/param.h> #endif -#if (defined(BSD) && (BSD >= 199306)) +#if (defined(BSD) && (BSD >= 199506)) # include <osreldate.h> #else -# error You have to use at least a FreeBSD 2.X system +# error You have to use at least a FreeBSD 2.2.X system #endif #include <X11/IntrinsicP.h> @@ -74,12 +74,15 @@ #include <sys/socket.h> #include <sys/sysctl.h> #include <sys/dkstat.h> +#ifdef HAVE_DEVSTAT +#include <devstat.h> +#endif #include <sys/buf.h> #include <sys/vmmeter.h> #include <vm/vm.h> #include <sys/time.h> #include <net/if.h> -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 +#if __FreeBSD_version >= 300000 #include <net/if_var.h> #endif #include <netinet/in.h> @@ -128,6 +131,12 @@ #define WANT_STAT(x) (poss_stats[(x)] != NO_STAT) +#ifdef HAVE_DEVSTAT +/* the old values */ +#define DK_NDRIVE 8 +#define DK_NAMELEN 8 +#endif + /* Function Prototypes */ @@ -136,6 +145,11 @@ static void kread(int nlx, void *addr, size_t size); static void collect_stats(void); static int total_disk_transfers(void); static int get_swapspace(void); +#ifdef HAVE_DEVSTAT +void init_devstat(void); +int get_devstat(void); +#endif /* HAVE_DEVSTAT */ + /* Variables & Structs @@ -146,8 +160,25 @@ static kvm_t *kd; static char errbuf[_POSIX2_LINE_MAX]; static char dr_name[DK_NDRIVE][DK_NAMELEN]; static double etime; +#ifdef HAVE_DEVSTAT +long generation; +devstat_select_mode select_mode; +struct devstat_match *matches; +int num_matches; +int num_selected, num_selections; +long select_generation; +static struct statinfo cur, last; +int num_devices; +struct device_selection *dev_select; +char nodisk; +#endif /* HAVE_DEVSTAT */ + +#if __FreeBSD_version >= 220000 +float current_values[NUM_GRAPHS]; +#else int current_values[NUM_GRAPHS]; +#endif stat_type stats; extern Widget perfmon[NUM_GRAPHS]; @@ -161,6 +192,7 @@ static struct _nfsStats { int nfsServer, nfsClient; } nfsStats, old_nfsStats; +/* NB that we'll have to include machine/asname.h when the kernel goes ELF */ struct nlist nl[] = { #define X_CPTIME 0 { "_cp_time" }, @@ -169,7 +201,11 @@ struct nlist nl[] = { #define X_BOOTTIME 2 { "_boottime" }, #define X_DKXFER 3 +#ifdef HAVE_DEVSTAT + { "_hz" }, /* just a placeholder */ +#else { "_dk_xfer" }, +#endif #define X_HZ 4 { "_hz" }, #define N_IFNET 5 @@ -193,7 +229,9 @@ struct nlist nl[] = { struct { long time[CPUSTATES]; +#ifndef HAVE_DEVSTAT long xfer[DK_NDRIVE]; +#endif struct vmmeter Sum; struct vmmeter Rate; int interrupts; @@ -212,6 +250,9 @@ void sys_setup() { get_namelist(getbootfile(), _PATH_KMEM); collect_stats(); +#ifdef HAVE_DEVSTAT + init_devstat(); +#endif /* hack to enforce a resize of the 'Free Swap' graph without this the left border always displays the first drawn line cause this field isn't resized very often due to slow change of @@ -227,7 +268,7 @@ void sys_setup() void update_stats() { int state; - double pct, tot;; + double pct, tot, loadavg[3]; collect_stats(); @@ -238,16 +279,34 @@ void update_stats() pct = 100 / tot; else pct = 0; + +#if __FreeBSD_version >= 220000 + if (getloadavg(loadavg, sizeof(loadavg) / sizeof(loadavg[0])) == -1 ) { + fprintf( stderr, "xperfmon++: getloadavg returned no values\n" ); + current_values[LOAD] = 0; + } else { + current_values[LOAD] = loadavg[0]*100; + /* fprintf( stderr, "loadavg: %f %f %f\n", loadavg[0], loadavg[1], loadavg[2] ); */ + } +#endif + +#if __FreeBSD_version >= 220000 + current_values[USER_CPU_PERCENTAGE] = s.time[CP_USER] * pct; + current_values[NICE_CPU_PERCENTAGE] = s.time[CP_NICE] * pct; + current_values[SYSTEM_CPU_PERCENTAGE] = s.time[CP_SYS] * pct; + current_values[INTER_CPU_PERCENTAGE] = s.time[CP_INTR] * pct; +#else current_values[USER_CPU_PERCENTAGE] = (s.time[CP_USER] + s.time[CP_NICE]) * pct; current_values[SYSTEM_CPU_PERCENTAGE] = (s.time[CP_SYS] + s.time[CP_INTR]) * pct;; +#endif current_values[IDLE_CPU_PERCENTAGE] = s.time[CP_IDLE] * pct; if (perfmon[FREE_MEM]) { if(!first_time_getswap) - current_values[FREE_MEM] = get_swapspace(); + current_values[FREE_MEM] = get_swapspace(); else { - current_values[FREE_MEM] = 100; - first_time_getswap = 0; + current_values[FREE_MEM] = 100; + first_time_getswap = 0; } } if (perfmon[DISK_TRANSFERS]) @@ -275,8 +334,12 @@ total_disk_transfers() { register int i, total_xfers = 0; +#ifdef HAVE_DEVSTAT + total_xfers = get_devstat(); +#else for(i=0; i < DK_NDRIVE; i++) total_xfers += s.xfer[i]; +#endif return(total_xfers/etime); } @@ -292,7 +355,9 @@ collect_stats() int mib[3], size; kread(X_CPTIME, s.time, sizeof(s.time)); +#ifndef HAVE_DEVSTAT kread(X_DKXFER, s.xfer, sizeof(s.xfer)); +#endif kread(X_SUM, &sum, sizeof(sum) ); nintr = nl[X_EINTRCNT].n_value - nl[X_INTRCNT].n_value; @@ -307,11 +372,13 @@ collect_stats() free(intrcnt); etime = 0; +#ifndef HAVE_DEVSTAT for (i=0; i < DK_NDRIVE; i++) { tmp = s.xfer[i]; s.xfer[i] -= s1.xfer[i]; s1.xfer[i] = tmp; } +#endif for (i=0; i < CPUSTATES; i++) { tmp = s.time[i]; s.time[i] -= s1.time[i]; @@ -382,7 +449,11 @@ collect_stats() size = sizeof(nfsstats); mib[0] = CTL_FS; - mib[1] = MOUNT_NFS; +#if (__FreeBSD_version >= 300003) /* ?? */ + mib[1] = MNT_EXPORTED; +#else + mib[1] = MNT_NFS; +#endif mib[2] = NFS_NFSSTATS; if (sysctl( mib, 3, &nfsstats, &size, NULL, 0) < 0) @@ -631,3 +702,164 @@ get_swapspace() free(sw); return((100*nfree)/avail); /* return free swap in percent */ } + +#ifdef HAVE_DEVSTAT +/* routines which use libdevstat */ +/* this is partly taken from FreeBSD - /usr/src/usr.sbin/iostat */ +void +init_devstat(void) +{ + /* + * Make sure that the userland devstat version matches the kernel + * devstat version. + */ + if (checkversion() < 0) { + nodisk++; + return; + } + + /* find out how many devices we have */ + if ((num_devices = getnumdevs()) < 0) { + nodisk++; + return; + } + + cur.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo)); + last.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo)); + bzero(cur.dinfo, sizeof(struct devinfo)); + bzero(last.dinfo, sizeof(struct devinfo)); + + /* + * Grab all the devices. We don't look to see if the list has + * changed here, since it almost certainly has. We only look for + * errors. + */ + if (getdevs(&cur) == -1) { + nodisk++; + return; + } + + num_devices = cur.dinfo->numdevs; + generation = cur.dinfo->generation; + + dev_select = NULL; + + /* only interested in disks */ + matches = NULL; + if (buildmatch("da", &matches, &num_matches) != 0) { + nodisk++; + return; + } + + if (num_matches == 0) + select_mode = DS_SELECT_ADD; + else + select_mode = DS_SELECT_ONLY; + + /* + * At this point, selectdevs will almost surely indicate that the + * device list has changed, so we don't look for return values of 0 + * or 1. If we get back -1, though, there is an error. + */ + if (selectdevs(&dev_select, &num_selected, + &num_selections, &select_generation, + generation, cur.dinfo->devices, num_devices, + matches, num_matches, + NULL, 0, + select_mode, DK_NDRIVE, 0) == -1) + nodisk++; +} + +int +get_devstat(void) +{ + register int dn; + long double busy_seconds; + u_int64_t total_transfers; + struct devinfo *tmp_dinfo; + int total_xfers = 0; + + if (nodisk == 0) { + /* + * Here what we want to do is refresh our device stats. + * getdevs() returns 1 when the device list has changed. + * If the device list has changed, we want to go through + * the selection process again, in case a device that we + * were previously displaying has gone away. + */ + switch (getdevs(&cur)) { + case -1: + return (0); + case 1: { + int retval; + + num_devices = cur.dinfo->numdevs; + generation = cur.dinfo->generation; + retval = selectdevs(&dev_select, &num_selected, + &num_selections, &select_generation, + generation, cur.dinfo->devices, + num_devices, matches, num_matches, + NULL, 0, + select_mode, DK_NDRIVE, 0); + switch(retval) { + case -1: + return (0); + case 1: + break; + default: + break; + } + break; + } + default: + break; + } + + /* + * Calculate elapsed time up front, since it's the same for all + * devices. + */ + busy_seconds = compute_etime(cur.busy_time, last.busy_time); + + /* this is the first time thru so just copy cur to last */ + if (last.dinfo->numdevs == 0) { + tmp_dinfo = last.dinfo; + last.dinfo = cur.dinfo; + cur.dinfo = tmp_dinfo; + last.busy_time = cur.busy_time; + return (0); + } + + + for (dn = 0; dn < num_devices; dn++) { + int di; + + if ((dev_select[dn].selected == 0) + || (dev_select[dn].selected > DK_NDRIVE)) + continue; + + di = dev_select[dn].position; + + if (compute_stats(&cur.dinfo->devices[di], + &last.dinfo->devices[di], busy_seconds, + NULL, &total_transfers, + NULL, NULL, + NULL, NULL, + NULL, NULL)!= 0) + break; + total_xfers += (int)total_transfers; + } + + tmp_dinfo = last.dinfo; + last.dinfo = cur.dinfo; + cur.dinfo = tmp_dinfo; + + last.busy_time = cur.busy_time; + + } else + /* no disks found ? */ + total_xfers = 0; + + return (total_xfers); +} +#endif /* HAVE_DEVSTAT */ diff --git a/sysutils/xperfmon/files/patch-aa b/sysutils/xperfmon/files/patch-aa index b4a0fb0e7010..c53c1fc383c6 100644 --- a/sysutils/xperfmon/files/patch-aa +++ b/sysutils/xperfmon/files/patch-aa @@ -1,34 +1,5 @@ -diff -ca ../xperfmon++/StripCharP.h ./StripCharP.h -*** ../xperfmon++/StripCharP.h Wed Jul 27 22:29:30 1994 ---- ./StripCharP.h Sun Dec 21 23:03:44 1997 -*************** -*** 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; -diff -ca ../xperfmon++/StripChart.c ./StripChart.c *** ../xperfmon++/StripChart.c Wed Jul 27 22:29:30 1994 ---- ./StripChart.c Sun Dec 21 23:03:44 1997 +--- ./StripChart.c Thu Apr 30 15:03:27 1998 *************** *** 53,58 **** --- 53,70 ---- @@ -40,10 +11,10 @@ diff -ca ../xperfmon++/StripChart.c ./StripChart.c + #include <sys/param.h> + #endif + -+ #if (defined(BSD) && (BSD >= 199306)) ++ #if (defined(BSD) && (BSD >= 199506)) + # include <osreldate.h> + #else -+ # error You have to use at least a FreeBSD 2.X system ++ # error You have to use at least a FreeBSD 2.2.X system + #endif + + # include "system.h" @@ -98,25 +69,6 @@ diff -ca ../xperfmon++/StripChart.c ./StripChart.c if ( mono_screen ) { *************** -*** 323,330 **** - w->strip_chart.interval = repaint_window(w, 0, (int) w->core.width); - } - } -! if (value < w->strip_chart.min_value) -! w->strip_chart.min_value = value; - - w->strip_chart.valuedata[w->strip_chart.interval] = value; - if (XtIsRealized((Widget)w)) { ---- 354,361 ---- - w->strip_chart.interval = repaint_window(w, 0, (int) w->core.width); - } - } -! if (value < w->strip_chart.min_value) -! w->strip_chart.min_value = value; - - w->strip_chart.valuedata[w->strip_chart.interval] = value; - if (XtIsRealized((Widget)w)) { -*************** *** 343,361 **** if ( checkValue >= w->strip_chart.highAlarm ) { /* check for high alarm */ @@ -204,7 +156,7 @@ diff -ca ../xperfmon++/StripChart.c ./StripChart.c /* Compute the minimum scale required to graph the data, but don't go lower than min_scale. */ ! if (w->strip_chart.interval != 0 || scale <= (int)w->strip_chart.max_value) -! scale = ((int) (w->strip_chart.max_value)) + 1; + scale = ((int) (w->strip_chart.max_value)) + 1; if (scale < w->strip_chart.min_scale) scale = w->strip_chart.min_scale; @@ -216,11 +168,11 @@ diff -ca ../xperfmon++/StripChart.c ./StripChart.c ! if (w->strip_chart.interval != 0 || scale <= (int)w->strip_chart.max_value) { ! #if (defined(BSD) && (BSD >= 199306)) ! if (strcmp(w->strip_chart.botLabel, botNames[FREE_MEM]) != 0 || w->strip_chart.max_value == 100) -! scale = ((int) (w->strip_chart.max_value)) + 1; -! #else -! scale = ((int) (w->strip_chart.max_value)) + 1; -! #endif -! } + scale = ((int) (w->strip_chart.max_value)) + 1; ++ #else ++ scale = ((int) (w->strip_chart.max_value)) + 1; ++ #endif ++ } if (scale < w->strip_chart.min_scale) scale = w->strip_chart.min_scale; @@ -251,9 +203,8 @@ diff -ca ../xperfmon++/StripChart.c ./StripChart.c x = 4; XDS(w->strip_chart.botLabel); } -diff -ca ../xperfmon++/TimeChart.c ./TimeChart.c *** ../xperfmon++/TimeChart.c Wed Jul 27 22:29:31 1994 ---- ./TimeChart.c Sun Dec 21 23:03:44 1997 +--- ./TimeChart.c Thu Apr 30 15:03:27 1998 *************** *** 47,52 **** --- 47,62 ---- @@ -264,48 +215,17 @@ diff -ca ../xperfmon++/TimeChart.c ./TimeChart.c + #include <sys/param.h> + #endif + -+ #if (defined(BSD) && (BSD >= 199306)) ++ #if (defined(BSD) && (BSD >= 199506)) + # include <osreldate.h> + #else -+ # error You have to use at least a FreeBSD 2.X system ++ # error You have to use at least a FreeBSD 2.2.X system + #endif + #include <stdio.h> #include <X11/IntrinsicP.h> #include <X11/StringDefs.h> -diff -ca ../xperfmon++/TimeChart.h ./TimeChart.h -*** ../xperfmon++/TimeChart.h Wed Jul 27 22:29:31 1994 ---- ./TimeChart.h Sun Dec 21 23:03:45 1997 -*************** -*** 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; -diff -ca ../xperfmon++/misc.c ./misc.c *** ../xperfmon++/misc.c Wed Jul 27 22:29:33 1994 ---- ./misc.c Sun Dec 21 23:03:45 1997 +--- ./misc.c Thu Apr 30 15:03:27 1998 *************** *** 22,27 **** --- 22,38 ---- @@ -317,10 +237,10 @@ diff -ca ../xperfmon++/misc.c ./misc.c + #include <sys/param.h> + #endif + -+ #if (defined(BSD) && (BSD >= 199306)) ++ #if (defined(BSD) && (BSD >= 199506)) + # include <osreldate.h> + #else -+ # error You have to use at least a FreeBSD 2.X system ++ # error You have to use at least a FreeBSD 2.2.X system + #endif + #include <stdio.h> @@ -343,79 +263,8 @@ diff -ca ../xperfmon++/misc.c ./misc.c switch (keycode) { case 'Q': case 'q': -diff -ca ../xperfmon++/system.h ./system.h -*** ../xperfmon++/system.h Wed Jul 27 22:29:34 1994 ---- ./system.h Sun Dec 21 23:03:45 1997 -*************** -*** 151,168 **** ---- 151,182 ---- - "Idle", - "Free", - "Disk", -+ #if (defined(BSD) && (BSD >= 199306)) -+ "Inter-", -+ #else - "Interrupts", -+ #endif - "Input", - "Output", -+ #if (defined(BSD) && (BSD >= 199306)) -+ "Collis", -+ "NFS Clt", -+ "NFS Srv", -+ #else - "Collision", - "NFS Client", - "NFS Server", -+ #endif - }; - static char *widgetLabels[] = { - "User", - "System", - "Idle", -+ #if (defined(BSD) && (BSD >= 199306)) -+ "Swap", -+ #else - "Free", -+ #endif - "Disk", - "Intrpts", - "Input", -*************** -*** 171,177 **** ---- 185,205 ---- - "NFSClient", - "NFSServer", - }; -+ - static char *botNames[] = { -+ #if (defined(BSD) && (BSD >= 199306)) -+ "CPU (%)", -+ "CPU (%)", -+ "CPU (%)", -+ "Swap (%)", -+ "Trsf/s", -+ "rupts/s", -+ "Pkts/s", -+ "Pkts/s", -+ "Pkts/s", -+ "Calls/s", -+ "Calls/s", -+ #else - "CPU", - "CPU", - "CPU", -*************** -*** 183,186 **** ---- 211,215 ---- - "Packets", - "Calls", - "Calls", -+ #endif - }; -diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c *** ../xperfmon++/xperfmon.c Wed Jul 27 22:29:39 1994 ---- ./xperfmon.c Sun Dec 21 23:03:45 1997 +--- ./xperfmon.c Thu Aug 13 18:59:02 1998 *************** *** 58,63 **** --- 58,73 ---- @@ -426,18 +275,33 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c + #include <sys/param.h> + #endif + -+ #if (defined(BSD) && (BSD >= 199306)) ++ #if (defined(BSD) && (BSD >= 199506)) + # include <osreldate.h> + #else -+ # error You have to use at least a FreeBSD 2.X system ++ # error You have to use at least a FreeBSD 2.2.X system + #endif + #include <stdio.h> #include <X11/IntrinsicP.h> #include <X11/StringDefs.h> *************** +*** 76,82 **** +--- 86,97 ---- + extern void start_graphs(); + extern time_t timeStamp; + extern Dimension oldHeight, oldWidth; ++ ++ #if __FreeBSD_version >= 220000 ++ extern float current_values[NUM_GRAPHS]; ++ #else + extern int current_values[NUM_GRAPHS]; ++ #endif + + char *gprogname; + double testValue; +*************** *** 94,99 **** ---- 104,114 ---- +--- 109,119 ---- { NULL, NULL }, }; @@ -450,7 +314,7 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c #define XtNcount "count" #define XtCCount "Count" *************** -*** 101,110 **** +*** 101,120 **** #define XtCFill "Fill" #define XtNfast "fast" #define XtCFast "Fast" @@ -461,9 +325,53 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c #define XtNdebug "debug" #define XtCDebug "Debug" #define XtNusercpuAdd "usercpuAdd" ---- 116,121 ---- + #define XtCUsercpuAdd "UsercpuAdd" + #define XtNusercpuSub "usercpuSub" + #define XtCUsercpuSub "UsercpuSub" + #define XtNsystemcpuAdd "systemcpuAdd" + #define XtCSystemcpuAdd "SystemcpuAdd" + #define XtNsystemcpuSub "systemcpuSub" + #define XtCSystemcpuSub "SystemcpuSub" + #define XtNidlecpuAdd "idlecpuAdd" + #define XtCIdlecpuAdd "IdlecpuAdd" + #define XtNidlecpuSub "idlecpuSub" +--- 121,154 ---- + #define XtCFill "Fill" + #define XtNfast "fast" + #define XtCFast "Fast" + #define XtNdebug "debug" + #define XtCDebug "Debug" ++ #if __FreeBSD_version >= 220000 ++ #define XtNsysloadAdd "sysloadAdd" ++ #define XtCSysloadAdd "SysloadAdd" ++ #define XtNsysloadSub "sysloadSub" ++ #define XtCSysloadSub "SysloadSub" ++ #endif + #define XtNusercpuAdd "usercpuAdd" + #define XtCUsercpuAdd "UsercpuAdd" + #define XtNusercpuSub "usercpuSub" + #define XtCUsercpuSub "UsercpuSub" ++ #if __FreeBSD_version >= 220000 ++ #define XtNnicecpuAdd "nicecpuAdd" ++ #define XtCNicecpuAdd "NicecpuAdd" ++ #define XtNnicecpuSub "nicecpuSub" ++ #define XtCNicecpuSub "NicecpuSub" ++ #endif + #define XtNsystemcpuAdd "systemcpuAdd" + #define XtCSystemcpuAdd "SystemcpuAdd" + #define XtNsystemcpuSub "systemcpuSub" + #define XtCSystemcpuSub "SystemcpuSub" ++ #if __FreeBSD_version >= 220000 ++ #define XtNintercpuAdd "intercpuAdd" ++ #define XtCIntercpuAdd "IntercpuAdd" ++ #define XtNintercpuSub "intercpuSub" ++ #define XtCIntercpuSub "IntercpuSub" ++ #endif + #define XtNidlecpuAdd "idlecpuAdd" + #define XtCIdlecpuAdd "IdlecpuAdd" + #define XtNidlecpuSub "idlecpuSub" *************** -*** 171,181 **** +*** 171,192 **** static XrmOptionDescRec optionDescList[] = { { "-interval", ".interval", XrmoptionSepArg, (caddr_t) NULL}, { "-immediate", "*PerfChart.immediate", XrmoptionNoArg, "True" }, @@ -472,34 +380,92 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c { "-lowmemWarn", "*perfChartFree.lowWarn", XrmoptionSepArg, NULL }, { "-highmemAlarm", "*perfChartFree.highAlarm", XrmoptionSepArg, NULL }, { "-highmemWarn", "*perfChartFree.highWarn", XrmoptionSepArg, NULL }, - +! { "-lowuserAlarm", "*perfChartUser.lowAlarm", XrmoptionSepArg, NULL }, { "-lowuserWarn", "*perfChartUser.lowWarn", XrmoptionSepArg, NULL }, ---- 182,198 ---- + { "-highuserAlarm", "*perfChartUser.highAlarm", XrmoptionSepArg, NULL }, + { "-highuserWarn", "*perfChartUser.highWarn", XrmoptionSepArg, NULL }, + + { "-lowsysAlarm", "*perfChartSystem.lowAlarm", XrmoptionSepArg, NULL }, + { "-lowsysWarn", "*perfChartSystem.lowWarn", XrmoptionSepArg, NULL }, + { "-highsysAlarm", "*perfChartSystem.highAlarm", XrmoptionSepArg, NULL }, + { "-highsysWarn", "*perfChartSystem.highWarn", XrmoptionSepArg, NULL }, + + { "-lowidleAlarm", "*perfChartIdle.lowAlarm", XrmoptionSepArg, NULL }, + { "-lowidleWarn", "*perfChartIdle.lowWarn", XrmoptionSepArg, NULL }, + { "-highidleAlarm", "*perfChartIdle.highAlarm", XrmoptionSepArg, NULL }, +--- 205,250 ---- static XrmOptionDescRec optionDescList[] = { { "-interval", ".interval", XrmoptionSepArg, (caddr_t) NULL}, { "-immediate", "*PerfChart.immediate", XrmoptionNoArg, "True" }, -! #if (defined(BSD) && (BSD >= 199306)) -! { "-lowswapAlarm", "*perfChartFree.lowAlarm", XrmoptionSepArg, NULL }, -! { "-lowswapWarn", "*perfChartFree.lowWarn", XrmoptionSepArg, NULL }, -! { "-highswapAlarm", "*perfChartFree.highAlarm", XrmoptionSepArg, NULL }, -! { "-highswapWarn", "*perfChartFree.highWarn", XrmoptionSepArg, NULL }, +! #if __FreeBSD_version >= 220000 +! { "-lowloadAlarm", "*perfChartLoad.lowAlarm", XrmoptionSepArg, NULL }, +! { "-lowloadWarn", "*perfChartLoad.lowWarn", XrmoptionSepArg, NULL }, +! { "-highloadAlarm", "*perfChartLoad.highAlarm", XrmoptionSepArg, NULL }, +! { "-highloadWarn", "*perfChartLoad.highWarn", XrmoptionSepArg, NULL }, +! +! { "-lowswapAlarm", "*perfChartSwap.lowAlarm", XrmoptionSepArg, NULL }, +! { "-lowswapWarn", "*perfChartSwap.lowWarn", XrmoptionSepArg, NULL }, +! { "-highswapAlarm", "*perfChartSwap.highAlarm", XrmoptionSepArg, NULL }, +! { "-highswapWarn", "*perfChartSwap.highWarn", XrmoptionSepArg, NULL }, ! #else { "-lowmemAlarm", "*perfChartFree.lowAlarm", XrmoptionSepArg, NULL }, { "-lowmemWarn", "*perfChartFree.lowWarn", XrmoptionSepArg, NULL }, { "-highmemAlarm", "*perfChartFree.highAlarm", XrmoptionSepArg, NULL }, { "-highmemWarn", "*perfChartFree.highWarn", XrmoptionSepArg, NULL }, -+ #endif - +! #endif { "-lowuserAlarm", "*perfChartUser.lowAlarm", XrmoptionSepArg, NULL }, { "-lowuserWarn", "*perfChartUser.lowWarn", XrmoptionSepArg, NULL }, -*************** -*** 237,244 **** ---- 254,266 ---- + { "-highuserAlarm", "*perfChartUser.highAlarm", XrmoptionSepArg, NULL }, + { "-highuserWarn", "*perfChartUser.highWarn", XrmoptionSepArg, NULL }, + ++ #if __FreeBSD_version >= 220000 ++ { "-lowniceAlarm", "*perfChartNice.lowAlarm", XrmoptionSepArg, NULL }, ++ { "-lowniceWarn", "*perfChartNice.lowWarn", XrmoptionSepArg, NULL }, ++ { "-highniceAlarm", "*perfChartNice.highAlarm", XrmoptionSepArg, NULL }, ++ { "-highniceWarn", "*perfChartNice.highWarn", XrmoptionSepArg, NULL }, ++ #endif ++ + { "-lowsysAlarm", "*perfChartSystem.lowAlarm", XrmoptionSepArg, NULL }, + { "-lowsysWarn", "*perfChartSystem.lowWarn", XrmoptionSepArg, NULL }, + { "-highsysAlarm", "*perfChartSystem.highAlarm", XrmoptionSepArg, NULL }, + { "-highsysWarn", "*perfChartSystem.highWarn", XrmoptionSepArg, NULL }, + ++ #if __FreeBSD_version >= 220000 ++ { "-lowinterAlarm", "*perfChartInter.lowAlarm", XrmoptionSepArg, NULL }, ++ { "-lowinterWarn", "*perfChartInter.lowWarn", XrmoptionSepArg, NULL }, ++ { "-highinterAlarm", "*perfChartInter.highAlarm", XrmoptionSepArg, NULL }, ++ { "-highinterWarn", "*perfChartInter.highWarn", XrmoptionSepArg, NULL }, ++ #endif ++ + { "-lowidleAlarm", "*perfChartIdle.lowAlarm", XrmoptionSepArg, NULL }, + { "-lowidleWarn", "*perfChartIdle.lowWarn", XrmoptionSepArg, NULL }, + { "-highidleAlarm", "*perfChartIdle.highAlarm", XrmoptionSepArg, NULL }, +*************** +*** 231,244 **** +--- 289,319 ---- + { "-fill", "*fill", XrmoptionNoArg, "True" }, + { "-debug", "*debug", XrmoptionNoArg, "True" }, + { "-fast", "*fast", XrmoptionNoArg, (XtPointer)"True" }, ++ #if __FreeBSD_version >= 220000 ++ { "-sysload", XtNsysloadSub, XrmoptionNoArg, "True" }, ++ { "+sysload", XtNsysloadAdd, XrmoptionNoArg, "TRUE" }, ++ #endif + { "-usercpu", XtNusercpuSub, XrmoptionNoArg, "True" }, + { "+usercpu", XtNusercpuAdd, XrmoptionNoArg, "TRUE" }, ++ #if __FreeBSD_version >= 220000 ++ { "-nicecpu", XtNnicecpuSub, XrmoptionNoArg, "True" }, ++ { "+nicecpu", XtNnicecpuAdd, XrmoptionNoArg, "TRUE" }, ++ #endif + { "-systemcpu", XtNsystemcpuSub, XrmoptionNoArg, "True" }, { "+systemcpu", XtNsystemcpuAdd, XrmoptionNoArg, "TRUE" }, ++ #if __FreeBSD_version >= 220000 ++ { "-intercpu", XtNintercpuSub, XrmoptionNoArg, "True" }, ++ { "+intercpu", XtNintercpuAdd, XrmoptionNoArg, "TRUE" }, ++ #endif { "-idlecpu", XtNidlecpuSub, XrmoptionNoArg, "True" }, { "+idlecpu", XtNidlecpuAdd, XrmoptionNoArg, "TRUE" }, -+ #if __FreeBSD_version >= 199504 ++ #if __FreeBSD_version >= 220000 + { "-freeswap", XtNfreememSub, XrmoptionNoArg, "True" }, + { "+freeswap", XtNfreememAdd, XrmoptionNoArg, "TRUE" }, + #else @@ -528,26 +494,99 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c { XtNinterval, XtCInterval, XtRInt, sizeof(int), XtOffsetOf(AppData, interval), XtRImmediate, (caddr_t) DEF_INTERVAL }, { XtNcount, XtCCount, XtRInt, sizeof(int), ---- 275,285 ---- +--- 328,338 ---- +*************** +*** 274,288 **** + XtOffsetOf(AppData, debug), XtRImmediate, (caddr_t)NULL }, + { XtNfast, XtCFast, XtRBoolean, sizeof(Boolean), + XtOffsetOf(AppData, fast), XtRImmediate, (XtPointer) NULL }, +! + { XtNusercpuAdd, XtCUsercpuAdd, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, addG[USR_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNusercpuSub, XtCUsercpuSub, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, subG[USR_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNsystemcpuAdd, XtCSystemcpuAdd, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, addG[SYS_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNsystemcpuSub, XtCSystemcpuSub, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, subG[SYS_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNidlecpuAdd, XtCIdlecpuAdd, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, addG[IDL_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNidlecpuSub, XtCIdlecpuSub, XtRBool, sizeof(Bool), +--- 343,374 ---- + XtOffsetOf(AppData, debug), XtRImmediate, (caddr_t)NULL }, + { XtNfast, XtCFast, XtRBoolean, sizeof(Boolean), + XtOffsetOf(AppData, fast), XtRImmediate, (XtPointer) NULL }, +! #if __FreeBSD_version >= 220000 +! { XtNsysloadAdd, XtCSysloadAdd, XtRBool, sizeof(Bool), +! XtOffsetOf(AppData, addG[SYS_LOAD]), XtRImmediate, (XtPointer) NULL }, +! { XtNsysloadSub, XtCSysloadSub, XtRBool, sizeof(Bool), +! XtOffsetOf(AppData, subG[SYS_LOAD]), XtRImmediate, (XtPointer) NULL }, +! #endif + { XtNusercpuAdd, XtCUsercpuAdd, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, addG[USR_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNusercpuSub, XtCUsercpuSub, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, subG[USR_CPU]), XtRImmediate, (XtPointer) NULL }, ++ #if __FreeBSD_version >= 220000 ++ { XtNnicecpuAdd, XtCNicecpuAdd, XtRBool, sizeof(Bool), ++ XtOffsetOf(AppData, addG[NICE_CPU]), XtRImmediate, (XtPointer) NULL }, ++ { XtNnicecpuSub, XtCNicecpuSub, XtRBool, sizeof(Bool), ++ XtOffsetOf(AppData, subG[NICE_CPU]), XtRImmediate, (XtPointer) NULL }, ++ #endif + { XtNsystemcpuAdd, XtCSystemcpuAdd, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, addG[SYS_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNsystemcpuSub, XtCSystemcpuSub, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, subG[SYS_CPU]), XtRImmediate, (XtPointer) NULL }, ++ #if __FreeBSD_version >= 220000 ++ { XtNintercpuAdd, XtCIntercpuAdd, XtRBool, sizeof(Bool), ++ XtOffsetOf(AppData, addG[INT_CPU]), XtRImmediate, (XtPointer) NULL }, ++ { XtNintercpuSub, XtCIntercpuSub, XtRBool, sizeof(Bool), ++ XtOffsetOf(AppData, subG[INT_CPU]), XtRImmediate, (XtPointer) NULL }, ++ #endif + { XtNidlecpuAdd, XtCIdlecpuAdd, XtRBool, sizeof(Bool), + XtOffsetOf(AppData, addG[IDL_CPU]), XtRImmediate, (XtPointer) NULL }, + { XtNidlecpuSub, XtCIdlecpuSub, XtRBool, sizeof(Bool), *************** *** 324,329 **** ---- 340,348 ---- +--- 410,418 ---- void usage() { -+ #if (defined(BSD) && (BSD >= 199306)) -+ fprintf(stderr, "\nxperfmon++ V1.40 for FreeBSD-2.X and 3.X\n"); ++ #if __FreeBSD_version >= 220000 ++ fprintf(stderr, "\nxperfmon++ V2.0 for FreeBSD-2.2.X and 3.X\n"); + #endif fprintf(stderr, "\nusage: xperfmon++ option option option .....\n"); fprintf(stderr, "options:\n"); fprintf(stderr, " [-display [{host}]:[{vs}]]\n"); *************** -*** 344,350 **** ---- 363,373 ---- +*** 340,350 **** + fprintf(stderr, " [-fast] (changes interval from seconds to milliseconds)\n"); + fprintf(stderr, " [-immediate] (background limit alarm color is based on current sample)\n"); + fprintf(stderr, " [-fill] (output filled graph instead of line graph)\n\n"); +! fprintf(stderr, " [{-+}usercpu] ({remove|add} usercpu to list of graphs\n"); fprintf(stderr, " [{-+}systemcpu] ({remove|add} systemcpu to list of graphs\n"); fprintf(stderr, " [{-+}idlecpu] ({remove|add} idlecpu to list of graphs\n"); -+ #if (defined(BSD) && (BSD >= 199306)) + fprintf(stderr, " [{-+}freemem] ({remove|add} freemem to list of graphs\n"); + fprintf(stderr, " [{-+}diskxfr] ({remove|add} disk transfers to list of graphs\n"); + fprintf(stderr, " [{-+}interrupts] ({remove|add} interrupts to list of graphs\n"); + fprintf(stderr, " [{-+}inputpkts] ({remove|add} input packets to list of graphs\n"); +--- 429,451 ---- + fprintf(stderr, " [-fast] (changes interval from seconds to milliseconds)\n"); + fprintf(stderr, " [-immediate] (background limit alarm color is based on current sample)\n"); + fprintf(stderr, " [-fill] (output filled graph instead of line graph)\n\n"); +! #if __FreeBSD_version >= 220000 +! fprintf(stderr, " [{-+}sysload] ({remove|add} sysload to list of graphs\n"); +! #endif + fprintf(stderr, " [{-+}usercpu] ({remove|add} usercpu to list of graphs\n"); ++ #if __FreeBSD_version >= 220000 ++ fprintf(stderr, " [{-+}nicecpu] ({remove|add} nicecpu to list of graphs\n"); ++ #endif + fprintf(stderr, " [{-+}systemcpu] ({remove|add} systemcpu to list of graphs\n"); ++ #if __FreeBSD_version >= 220000 ++ fprintf(stderr, " [{-+}intercpu] ({remove|add} intercpu to list of graphs\n"); ++ #endif + fprintf(stderr, " [{-+}idlecpu] ({remove|add} idlecpu to list of graphs\n"); ++ #if __FreeBSD_version >= 220000 + fprintf(stderr, " [{-+}freeswap] ({remove|add} freeswap to list of graphs\n"); + #else fprintf(stderr, " [{-+}freemem] ({remove|add} freemem to list of graphs\n"); @@ -557,18 +596,28 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c fprintf(stderr, " [{-+}inputpkts] ({remove|add} input packets to list of graphs\n"); *************** *** 361,370 **** ---- 384,401 ---- fprintf(stderr, " [-high*Alarm {value}] ( Set High Alarm value for *)\n"); fprintf(stderr, " [-high*Warn {value}] ( Set High Warning value for *)\n"); fprintf(stderr, " Where \"*\" is one of the following:\n"); -+ #if (defined(BSD) && (BSD >= 199306)) -+ fprintf(stderr, " [swap | user | sys | idle | disk | intrpts |\n"); + fprintf(stderr, " [mem | user | sys | idle | disk | intrpts |\n"); +! fprintf(stderr, " input | output | collision | nfsclient | nfsserver]\n"); + fprintf(stderr, " For Example:\n"); + fprintf(stderr, " [-lowmemAlarm {value}] ( Set low Free Memory Alarm Value)\n"); + fprintf(stderr, "WARNING: It is an error condition to set both a high, and a low, limit warning or alarm.\n"); + exit(1); + } +--- 462,479 ---- + fprintf(stderr, " [-high*Alarm {value}] ( Set High Alarm value for *)\n"); + fprintf(stderr, " [-high*Warn {value}] ( Set High Warning value for *)\n"); + fprintf(stderr, " Where \"*\" is one of the following:\n"); ++ #if __FreeBSD_version >= 220000 ++ fprintf(stderr, " [load | user | nice | sys | inter | idle | swap | disk |\n"); + #else fprintf(stderr, " [mem | user | sys | idle | disk | intrpts |\n"); -+ #endif - fprintf(stderr, " input | output | collision | nfsclient | nfsserver]\n"); +! #endif +! fprintf(stderr, " intrpts | input | output | collision | nfsclient | nfsserver]\n"); fprintf(stderr, " For Example:\n"); -+ #if (defined(BSD) && (BSD >= 199306)) ++ #if __FreeBSD_version >= 220000 + fprintf(stderr, " [-lowswapAlarm {value}] ( Set low Free Swap Alarm Value)\n"); + #else fprintf(stderr, " [-lowmemAlarm {value}] ( Set low Free Memory Alarm Value)\n"); @@ -578,7 +627,7 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c } *************** *** 386,391 **** ---- 417,423 ---- +--- 495,501 ---- time(&timeStamp); return; } @@ -595,7 +644,7 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c char eventString[60]; switch (event->type) { case Expose: ---- 426,433 ---- +--- 504,511 ---- Boolean *contin2disp; { Dimension neww, newh; @@ -619,7 +668,7 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c strcpy(eventString,"reparent"); break; case ConfigureNotify: ---- 436,453 ---- +--- 514,531 ---- strcpy(eventString,"expose"); break; case MapNotify: @@ -648,12 +697,12 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c ! if ( neww < 250 + 10 ) { ! neww = 250 + 10; ! w->core.width = 250 + 10; -! XtResizeWindow(w); - } + XtResizeWindow(w); +! } if ( appData.debug ) printf("Resize Request: type=%d %s, oldw=%hu, oldh=%hu, neww=%hu, newh=%hu\n", (int)event->type, eventString, ---- 455,489 ---- +--- 533,567 ---- newh=event->xconfigure.height; strcpy(eventString,"configure"); break; @@ -665,32 +714,32 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c + window_size_changed = TRUE; + } else { + w->core.width = neww; ++ } ++ ++ if ( newh < MIN_HEIGHT ) { ++ newh = MIN_HEIGHT; ++ w->core.height = MIN_HEIGHT; ++ window_size_changed = TRUE; ++ } ++ ++ /* Now the graphs fit perfect into the window! */ ++ hOverHead = (5.6 * appData.numGraphsOn) - (6 / appData.numGraphsOn); ++ boxH = labelBox->core.height; ++ timeH = timechart->core.height; ++ newWidgetH = (newh - (boxH+7) - (timeH+10) - hOverHead) / appData.numGraphsOn; ++ w->core.height = newWidgetH * appData.numGraphsOn + hOverHead + (boxH+7) + (timeH+10); ++ if(w->core.height != newh) { ++ newh = w->core.height; } ! -! if ( newh < MIN_HEIGHT ) { -! newh = MIN_HEIGHT; -! w->core.height = MIN_HEIGHT; -! window_size_changed = TRUE; -! } +! if( neww != oldWidth || newh != oldHeight || window_size_changed == TRUE ) + XtResizeWindow(w); ! -! /* Now the graphs fit perfect into the window! */ -! hOverHead = (5.6 * appData.numGraphsOn) - (6 / appData.numGraphsOn); -! boxH = labelBox->core.height; -! timeH = timechart->core.height; -! newWidgetH = (newh - (boxH+7) - (timeH+10) - hOverHead) / appData.numGraphsOn; -! w->core.height = newWidgetH * appData.numGraphsOn + hOverHead + (boxH+7) + (timeH+10); -! if(w->core.height != newh) { -! newh = w->core.height; - } -+ -+ if( neww != oldWidth || newh != oldHeight || window_size_changed == TRUE ) -+ XtResizeWindow(w); -+ if ( appData.debug ) printf("Resize Request: type=%d %s, oldw=%hu, oldh=%hu, neww=%hu, newh=%hu\n", (int)event->type, eventString, *************** -*** 431,448 **** +*** 431,441 **** neww, newh); if ( event->type == ConfigureNotify ) { @@ -702,14 +751,7 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c if ( oldWidth == neww && oldHeight == newh ) return; if ( appData.debug ) - printf("BoxH=%hu, timeH=%hu, numGraphOn=%hu, newWidgetH=%hu\n", - boxH, timeH, appData.numGraphsOn, newWidgetH); - -! neww -= 10; /* allow for spacing and borders */ - - for ( i=0; i<NUM_GRAPHS; i++ ) { - if ( appData.graphOn[i] ) { ---- 491,504 ---- +--- 569,575 ---- neww, newh); if ( event->type == ConfigureNotify ) { @@ -717,16 +759,9 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c if ( oldWidth == neww && oldHeight == newh ) return; if ( appData.debug ) - printf("BoxH=%hu, timeH=%hu, numGraphOn=%hu, newWidgetH=%hu\n", - boxH, timeH, appData.numGraphsOn, newWidgetH); - -! neww -= 10; /* allow for spacing and borders */ - - for ( i=0; i<NUM_GRAPHS; i++ ) { - if ( appData.graphOn[i] ) { *************** *** 455,460 **** ---- 511,517 ---- +--- 589,595 ---- XFlush(XtDisplay(w)); } @@ -745,7 +780,7 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c char *progname = argv[0]; Bool foundAnAdd = FALSE; ---- 521,533 ---- +--- 599,611 ---- int argc; char **argv; { @@ -761,8 +796,8 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c Bool foundAnAdd = FALSE; *************** *** 478,483 **** ---- 539,548 ---- - optionDescList, XtNumber(optionDescList), +--- 617,626 ---- + optionDescList, XtNumber(optionDescList), &argc, argv, NULL, NULL); + @@ -796,13 +831,13 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c XtNjustify, XtJustifyLeft, XtNinternalHeight, 0, XtNtop, XtChainTop, ---- 605,656 ---- +--- 683,734 ---- xperfmon_width, xperfmon_height)); XtSetValues(appData.toplevel, &arg, 1); } /* create windows */ - pappaBox = XtVaCreateManagedWidget("PappaBox", boxWidgetClass, appData.toplevel, + pappaBox = XtVaCreateManagedWidget("PappaBox", boxWidgetClass, appData.toplevel, XtNborderWidth, 0, NULL); XtOverrideTranslations(pappaBox, XtParseTranslationTable(defaultTranslations)); @@ -859,8 +894,8 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c XtNupdate, appData.interval*appData.ms_per_sec, XtNfillRect, (int)appData.fill, XtNjumpScroll, 1, ---- 665,672 ---- - perfmon[i] = XtVaCreateManagedWidget(hostname, perfChartWidgetClass, pappaBox, +--- 743,750 ---- + perfmon[i] = XtVaCreateManagedWidget(hostname, perfChartWidgetClass, pappaBox, XtNtopLabel, topNames[i], XtNbotLabel, botNames[i], ! XtNwidth, newWidgetW, @@ -891,10 +926,10 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c - XtRealizeWidget(appData.toplevel); XtAppMainLoop(appData.app_context); } ---- 675,696 ---- +--- 753,773 ---- } - timechart = XtVaCreateManagedWidget("timeChart", timeChartWidgetClass, pappaBox, - XtNfromVert, perfmon[1], + timechart = XtVaCreateManagedWidget("timeChart", timeChartWidgetClass, pappaBox, + XtNfromVert, perfmon[1], ! XtNwidth, newWidgetW, ! XtNheight, timeH, XtNupdate, appData.interval*appData.ms_per_sec, @@ -904,8 +939,8 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c sys_setup(); XtAddCallback(timechart, XtNgetValue, update_time_stat, NULL); - for ( i=0; i<NUM_GRAPHS; i++ ) - if ( appData.graphOn[i] ) + for ( i=0; i<NUM_GRAPHS; i++ ) + if ( appData.graphOn[i] ) ! XtAddCallback(perfmon[i], XtNgetValue, update_stat, (XtPointer)i); appData.interval_id = XtAppAddTimeOut(appData.app_context, @@ -913,4 +948,3 @@ diff -ca ../xperfmon++/xperfmon.c ./xperfmon.c XtAppMainLoop(appData.app_context); } -+ diff --git a/sysutils/xperfmon/files/patch-ab b/sysutils/xperfmon/files/patch-ab index 42bd33d334eb..a3d29f3b6d85 100644 --- a/sysutils/xperfmon/files/patch-ab +++ b/sysutils/xperfmon/files/patch-ab @@ -1,477 +1,312 @@ -diff -ca ../xperfmon++/Imakefile ./Imakefile -*** ../xperfmon++/Imakefile Wed Jul 27 22:29:29 1994 ---- ./Imakefile Sun Dec 21 23:03:44 1997 +*** ../xperfmon++/StripCharP.h Wed Jul 27 22:29:30 1994 +--- ./StripCharP.h Thu Apr 30 15:03:13 1998 *************** -*** 17,31 **** - SYS_MODULE= sgi_system - #endif +*** 62,71 **** + #define HIGHLIGHT 1 << 1 + #define ALL_GCS (FOREGROUND | HIGHLIGHT) -! EXTRA_LIBRARIES = $(SUNFLAGS) $(MIPSFLAGS) $(SGIFLAGS) + /* New fields for the PerfChart widget instance record */ - INSTPGMFLAGS = $(INSTKMEMFLAGS) -! LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB) - INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11 -! # INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11 -I/usr/include/bsd -! CDEBUGFLAGS = -O -! SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c nfs.c -! OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o nfs.o + 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) - ComplexProgramTarget(xperfmon++) - ---- 17,38 ---- - SYS_MODULE= sgi_system - #endif - -! #if defined (FreeBSDArchitecture) -! FreeBSDFLAGS= -lkvm -! SYS_MODULE= freebsd_system -! CC= gcc -! EXTRA_DEFINES= -DHAVE_SYS_PARAM_H -! #endif -! -! EXTRA_LIBRARIES = $(SUNFLAGS) $(MIPSFLAGS) $(SGIFLAGS) $(FreeBSDFLAGS) - - INSTPGMFLAGS = $(INSTKMEMFLAGS) -! LOCAL_LIBRARIES = -lXaw -lXt -lXmu -lX11 - INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11 -! # SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c nfs.c -! # OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o nfs.o -! SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c -! OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o - - ComplexProgramTarget(xperfmon++) ++ #define NUM_VALUES 2048 ++ + /* New fields for the PerfChart widget instance record */ -diff -ca ../xperfmon++/README ./README -*** ../xperfmon++/README Wed Jul 27 22:29:30 1994 ---- ./README Sun Dec 21 23:03:44 1997 + 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 *************** -*** 18,20 **** ---- 18,52 ---- - Research Center, rsmith@proteus.arc.nasa.gov. Imake will build for correct - O/S if x11r5 is fully installed in all the right places. +*** 88,99 **** + #define XtCFillRect "FillRect" -+ -+ 3-15-95 Completely new port of systemdependent file (bsd_system.c) for FreeBSD-2.X -+ by Lars Köller @University of Rostock, Germany. -+ E-Mail: <lars.koeller@odie.physik2.uni-rostock.de> -+ -+ 8-16-95 Quick and dirty workaround of -geometry option bug. -+ But there are still some side effects when changing the geometry. -+ Fix memory leak in bsd_system.c -+ by Lars Köller @University of Rostock, Germany. -+ E-Mail: <lars.koeller@odie.physik2.uni-rostock.de> -+ -+ 30-10-95 Change 'Free Mem' graph to 'Free Swap' cause the FreeBSD memory system -+ tries to minimize the free unused amount of memory. -+ Include basic support for FreeBSD > 2.1. -+ Number of interrupts now independent from 'Update Intervall' -+ by Lars Köller @University of Rostock, Germany. -+ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de> -+ -+ 11-12-95 Fix -geometry bug! Now there is only a MIN_WIDTH of 185 pixels, and the -+ MIN_HEIGTH is calculates dynamically depending on the number of active -+ graphs. FreeBSD-2.X only: -+ Change 'Free Swap' graph from absolut into percent values. -+ All graphs shoud be independent of the 'Update Intervall'. -+ Modify graph labels and add unit of each graph. -+ by Lars Köller @University of Rostock, Germany. -+ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de> -+ -+ 5-4-96 Fix some event problems that consumes a lot of cpu power after resizing -+ (mwm) or restart of an window manager. Make xperfmon compile with -+ FreeBSD-current (2.2, changes in get_swapspace) -+ by Lars Köller @University of Rostock, Germany. -+ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de> -diff -ca ../xperfmon++/XPerfmon++.ad ./XPerfmon++.ad -*** ../xperfmon++/XPerfmon++.ad Wed Jul 27 22:29:32 1994 ---- ./XPerfmon++.ad Sun Dec 21 23:03:45 1997 -*************** -*** 4,27 **** - ! commented out, the "NFS Server" graph background will be the application - ! default color, unless some other resource file has specified it. - ! *PerfChart.highAlarm: 99998 - *perfChartIdle.lowWarn: 10 - *perfChartIdle.lowAlarm: 5 -! *perfChartUser.highAlarm: 90 -! *perfChartUser.highWarn: 75 -! *perfChartSystem.highAlarm: 90 -! *perfChartSystem.highWarn: 75 -! *perfChartFree.lowWarn: 2000 -! *perfChartFree.lowAlarm: 1000 -! *perfChartDisk.highWarn: 25 -! *perfChartDisk.highAlarm: 50 -! *perfChartIntrpts.highWarn: 500 -! *perfChartIntrpts.highAlarm: 750 -! *perfChartInput.highWarn: 300 -! *perfChartInput.highAlarm: 500 -! *perfChartOutput.highWarn: 300 -! *perfChartOutput.highAlarm: 500 - *perfChartCollision.highWarn: 20 - *perfChartCollision.highAlarm: 50 -! *perfChartNFSClient.highWarn: 200 -! *perfChartNFSClient.highAlarm: 400 - *font: 6x13 ---- 4,40 ---- - ! commented out, the "NFS Server" graph background will be the application - ! default color, unless some other resource file has specified it. - ! *PerfChart.highAlarm: 99998 -+ *perfChartUser.highAlarm: 95 -+ *perfChartUser.highWarn: 75 -+ -+ *perfChartSystem.highAlarm: 40 -+ *perfChartSystem.highWarn: 25 -+ - *perfChartIdle.lowWarn: 10 - *perfChartIdle.lowAlarm: 5 -! -! *perfChartSwap.lowWarn: 10 -! *perfChartSwap.lowAlarm: 3 -! -! *perfChartDisk.highWarn: 50 -! *perfChartDisk.highAlarm: 100 -! -! *perfChartIntrpts.highWarn: 400 -! *perfChartIntrpts.highAlarm: 600 -! -! *perfChartInput.highWarn: 500 -! *perfChartInput.highAlarm: 1000 -! -! *perfChartOutput.highWarn: 500 -! *perfChartOutput.highAlarm: 1000 -! - *perfChartCollision.highWarn: 20 - *perfChartCollision.highAlarm: 50 -! -! *perfChartNFSClient.highWarn: 100 -! *perfChartNFSClient.highAlarm: 200 -! -! *perfChartNFSServer.highWarn: 100 -! *perfChartNFSServer.highAlarm: 200 - *font: 6x13 -+ - diff -ca ../xperfmon++/xperfmon++.man ./xperfmon++.man -*** ../xperfmon++/xperfmon++.man Wed Jul 27 22:29:39 1994 ---- ./xperfmon++.man Sun Dec 21 23:03:45 1997 -*************** -*** 20,51 **** - The program can produce a filled graph or a line graph and the update interval can be set in - seconds or 100-millisecond intervals. - .PP -! While - .I xperfmon++ - is running, it is possible to perform certain tasks by pressing keys over - the window: - .PP - .br -! .B Q/q: - Quit... Exit gracefully - .br -! .B l | L: - Print out a chart of all current limit settings. This chart will appear in the - window from which xperfmon++ was invoked. - .br -! .B s: - Decrease update interval (slower) by a small amount - .br -! .B S: - Decrease update interval (slower) by a large amount - .br -! .B f: - Increase update interval (faster) by a small amount - .br -! .B F: - Increase update interval (faster) by a large amount - .br -! .B ?: - Help - .SH OPTIONS - .PP ---- 20,51 ---- - The program can produce a filled graph or a line graph and the update interval can be set in - seconds or 100-millisecond intervals. - .PP -! While - .I xperfmon++ - is running, it is possible to perform certain tasks by pressing keys over - the window: - .PP - .br -! .B Q/q: - Quit... Exit gracefully - .br -! .B l | L: - Print out a chart of all current limit settings. This chart will appear in the - window from which xperfmon++ was invoked. - .br -! .B s: - Decrease update interval (slower) by a small amount - .br -! .B S: - Decrease update interval (slower) by a large amount - .br -! .B f: - Increase update interval (faster) by a small amount - .br -! .B F: - Increase update interval (faster) by a large amount - .br -! .B ?: - Help - .SH OPTIONS - .PP -*************** -*** 79,85 **** - .PP - The following options specify the list of statistics to be displayed. - If none are present on the command line, then all statistics are displayed. -! If any "+" options are listed the default list is cleared and only those - listed as "+" options are displayed. - If any "-" options are listed, then they are taken away from the - default list. Specifying both "-" and "+" options will produce unpredictable ---- 79,85 ---- - .PP - The following options specify the list of statistics to be displayed. - If none are present on the command line, then all statistics are displayed. -! If any "+" options are listed the default list is cleared and only those - listed as "+" options are displayed. - If any "-" options are listed, then they are taken away from the - default list. Specifying both "-" and "+" options will produce unpredictable -*************** -*** 94,101 **** - .B \-idlecpu | \+idlecpu - Graph \fIIdle\fP CPU Percentage. - .TP 26 -! .B \-freemem | \+freemem -! Graph \fIFree Memory\fP. - .TP 26 - .B \-diskxfr | \+diskxfr - Graph \fIDisk Transfers\fP per interval period. ---- 94,101 ---- - .B \-idlecpu | \+idlecpu - Graph \fIIdle\fP CPU Percentage. - .TP 26 -! .B \-free{mem/swap} | \+free{mem/swap} -! Graph \fIFree Memory/Swap (Operating system dependent, swap for FreeBSD in %)\fP. - .TP 26 - .B \-diskxfr | \+diskxfr - Graph \fIDisk Transfers\fP per interval period. + #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 *************** -*** 122,132 **** - .sp - \fIxperfmon++\fP will accept a number of \fIlimit\fP options. When a data point - exceeds a high or low limit the background of that graph changes color to visually reflect -! the condition. The background color is an indication of the min (low limit) or max (high limit) - value currently contained - in the graph. When no limit has been exceeded the background color is set to green. If no limits have -! been set for that graph its background color remains the same as the applications default color, -! which is usually white. - .PP - WARNING: High and Low limits are mutually exclusive, i.e., you can set high limits or low limits, but - not both. If both are inadvertently set, the high limits are checked first, and the low limit will be ---- 122,132 ---- - .sp - \fIxperfmon++\fP will accept a number of \fIlimit\fP options. When a data point - exceeds a high or low limit the background of that graph changes color to visually reflect -! the condition. The background color is an indication of the min (low limit) or max (high limit) - value currently contained - in the graph. When no limit has been exceeded the background color is set to green. If no limits have -! been set for that graph its background color remains the same as the applications default color, -! which is usually white. - .PP - WARNING: High and Low limits are mutually exclusive, i.e., you can set high limits or low limits, but - not both. If both are inadvertently set, the high limits are checked first, and the low limit will be +*** 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 *************** -*** 135,141 **** - There are four possible \fIlimit\fP conditions: - .TP 16 - .B High Warning -! When any value in the current graph exceeds the \fIhigh warning\fP limit - the background color of that graph is changed to \fIyellow\fP. - .TP 16 - .B Low Warning ---- 135,141 ---- - There are four possible \fIlimit\fP conditions: - .TP 16 - .B High Warning -! When any value in the current graph exceeds the \fIhigh warning\fP limit - the background color of that graph is changed to \fIyellow\fP. - .TP 16 - .B Low Warning +*** 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 *************** -*** 164,170 **** - .TP 26 - .B \-high*Warn \fIvalue\fP - Set high Warning value for *. -! .PP - Where "*" is one of the following: - .TP 12 - .B user ---- 164,170 ---- - .TP 26 - .B \-high*Warn \fIvalue\fP - Set high Warning value for *. -! .PP - Where "*" is one of the following: - .TP 12 - .B user +*** 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 *************** -*** 176,183 **** - .B idle - Set \fIlimit\fP value for Idle CPU Percentage. - .TP 12 -! .B mem -! Set \fIlimit\fP value for Free Memory. - .TP 12 - .B disk - Set \fIlimit\fP value for Disk Transfers. ---- 176,183 ---- - .B idle - Set \fIlimit\fP value for Idle CPU Percentage. - .TP 12 -! .B mem/swap -! Set \fIlimit\fP value for Free Memory/Swap (OS dependent, swap for FreeBSD). - .TP 12 - .B disk - Set \fIlimit\fP value for Disk Transfers. +*** 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 *************** -*** 206,212 **** - Set \fIlow user Alarm\fP value to 25. - .PP - As with any X-based command line specification you only need specify the minimum number of -! characters required to make the string unique. - See below for a description of setting \fIlimit\fP values using application resource specifications. - .SH TOOLKIT OPTIONS - .PP ---- 206,212 ---- - Set \fIlow user Alarm\fP value to 25. - .PP - As with any X-based command line specification you only need specify the minimum number of -! characters required to make the string unique. - See below for a description of setting \fIlimit\fP values using application resource specifications. - .SH TOOLKIT OPTIONS - .PP +*** 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; *************** -*** 313,320 **** - .B System - Set System CPU Percentage resource. - .TP 16 -! .B Free -! Set Free Memory resource. - .TP 16 - .B Disk - Set Disk Transfer count resource. ---- 313,320 ---- - .B System - Set System CPU Percentage resource. - .TP 16 -! .B Free/Swap -! Set Free Memory/Swap resource. - .TP 16 - .B Disk - Set Disk Transfer count resource. +*** 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 *************** -*** 354,366 **** - .SH BUGS - .I xperfmon++ - requires the ability to open and read the special system file -! .I /dev/kmem. - On most systems, this requires the - .I suid - (set user id) bit to be set with root ownership, or the - .I sgid -! (set group id) bit to be set and membership in the same group as -! .I /dev/kmem. - .PP - Reading /dev/kmem is inherently non-portable. Therefore, the widget upon - which this application is based must be ported to each new operating system. ---- 354,366 ---- - .SH BUGS - .I xperfmon++ - requires the ability to open and read the special system file -! .I /dev/kmem. - On most systems, this requires the - .I suid - (set user id) bit to be set with root ownership, or the - .I sgid -! (set group id) bit to be set and membership in the same group as -! .I /dev/kmem. - .PP - Reading /dev/kmem is inherently non-portable. Therefore, the widget upon - which this application is based must be ported to each new operating system. +*** 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 + *************** -*** 371,377 **** - by fully covering the xperfmon++ window and then exposing it, or by iconifying the - xperfmon++ window and then de-iconifying it. - .SH AUTHORS -! The X11 version of - .I xperfmon - was written by Emanuel Jay Berkenbilt, Project Athena on - 1/21/1988. ---- 371,377 ---- - by fully covering the xperfmon++ window and then exposing it, or by iconifying the - xperfmon++ window and then de-iconifying it. - .SH AUTHORS -! The X11 version of - .I xperfmon - was written by Emanuel Jay Berkenbilt, Project Athena on - 1/21/1988. +*** 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", *************** -*** 381,387 **** - was modified by Thomas Bagli, PCS Computer Systeme GmbH, West Germany, to - be a toolkit-based client. - .PP -! .I xperfmon++ - was created from \fIxperfmon\fP, and the Athena StripChart Widget, - by Roger Smith, Sterling Software @ NASA-Ames Research Center, Moffett Field, California. Version 1.0 - was released in January, 1994. ---- 381,387 ---- - was modified by Thomas Bagli, PCS Computer Systeme GmbH, West Germany, to - be a toolkit-based client. - .PP -! .I xperfmon++ - was created from \fIxperfmon\fP, and the Athena StripChart Widget, - by Roger Smith, Sterling Software @ NASA-Ames Research Center, Moffett Field, California. Version 1.0 - was released in January, 1994. +*** 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", *************** -*** 389,398 **** - If you like this program, or if you have difficulties, I would like to hear your comments. - E-Mail me at rsmith@proteus.arc.nasa.gov. - .PP -! .I xperfmon++ - was written for Suns running SunOs and X11R5 Windows software. If some energetic soul - out there would like to port this program to any other operating system or architecture I would be - glad to incorporate the modifications into this master copy. Send me your changes via E-Mail at the - above address. - .PP - Enjoy! ---- 389,418 ---- - If you like this program, or if you have difficulties, I would like to hear your comments. - E-Mail me at rsmith@proteus.arc.nasa.gov. - .PP -! .I xperfmon++ - was written for Suns running SunOs and X11R5 Windows software. If some energetic soul - out there would like to port this program to any other operating system or architecture I would be - glad to incorporate the modifications into this master copy. Send me your changes via E-Mail at the - above address. -+ .PP -+ .I xperfmon++ V1.2 for FreeBSD -+ was written by Lars Koeller with a lot of helpful notes by Joerg Wunsch. -+ .PP -+ .I xperfmon++ V1.31 for FreeBSD -+ close some memory leaks, fix geometry (resize) bug, display free swap -+ without resizing of graph in percent. -+ .PP -+ .I xperfmon++ V1.33 for FreeBSD -+ contains some fixes due to event problems and compiles fine under -+ FreeBSD 2.2 (changes in get_swapspace). -+ Now the -geometry switch works well! -+ .PP -+ .I xperfmon++ V1.40 for FreeBSD -+ contains some fixes due to changes in the networking structs and -+ cleans up the FreeBSD version number #if's. Now it should compile fine -+ from FreeBSD 2.0 up to FreeBSD-3.0-current. -+ .PP -+ Please E-Mail any bugs or comments with the subject -+ "xperfmon++: ..." to Lars.Koeller@Uni-Bielefeld.DE. - .PP - Enjoy! +*** 183,186 **** +--- 270,274 ---- + "Packets", + "Calls", + "Calls", ++ #endif + }; diff --git a/sysutils/xperfmon/files/patch-ac b/sysutils/xperfmon/files/patch-ac new file mode 100644 index 000000000000..d7f24ea9bc31 --- /dev/null +++ b/sysutils/xperfmon/files/patch-ac @@ -0,0 +1,336 @@ +*** ../xperfmon++/Imakefile Wed Jul 27 22:29:29 1994 +--- ./Imakefile Thu Apr 30 15:03:39 1998 +*************** +*** 17,31 **** + SYS_MODULE= sgi_system + #endif + +! EXTRA_LIBRARIES = $(SUNFLAGS) $(MIPSFLAGS) $(SGIFLAGS) + + INSTPGMFLAGS = $(INSTKMEMFLAGS) +! LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB) + INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11 +! # INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11 -I/usr/include/bsd +! CDEBUGFLAGS = -O +! SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c nfs.c +! OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o nfs.o + + ComplexProgramTarget(xperfmon++) + +--- 17,38 ---- + SYS_MODULE= sgi_system + #endif + +! #if defined (FreeBSDArchitecture) +! FreeBSDFLAGS= -lkvm +! SYS_MODULE= freebsd_system +! CC= gcc +! EXTRA_DEFINES= -DHAVE_SYS_PARAM_H +! #endif +! +! EXTRA_LIBRARIES = $(SUNFLAGS) $(MIPSFLAGS) $(SGIFLAGS) $(FreeBSDFLAGS) + + INSTPGMFLAGS = $(INSTKMEMFLAGS) +! LOCAL_LIBRARIES = -lXaw -lXt -lXmu -lX11 + INCLUDES = -I. -I$(TOOLKITSRC) -I$(TOP) -I$(TOP)/X11 +! # SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c nfs.c +! # OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o nfs.o +! SRCS = TimeChart.c StripChart.c misc.c $(SYS_MODULE).c xperfmon.c +! OBJS = TimeChart.o StripChart.o misc.o $(SYS_MODULE).o xperfmon.o + + ComplexProgramTarget(xperfmon++) + +*** ../xperfmon++/README Wed Jul 27 22:29:30 1994 +--- ./README Thu Apr 30 15:03:39 1998 +*************** +*** 18,20 **** +--- 18,58 ---- + Research Center, rsmith@proteus.arc.nasa.gov. Imake will build for correct + O/S if x11r5 is fully installed in all the right places. + ++ ++ 3-15-95 Completely new port of systemdependent file (bsd_system.c) for FreeBSD-2.X ++ by Lars Köller @University of Rostock, Germany. ++ E-Mail: <lars.koeller@odie.physik2.uni-rostock.de> ++ ++ 8-16-95 Quick and dirty workaround of -geometry option bug. ++ But there are still some side effects when changing the geometry. ++ Fix memory leak in bsd_system.c ++ by Lars Köller @University of Rostock, Germany. ++ E-Mail: <lars.koeller@odie.physik2.uni-rostock.de> ++ ++ 30-10-95 Change 'Free Mem' graph to 'Free Swap' cause the FreeBSD memory system ++ tries to minimize the free unused amount of memory. ++ Include basic support for FreeBSD > 2.1. ++ Number of interrupts now independent from 'Update Intervall' ++ by Lars Köller @University of Rostock, Germany. ++ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de> ++ ++ 11-12-95 Fix -geometry bug! Now there is only a MIN_WIDTH of 185 pixels, and the ++ MIN_HEIGTH is calculates dynamically depending on the number of active ++ graphs. FreeBSD-2.X only: ++ Change 'Free Swap' graph from absolut into percent values. ++ All graphs shoud be independent of the 'Update Intervall'. ++ Modify graph labels and add unit of each graph. ++ by Lars Köller @University of Rostock, Germany. ++ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de> ++ ++ 5-4-96 Fix some event problems that consumes a lot of cpu power after resizing ++ (mwm) or restart of an window manager. Make xperfmon compile with ++ FreeBSD-current (2.2, changes in get_swapspace) ++ by Lars Köller @University of Rostock, Germany. ++ E-Mail: <Lars_Koeller@odie.physik2.uni-rostock.de> ++ ++ 4-30-98 Add System Load graph ++ Add CPU Nice and Interrupt graph ++ Compiles on FreeBSD-2.2.X and 3.X ++ by Lars Köller @University of Bielefeld, Germany. ++ E-Mail: Lars.Koeller@Uni-Bielefeld.DE +*** ../xperfmon++/XPerfmon++.ad Wed Jul 27 22:29:32 1994 +--- ./XPerfmon++.ad Thu Aug 13 18:58:32 1998 +*************** +*** 4,27 **** + ! commented out, the "NFS Server" graph background will be the application + ! default color, unless some other resource file has specified it. + ! *PerfChart.highAlarm: 99998 + *perfChartIdle.lowWarn: 10 + *perfChartIdle.lowAlarm: 5 +! *perfChartUser.highAlarm: 90 +! *perfChartUser.highWarn: 75 +! *perfChartSystem.highAlarm: 90 +! *perfChartSystem.highWarn: 75 +! *perfChartFree.lowWarn: 2000 +! *perfChartFree.lowAlarm: 1000 +! *perfChartDisk.highWarn: 25 +! *perfChartDisk.highAlarm: 50 +! *perfChartIntrpts.highWarn: 500 +! *perfChartIntrpts.highAlarm: 750 +! *perfChartInput.highWarn: 300 +! *perfChartInput.highAlarm: 500 +! *perfChartOutput.highWarn: 300 +! *perfChartOutput.highAlarm: 500 + *perfChartCollision.highWarn: 20 + *perfChartCollision.highAlarm: 50 +! *perfChartNFSClient.highWarn: 200 +! *perfChartNFSClient.highAlarm: 400 + *font: 6x13 +--- 4,50 ---- + ! commented out, the "NFS Server" graph background will be the application + ! default color, unless some other resource file has specified it. + ! *PerfChart.highAlarm: 99998 ++ ++ ! Remember Load*100 is shown in the graph! ++ *perfChartLoad.highAlarm: 800 ++ *perfChartLoad.highWarn: 400 ++ ++ *perfChartUser.highAlarm: 95 ++ *perfChartUser.highWarn: 75 ++ ++ *perfChartNice.highAlarm: 75 ++ *perfChartNice.highWarn: 55 ++ ++ *perfChartSystem.highAlarm: 40 ++ *perfChartSystem.highWarn: 25 ++ ++ *perfChartInter.highAlarm: 40 ++ *perfChartInter.highWarn: 25 ++ + *perfChartIdle.lowWarn: 10 + *perfChartIdle.lowAlarm: 5 +! +! *perfChartSwap.lowWarn: 20 +! *perfChartSwap.lowAlarm: 10 +! +! *perfChartDisk.highWarn: 50 +! *perfChartDisk.highAlarm: 100 +! +! *perfChartIntrpts.highWarn: 400 +! *perfChartIntrpts.highAlarm: 600 +! +! *perfChartInput.highWarn: 500 +! *perfChartInput.highAlarm: 1000 +! +! *perfChartOutput.highWarn: 500 +! *perfChartOutput.highAlarm: 1000 +! + *perfChartCollision.highWarn: 20 + *perfChartCollision.highAlarm: 50 +! +! *perfChartNFSClient.highWarn: 100 +! *perfChartNFSClient.highAlarm: 200 +! +! *perfChartNFSServer.highWarn: 100 +! *perfChartNFSServer.highAlarm: 200 + *font: 6x13 +*** ../xperfmon++/xperfmon++.man Wed Jul 27 22:29:39 1994 +--- ./xperfmon++.man Thu Apr 30 15:03:39 1998 +*************** +*** 85,101 **** + default list. Specifying both "-" and "+" options will produce unpredictable + results. + .TP 26 + .B \-usercpu | \+usercpu + Graph percentage of \fIUser CPU Time\fP. + .TP 26 + .B \-systemcpu | \+systemcpu +! Graph \fISystem\fP CPU Percentage. + .TP 26 + .B \-idlecpu | \+idlecpu +! Graph \fIIdle\fP CPU Percentage. + .TP 26 +! .B \-freemem | \+freemem +! Graph \fIFree Memory\fP. + .TP 26 + .B \-diskxfr | \+diskxfr + Graph \fIDisk Transfers\fP per interval period. +--- 85,110 ---- + default list. Specifying both "-" and "+" options will produce unpredictable + results. + .TP 26 ++ .B \-sysload | \+sysload ++ Graph percentage of \fISystem Load\fP (avaraged over 1 minute). ++ .TP 26 + .B \-usercpu | \+usercpu + Graph percentage of \fIUser CPU Time\fP. + .TP 26 ++ .B \-nicecpu | \+nicecpu ++ Graph percentage of \fINice CPU Time\fP. ++ .TP 26 + .B \-systemcpu | \+systemcpu +! Graph percentage of \fISystem CPU Time\fP. +! .TP 26 +! .B \-intercpu | \+intercpu +! Graph percentage of \fIInterrupt CPU Time\fP. + .TP 26 + .B \-idlecpu | \+idlecpu +! Graph percentage of \fIIdle CPU Time\fP. + .TP 26 +! .B \-free{mem/swap} | \+free{mem/swap} +! Graph \fIFree Memory/Swap (Operating system dependent, swap for FreeBSD in %)\fP. + .TP 26 + .B \-diskxfr | \+diskxfr + Graph \fIDisk Transfers\fP per interval period. +*************** +*** 167,183 **** + .PP + Where "*" is one of the following: + .TP 12 + .B user + Set \fIlimit\fP value for User CPU Percentage. + .TP 12 + .B sys + Set \fIlimit\fP value for System CPU Percentage. + .TP 12 + .B idle + Set \fIlimit\fP value for Idle CPU Percentage. + .TP 12 +! .B mem +! Set \fIlimit\fP value for Free Memory. + .TP 12 + .B disk + Set \fIlimit\fP value for Disk Transfers. +--- 176,201 ---- + .PP + Where "*" is one of the following: + .TP 12 ++ .B load ++ Set \fIlimit\fP value for Load Average (multiplied by 100!!!). ++ .TP 12 + .B user + Set \fIlimit\fP value for User CPU Percentage. + .TP 12 ++ .B nice ++ Set \fIlimit\fP value for Nice CPU Percentage. ++ .TP 12 + .B sys + Set \fIlimit\fP value for System CPU Percentage. + .TP 12 ++ .B inter ++ Set \fIlimit\fP value for Interrupt CPU Percentage. ++ .TP 12 + .B idle + Set \fIlimit\fP value for Idle CPU Percentage. + .TP 12 +! .B mem/swap +! Set \fIlimit\fP value for Free Memory/Swap (OS dependent, swap for FreeBSD). + .TP 12 + .B disk + Set \fIlimit\fP value for Disk Transfers. +*************** +*** 304,320 **** + .PP + Where "&" is one of the following (Note: \fICase\fP IS important): + .TP 16 +! .B Idle +! Set Idle CPU Percentage resource. + .TP 16 + .B User + Set User CPU Percentage resource. + .TP 16 + .B System + Set System CPU Percentage resource. + .TP 16 +! .B Free +! Set Free Memory resource. + .TP 16 + .B Disk + Set Disk Transfer count resource. +--- 322,347 ---- + .PP + Where "&" is one of the following (Note: \fICase\fP IS important): + .TP 16 +! .B Load +! Set System Load resource. + .TP 16 + .B User + Set User CPU Percentage resource. + .TP 16 ++ .B Nice ++ Set Nice CPU Percentage resource. ++ .TP 16 + .B System + Set System CPU Percentage resource. + .TP 16 +! .B Inter +! Set Interrupt CPU Percentage resource. +! .TP 16 +! .B Idle +! Set Idle CPU Percentage resource. +! .TP 16 +! .B Free/Swap +! Set Free Memory/Swap resource. + .TP 16 + .B Disk + Set Disk Transfer count resource. +*************** +*** 394,398 **** +--- 421,449 ---- + out there would like to port this program to any other operating system or architecture I would be + glad to incorporate the modifications into this master copy. Send me your changes via E-Mail at the + above address. ++ .PP ++ .I xperfmon++ V1.2 for FreeBSD ++ was written by Lars Köller with a lot of helpful notes by Jörg Wunsch. ++ .PP ++ .I xperfmon++ V1.31 for FreeBSD ++ close some memory leaks, fix geometry (resize) bug, display free swap ++ without resizing of graph in percent. ++ .PP ++ .I xperfmon++ V1.33 for FreeBSD ++ contains some fixes due to event problems and compiles fine under ++ FreeBSD 2.2 (changes in get_swapspace). ++ Now the -geometry switch works well! ++ .PP ++ .I xperfmon++ V1.40 for FreeBSD ++ contains some fixes due to changes in the networking structs and ++ cleans up the FreeBSD version number #if's. Now it should compile fine ++ from FreeBSD 2.0 up to FreeBSD-3.0-current. ++ .PP ++ .I xperfmon++ V2.0 for FreeBSD 2.2.X and 3.0 ++ added System Load, Nice and Interrupt CPU graphs. ++ Should compile fine from FreeBSD 2.2 up to FreeBSD-3.0-current. ++ .PP ++ Please E-Mail any bugs or comments with the subject ++ "xperfmon++: ..." to Lars.Koeller@Uni-Bielefeld.DE. + .PP + Enjoy! diff --git a/sysutils/xperfmon/pkg-descr b/sysutils/xperfmon/pkg-descr index 7002ec218c92..34dcd3d4a811 100644 --- a/sysutils/xperfmon/pkg-descr +++ b/sysutils/xperfmon/pkg-descr @@ -1,8 +1,38 @@ -This package contains the binary release of xperfmon++ V1.40 a X based -system performance meter for several systems, ported to FreeBSD 2.X. +This package contains the binary release of xperfmon++ V2.0 a X based +system performance meter for several systems, ported to FreeBSD 2.2.X +and FreeBSD-3.X. -The program monitors user-, system-, idle-cputime, free swap, disk io, -number of interrupts, network-input, -output, -collision packets and -NFS client and server activity. +The program monitors: + system load, user-, nice-, system-, interrupt-, idle-cputime, + free swap, disk io, number of interrupts, + network-input, -output, -collision packets and + NFS client and server activity. Please send BUGS and annotations to: Lars.Koeller@Uni-Bielefeld.DE + +Major changes in xperfmon++ V1.3 due to xperfmon++ V1.1: + + - Clean fix of the -geometry option bug, now there is only + a MIN_WIDTH of 185 pixels. The MIN_HEIGTH is calculated + dynamically out of the number of active graphs. + - Display 'Free Swap' in percent without resizing of the graph + - Close some memory leaks + - Display unit of graph in label field. + +Changes from xperfmon++ V1.3 to xperfmon++ V1.33: + + - Fix event bug when resizing or moving the window. + (High cpu consumption when running xperfmon++ with mwm) + - Changes in get_swapspace to compile with FreeBSD 2.2 (-current) + +Changes from xperfmon++ V1.33 to xperfmon++ V1.40: + + - Fix -geometry option. Changing the size of the window now wokes + well. The start frame of the window has the correct size. + - Changes in freebsd_system.c to compile with FreeBSD 30-current. + - Clean the FreeBSD version number #if's + +Changes from xperfmon++ V1.40 to xperfmon++ V2.0: + + - Add System Load graph + - Add Nice and Interrupt CPU percentage graph |