diff options
author | gabor <gabor@FreeBSD.org> | 2007-06-04 23:01:37 +0800 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2007-06-04 23:01:37 +0800 |
commit | f56983099fcca465b58c258e65c7b4c05a7960a7 (patch) | |
tree | 2e78db88d7a93c3ce8947c1ead1b95656c5255e0 /sysutils | |
parent | 9040561a6eaf3a0957bb6e72a54c2e48fc072c1f (diff) | |
download | freebsd-ports-gnome-f56983099fcca465b58c258e65c7b4c05a7960a7.tar.gz freebsd-ports-gnome-f56983099fcca465b58c258e65c7b4c05a7960a7.tar.zst freebsd-ports-gnome-f56983099fcca465b58c258e65c7b4c05a7960a7.zip |
Remove expired ports:
2007-04-27 security/op: no longer available from any mastersite
2007-05-15 shells/bash2: Old, unmaintained version, use shells/bash instead
2007-05-19 sysutils/xperfmon: irrelevant for supported FreeBSD releases
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/xperfmon/Makefile | 41 | ||||
-rw-r--r-- | sysutils/xperfmon/distinfo | 3 | ||||
-rw-r--r-- | sysutils/xperfmon/files/freebsd_system.c | 891 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-aa | 950 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-ab | 312 | ||||
-rw-r--r-- | sysutils/xperfmon/files/patch-ac | 336 | ||||
-rw-r--r-- | sysutils/xperfmon/pkg-descr | 7 | ||||
-rw-r--r-- | sysutils/xperfmon/pkg-plist | 2 | ||||
-rw-r--r-- | sysutils/xperfmon/scripts/configure | 3 |
10 files changed, 0 insertions, 2546 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index a35f93a7e0a6..1a31ca540e5e 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -727,7 +727,6 @@ SUBDIR += xlogmaster SUBDIR += xmbmon SUBDIR += xosview - SUBDIR += xperfmon SUBDIR += xsi SUBDIR += xstow SUBDIR += xsu diff --git a/sysutils/xperfmon/Makefile b/sysutils/xperfmon/Makefile deleted file mode 100644 index 7d2b5bd2d0bd..000000000000 --- a/sysutils/xperfmon/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# New ports collection makefile for: xperfmon++ -# Date created: 14 March 97 -# Whom: Lars Koeller <Lars.Koeller@Uni-Bielefeld.DE> -# -# $FreeBSD$ -# - -PORTNAME= xperfmon++ -PORTVERSION= 2.0 -PORTREVISION= 1 -CATEGORIES= sysutils -MASTER_SITES= http://wwwhomes.uni-bielefeld.de/lkoeller/ - -DISTNAME= xperfmon++v1.1 -EXTRACT_SUFX= .tar.Z - -MAINTAINER= ports@freebsd.org -COMMENT= A graphical X11 system performance monitor - -USE_IMAKE= yes -MAN1= xperfmon++.1 -WRKSRC= ${WRKDIR}/xperfmon++ - -DEPRECATED= irrelevant for supported FreeBSD releases -EXPIRATION_DATE= 2007-05-19 - -.include <bsd.port.pre.mk> - -.if ${OSVERSION} >= 500000 -IGNORE= 5.X or newer systems should use xperfmon3 -.endif - -pre-configure: - if [ -e /usr/lib/libdevstat.a -o -e /usr/lib/aout/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.post.mk> diff --git a/sysutils/xperfmon/distinfo b/sysutils/xperfmon/distinfo deleted file mode 100644 index 33df67cc7f1b..000000000000 --- a/sysutils/xperfmon/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (xperfmon++v1.1.tar.Z) = 37ec5dccd61eae0fd9d6ae91119f7e64 -SHA256 (xperfmon++v1.1.tar.Z) = c18c15c7fdcc79d0d38af8d0b6c26f5c6cdd1cfdb16c5bcb1ab7120e48e9bb0b -SIZE (xperfmon++v1.1.tar.Z) = 87251 diff --git a/sysutils/xperfmon/files/freebsd_system.c b/sysutils/xperfmon/files/freebsd_system.c deleted file mode 100644 index 98d8e738be2c..000000000000 --- a/sysutils/xperfmon/files/freebsd_system.c +++ /dev/null @@ -1,891 +0,0 @@ -/* - * Perfmon Performance Monitor - * - * Copyright 1985, Massachusetts Institute of Technology - * Copyright 1989, PCS Computer Systeme GmbH, West Germany - * Copyright 1994, Sterling Software @ NASA-Ames Research Center - * Copyright 1995, Regents of the University of California, - * Lars Köller <Lars.Koeller@Uni-Bielefeld.DE> - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, 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 PCS and Sterling Software not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. PCS and Sterling Software makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * PCS & STERLING SOFTWARE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL PCS & 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. - * - * Original Author: Emanuel Jay Berkenbilt, MIT Project Athena - * Author: Thomas A. Baghli, PCS Computer Systeme GmbH, West Germany - * tom@meepmeep.pcs.com - * 1994 Revision - * Author: Roger Smith, Sterling Software @ NASA-Ames Research Center - * Moffett Field, California, rsmith@proteus.arc.nasa.gov - * 1995, ... FreeBSD 2.x, 3.x Version - * Author: Lars Köller, Univerity of Bielefeld, Germany - * Lars.Koeller@Uni-Bielefeld.DE - */ - -/* This file contains only system functions - that is the functions that - * get the information the performance monitor is monitoring. No calls - * to any X routines should be made here. The reason for doing this is - * so that as the X toolkit becomes available and the X window system - * improves no changes will have to be made to this file, and as this - * program is made available for a new type of machine, only this file - * will need to be changed. - */ - -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif - -#if (defined(BSD) && (BSD >= 199506)) -# include <osreldate.h> -#else -# error You have to use at least a FreeBSD 2.2.X system -#endif - -#include <X11/IntrinsicP.h> - -#include "system.h" - -#include <stdio.h> -#include <stdlib.h> -#include <strings.h> -#include <unistd.h> -#include <paths.h> -#include <kvm.h> -#include <nlist.h> -#include <limits.h> -#include <errno.h> -#include <err.h> - -#include <sys/file.h> -#include <sys/param.h> -#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 __FreeBSD_version >= 300000 -#include <net/if_var.h> -#endif -#include <netinet/in.h> -#include <sys/stat.h> -#include <sys/conf.h> -#if __FreeBSD_version < 400000 -#include <sys/rlist.h> -#endif -#include <sys/mount.h> -#include <nfs/rpcv2.h> -#include <nfs/nfsv2.h> -#include <nfs/nfs.h> - -#ifndef CTL_FS -#define CTL_FS CTL_VFS /* compatibility w/ Lite1 */ -#endif - -/* - * It's a mess with all these version numbers: - * - * 2.0-RELEASE: 199411 - * 2.1-current's: 199501, 199503 - * 2.0.5-RELEASE: 199504 - * 2.2-current before 2.1: 199508 - * 2.1.0-RELEASE: 199511 - * 2.2-current before 2.1.5: 199512 - * 2.1.5-RELEASE: 199607 - * 2.2-current before 2.1.6: 199608 - * 2.1.6-RELEASE: 199612 - * 2.1.7-RELEASE: 199612 - * 2.2-RELEASE: 220000 (ahhhhh) - * 3.0-current as of Feb 1997: 300000 (ohhhhh) - */ - -/* - * FreeBSD version 2.2 and greater have NFSv3 - */ -#if __FreeBSD_version >= 220000 -# define HAS_NFS_V3 -#endif /* FreeBSD_version */ - -#include "is.h" - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -#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 -*/ -static int get_namelist(const char *kernel_name, const char *memory_name); -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 -*/ -static unsigned long *intrcnt; -static int nintr, hz; -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]; - -static struct packet { - int input, output, collisions; -} packets, old_packets; - -static struct nfsstats nfsstats; -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" }, -#define X_SUM 1 - { "_cnt" }, -#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 - { "_ifnet" }, -#define X_INTRCNT 6 - { "_intrcnt" }, -#define X_EINTRCNT 7 - { "_eintrcnt" }, -#if __FreeBSD_version < 400000 -#define VM_NSWAP 8 - { "_nswap" }, /* size of largest swap device */ -#define VM_NSWDEV 9 - { "_nswdev" }, /* number of swap devices */ -#define VM_DMMAX 10 - { "_dmmax" }, /* maximum size of a swap block */ -#define VM_SWAPLIST 11 - { "_swaplist" },/* list of free swap areas */ -#define VM_SWDEVT 12 - { "_swdevt" }, /* list of swap devices and sizes */ -#endif - { "" }, -}; - -struct { - long time[CPUSTATES]; -#ifndef HAVE_DEVSTAT - long xfer[DK_NDRIVE]; -#endif - struct vmmeter Sum; - struct vmmeter Rate; - int interrupts; -} s, s1; - -int first_time_getswap; - -#define rate s.Rate -#define sum s.Sum - -/* - This routine does all necessary setting up of structures - that will handle system calls. -*/ -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 - the free swapspace! */ - first_time_getswap = 1; - etime = 1.0; -} - - -/* - Update the data structures -*/ -void update_stats() -{ - int state; - double pct, tot, loadavg[3]; - - collect_stats(); - - tot = 0; - for (state = 0; state < CPUSTATES; ++state) - tot += s.time[state]; - if (tot) - 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(); - else { - current_values[FREE_MEM] = 100; - first_time_getswap = 0; - } - } - if (perfmon[DISK_TRANSFERS]) - current_values[DISK_TRANSFERS] = total_disk_transfers(); - if (perfmon[INTERRUPTS]) - current_values[INTERRUPTS] = (s.interrupts - s1.interrupts)/etime; - if (perfmon[INPUT_PACKETS]) - current_values[INPUT_PACKETS] = (packets.input - old_packets.input)/etime; - if (perfmon[OUTPUT_PACKETS]) - current_values[OUTPUT_PACKETS] = (packets.output - old_packets.output)/etime; - if (perfmon[COLLISION_PACKETS]) - current_values[COLLISION_PACKETS] = (packets.collisions - old_packets.collisions)/etime; - if (perfmon[NFS_CLIENT_CALLS]) - current_values[NFS_CLIENT_CALLS] = (nfsStats.nfsClient - old_nfsStats.nfsClient)/etime; - if (perfmon[NFS_SERVER_CALLS]) - current_values[NFS_SERVER_CALLS] = (nfsStats.nfsServer - old_nfsStats.nfsServer)/etime; -} - - -/* - Collect the overall disk transfer rates -*/ -int -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); -} - - -/* - Collect all the data -*/ -void -collect_stats() -{ - off_t ifnetaddr; - register int i, tmp; - int mib[3], size; -#if (__FreeBSD_version >= 300004) - struct vfsconf vfc; -#endif - - 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; - if ((intrcnt = (unsigned long *) malloc((size_t) nintr)) == NULL) - err(1, "xperfmon++ malloc in collect_stats"); - nintr /= sizeof(long); - kread(X_INTRCNT, intrcnt, (size_t) nintr*sizeof(long)); - s1.interrupts = s.interrupts; - s.interrupts = 0; - for (i = 0; i < nintr; i++) - s.interrupts += *(intrcnt + i); - - 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]; - s1.time[i] = tmp; - etime += s.time[i]; - } - if(etime == 0.) - etime = 1.; - etime /= hz; - -/* - Collect the Network-Traffic -*/ - - if ((ifnetaddr = nl[N_IFNET].n_value) != 0) { -#if __FreeBSD_version < 300000 - struct ifnet ifnet; - kread(N_IFNET, &ifnetaddr, sizeof(ifnetaddr)); - old_packets = packets; - packets.input = packets.output = packets.collisions = 0; - while (ifnetaddr) { - kvm_read(kd, ifnetaddr, &ifnet, sizeof ifnet ); - packets.input += ifnet.if_ipackets; - packets.output += ifnet.if_opackets; - packets.collisions += ifnet.if_collisions; - ifnetaddr = (u_long) ifnet.if_next; - } -#else /* 3.0-current, Jan 1997 */ - /* Stolen from netstat/if.c */ - struct ifnet ifnet; - struct ifnethead ifnethead; - u_long ifaddraddr, ifnetfound; - struct ifaddr ifa; - - if(kvm_read(kd, ifnetaddr, (char *)&ifnethead, sizeof ifnethead) == -1) - return; - ifnetaddr = (u_long)ifnethead.tqh_first; - if(kvm_read(kd, ifnetaddr, (char *)&ifnet, sizeof ifnet) == -1) - return; - - old_packets = packets; - packets.input = packets.output = packets.collisions = 0; - ifaddraddr = 0; - while (ifnetaddr || ifaddraddr) { - if (ifaddraddr == 0) { - ifnetfound = ifnetaddr; - if(kvm_read(kd, ifnetaddr, (char *)&ifnet, sizeof ifnet) == -1) - return; - ifnetaddr = (u_long)ifnet.if_link.tqe_next; - ifaddraddr = (u_long)ifnet.if_addrhead.tqh_first; - } - if (kvm_read(kd, ifaddraddr, (char *)&ifa, sizeof ifa) == -1) { - ifaddraddr = 0; - continue; - } - ifaddraddr = (u_long)ifa.ifa_link.tqe_next; - - packets.input += ifnet.if_ipackets; - packets.output += ifnet.if_opackets; - packets.collisions += ifnet.if_collisions; - } -#endif - } - -/* - Collect the NFS and RPC Calls -*/ - - size = sizeof(nfsstats); - mib[0] = CTL_FS; -#if (__FreeBSD_version >= 300004) - if (getvfsbyname("nfs", &vfc) < 0) - /* no NFS in the kernel */ - return; - mib[1] = vfc.vfc_typenum; -#else - mib[1] = MOUNT_NFS; -#endif - mib[2] = NFS_NFSSTATS; - - if (sysctl( mib, 3, &nfsstats, &size, NULL, 0) < 0) - return; - else { - old_nfsStats = nfsStats; - - nfsStats.nfsClient = nfsstats.rpccnt[NFSPROC_GETATTR] + - nfsstats.rpccnt[NFSPROC_SETATTR] + - nfsstats.rpccnt[NFSPROC_LOOKUP] + - nfsstats.rpccnt[NFSPROC_READLINK] + - nfsstats.rpccnt[NFSPROC_READ] + - nfsstats.rpccnt[NFSPROC_WRITE] + - nfsstats.rpccnt[NFSPROC_CREATE] + - nfsstats.rpccnt[NFSPROC_REMOVE] + - nfsstats.rpccnt[NFSPROC_RENAME] + - nfsstats.rpccnt[NFSPROC_LINK] + - nfsstats.rpccnt[NFSPROC_SYMLINK] + - nfsstats.rpccnt[NFSPROC_MKDIR] + - nfsstats.rpccnt[NFSPROC_RMDIR] + - nfsstats.rpccnt[NFSPROC_READDIR] + -#ifndef HAS_NFS_V3 - nfsstats.rpccnt[NFSPROC_STATFS] + - nfsstats.rpccnt[NQNFSPROC_READDIRLOOK] + -#else /* HAS_NFS_V3 */ - nfsstats.rpccnt[NFSPROC_READDIRPLUS] + - nfsstats.rpccnt[NFSPROC_FSSTAT] + - nfsstats.rpccnt[NFSPROC_FSINFO] + - nfsstats.rpccnt[NFSPROC_PATHCONF] + - nfsstats.rpccnt[NFSPROC_COMMIT] + -#endif /* HAS_NFS_V3 */ - nfsstats.rpccnt[NQNFSPROC_GETLEASE] + - nfsstats.rpccnt[NQNFSPROC_VACATED] + - nfsstats.rpccnt[NQNFSPROC_EVICTED]; - - nfsStats.nfsServer = nfsstats.srvrpccnt[NFSPROC_GETATTR] + - nfsstats.srvrpccnt[NFSPROC_SETATTR] + - nfsstats.srvrpccnt[NFSPROC_LOOKUP] + - nfsstats.srvrpccnt[NFSPROC_READLINK] + - nfsstats.srvrpccnt[NFSPROC_READ] + - nfsstats.srvrpccnt[NFSPROC_WRITE] + - nfsstats.srvrpccnt[NFSPROC_CREATE] + - nfsstats.srvrpccnt[NFSPROC_REMOVE] + - nfsstats.srvrpccnt[NFSPROC_RENAME] + - nfsstats.srvrpccnt[NFSPROC_LINK] + - nfsstats.srvrpccnt[NFSPROC_SYMLINK] + - nfsstats.srvrpccnt[NFSPROC_MKDIR] + - nfsstats.srvrpccnt[NFSPROC_RMDIR] + - nfsstats.srvrpccnt[NFSPROC_READDIR] + -#ifndef HAS_NFS_V3 - nfsstats.srvrpccnt[NFSPROC_STATFS] + - nfsstats.srvrpccnt[NQNFSPROC_READDIRLOOK] + -#else /* HAS_NFS_V3 */ - nfsstats.srvrpccnt[NFSPROC_READDIRPLUS] + - nfsstats.srvrpccnt[NFSPROC_FSSTAT] + - nfsstats.srvrpccnt[NFSPROC_FSINFO] + - nfsstats.srvrpccnt[NFSPROC_PATHCONF] + - nfsstats.srvrpccnt[NFSPROC_COMMIT] + -#endif /* HAS_NFS_V3 */ - nfsstats.srvrpccnt[NQNFSPROC_GETLEASE] + - nfsstats.srvrpccnt[NQNFSPROC_VACATED] + - nfsstats.srvrpccnt[NQNFSPROC_EVICTED]; - } -} - - -/* - Reads the nlist from the kernel -*/ -int -get_namelist(kernel_name, memory_name) - const char *kernel_name, *memory_name; -{ - time_t now; - time_t boottime; - register int i, c; - int nintv; - - kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); - if (kd == 0) { - (void)fprintf(stderr, "xperfmon++: kvm_openfiles: %s\n", errbuf); - exit(1); - } - - if ((c = kvm_nlist(kd, nl)) != 0) { - if (c > 0) { - (void)fprintf(stderr,"xperfmon++: undefined symbols:"); - for (c = 0; c < sizeof(nl)/sizeof(nl[0]); c++) - if (nl[c].n_type == 0) - fprintf(stderr, " %s", nl[c].n_name); - (void)fputc('\n', stderr); - } else - (void)fprintf(stderr, "xperfmon++: kvm_nlist: %s\n", kvm_geterr(kd)); exit(1); - } - - kread(X_BOOTTIME, &boottime, sizeof(boottime)); - kread(X_HZ, &hz, sizeof(hz)); - for (i = 0; i < DK_NDRIVE; i++) { - strcpy(dr_name[i], "xx"); - } - time(&now); - nintv = now - boottime; - if (nintv <= 0 || nintv > 60*60*24*365*10) { - fprintf(stderr, - "Time makes no sense... namelist must be wrong.\n"); - exit(1); - } - return(nintv); -} - - -/* - Kread reads something from the kernel, given its nlist index. -*/ -static void -kread(nlx, addr, size) - int nlx; - void *addr; - size_t size; -{ - char *sym; - - if (nl[nlx].n_type == 0 || nl[nlx].n_value == 0) { - sym = nl[nlx].n_name; - if (*sym == '_') - ++sym; - (void)fprintf(stderr, - "xpermon++: symbol %s not defined\n", sym); - exit(1); - } - if (kvm_read(kd, nl[nlx].n_value, addr, size) != size) { - sym = nl[nlx].n_name; - if (*sym == '_') - ++sym; - (void)fprintf(stderr, "xperfmon++: %s: %s\n", sym, kvm_geterr(kd)); - exit(1); - } -} - -/* - * get_swapspace is based on a program called swapinfo written - * by Kevin Lahey <kml@rokkaku.atl.ga.us>. - */ -int -get_swapspace() -{ -#if __FreeBSD_version >= 400000 - /* based on swapmode from /usr/src/usr.bin/top/machine.c */ - int n; - int percentfree; - struct kvm_swap swapary[1]; - - n = kvm_getswapinfo(kd, swapary, 1, 0); - if (n < 0) - return(0); - - percentfree = (int)((((double)swapary[0].ksw_total - - (double)swapary[0].ksw_used) * 100.0) / - (double)swapary[0].ksw_total); - return(percentfree); -#else - char *header; - int hlen, nswap, nswdev, dmmax; - int i, div, avail, nfree, npfree, used; - struct swdevt *sw; - long blocksize, *perdev; - struct rlist head; -#if __FreeBSD_version >= 220000 - struct rlisthdr swaplist; - struct rlist *swapptr; -#else - struct rlist *swaplist; -#endif - u_long ptr; - kread(VM_NSWAP, &nswap, sizeof(nswap)); - kread(VM_NSWDEV, &nswdev, sizeof(nswdev)); - kread(VM_DMMAX, &dmmax, sizeof(dmmax)); - kread(VM_SWAPLIST, &swaplist, sizeof(swaplist)); - if ((sw = malloc(nswdev * sizeof(*sw))) == NULL || - (perdev = malloc(nswdev * sizeof(*perdev))) == NULL) - err(1, "xperfmon++ malloc in get_swapspace"); - kread(VM_SWDEVT, &ptr, sizeof(ptr)); - kvm_read(kd, ptr, sw, nswdev * sizeof(*sw)); - /* Count up swap space. */ - nfree = 0; - memset(perdev, 0, nswdev * sizeof(*perdev)); -#if __FreeBSD_version >= 220000 - swapptr = swaplist.rlh_list; - while (swapptr) { -#else - while (swaplist) { -#endif - int top, bottom, next_block; -#if __FreeBSD_version >= 220000 - kvm_read(kd, (u_long)swapptr, &head, sizeof(struct rlist)); -#else - kvm_read(kd, (u_long)swaplist, &head, sizeof(struct rlist)); -#endif - top = head.rl_end; - bottom = head.rl_start; - - nfree += top - bottom + 1; - - /* - * Swap space is split up among the configured disks. - * - * For interleaved swap devices, the first dmmax blocks - * of swap space some from the first disk, the next dmmax - * blocks from the next, and so on up to nswap blocks. - * - * The list of free space joins adjacent free blocks, - * ignoring device boundries. If we want to keep track - * of this information per device, we'll just have to - * extract it ourselves. - */ - while (top / dmmax != bottom / dmmax) { - next_block = ((bottom + dmmax) / dmmax); - perdev[(bottom / dmmax) % nswdev] += - next_block * dmmax - bottom; - bottom = next_block * dmmax; - } - perdev[(bottom / dmmax) % nswdev] += - top - bottom + 1; -#if __FreeBSD_version >= 220000 - swapptr = head.rl_next; -#else - swaplist = head.rl_next; -#endif - } - - header = getbsize(&hlen, &blocksize); - div = blocksize / 512; - avail = npfree = 0; - for (i = 0; i < nswdev; i++) { - int xsize, xfree; - - /* - * Don't report statistics for partitions which have not - * yet been activated via swapon(8). - */ - if (!(sw[i].sw_flags & SW_FREED)) - continue; - - /* The first dmmax is never allocated to avoid trashing of - * disklabels - */ - xsize = sw[i].sw_nblks - dmmax; - xfree = perdev[i]; - used = xsize - xfree; - npfree++; - avail += xsize; - } - - /* - * If only one partition has been set up via swapon(8), we don't - * need to bother with totals. - */ - used = avail - nfree; - - free(perdev); - free(sw); - return((100*nfree)/avail); /* return free swap in percent */ -#endif /* __FreeBSD_version >= 400000 */ -} - -#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 deleted file mode 100644 index c53c1fc383c6..000000000000 --- a/sysutils/xperfmon/files/patch-aa +++ /dev/null @@ -1,950 +0,0 @@ -*** ../xperfmon++/StripChart.c Wed Jul 27 22:29:30 1994 ---- ./StripChart.c Thu Apr 30 15:03:27 1998 -*************** -*** 53,58 **** ---- 53,70 ---- - #include <X11/StringDefs.h> - #include <X11/Xaw/XawInit.h> - #include "StripCharP.h" -+ -+ #ifdef HAVE_SYS_PARAM_H -+ #include <sys/param.h> -+ #endif -+ -+ #if (defined(BSD) && (BSD >= 199506)) -+ # include <osreldate.h> -+ #else -+ # error You have to use at least a FreeBSD 2.2.X system -+ #endif -+ -+ # include "system.h" - #include <X11/Xfuncs.h> - - #define MS_PER_SEC 100 -*************** -*** 108,114 **** - }; - - #undef offset -! #define LABEL_ROOM 100 - static void Initialize(), Destroy(), Redisplay(), MoveChart(), SetPoints(); - static Boolean SetValues(); - static int repaint_window(); ---- 120,130 ---- - }; - - #undef offset -! #if (defined(BSD) && (BSD >= 199306)) -! # define LABEL_ROOM 80 -! #else -! # define LABEL_ROOM 100 -! #endif - static void Initialize(), Destroy(), Redisplay(), MoveChart(), SetPoints(); - static Boolean SetValues(); - static int repaint_window(); -*************** -*** 215,222 **** ---- 231,253 ---- - static void Initialize (greq, gnew) - Widget greq, gnew; - { -+ int i; -+ - PerfChartWidget w = (PerfChartWidget)gnew; - -+ /* -+ * XXX The missing initializations have been made obvious by FreeBSD 2.2's -+ * new (`phk') malloc that doesn't initialize the malloc'ed areas to 0. -+ * Perhaps more bogons will lurk around, but the floating arithmetic ones -+ * have been the most annoying ones since they most likely cause a trap -+ * at startup time. -+ * -+ * Strange that people in the 90's still rely on malloc() -+ * returning an initialized region. -+ */ -+ for ( i = 0; i < NUM_VALUES; i++ ) -+ w->strip_chart.valuedata[i] = 0.0; -+ - /* if we are working with a mono screen then turn off all warnings and alarms */ - - if ( mono_screen ) { -*************** -*** 343,361 **** - - if ( checkValue >= w->strip_chart.highAlarm ) { /* check for high alarm */ - if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) { -! XtVaSetValues(w, XtNbackground, w->strip_chart.alarmColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.alarmColor; - } - } - else if ( checkValue >= w->strip_chart.highWarn ) { /* check for high warning */ - if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) { -! XtVaSetValues(w, XtNbackground, w->strip_chart.warnColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.warnColor; - } - } - else { - if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */ -! XtVaSetValues(w, XtNbackground, w->strip_chart.okColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.okColor; - } - } ---- 374,392 ---- - - if ( checkValue >= w->strip_chart.highAlarm ) { /* check for high alarm */ - if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) { -! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.alarmColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.alarmColor; - } - } - else if ( checkValue >= w->strip_chart.highWarn ) { /* check for high warning */ - if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) { -! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.warnColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.warnColor; - } - } - else { - if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */ -! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.okColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.okColor; - } - } -*************** -*** 373,391 **** - - if ( checkValue <= w->strip_chart.lowAlarm ) { /* check for low alarm */ - if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) { -! XtVaSetValues(w, XtNbackground, w->strip_chart.alarmColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.alarmColor; - } - } - else if ( checkValue <= w->strip_chart.lowWarn ) { /* check for low warning */ - if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) { -! XtVaSetValues(w, XtNbackground, w->strip_chart.warnColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.warnColor; - } - } - else { - if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */ -! XtVaSetValues(w, XtNbackground, w->strip_chart.okColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.okColor; - } - } ---- 404,422 ---- - - if ( checkValue <= w->strip_chart.lowAlarm ) { /* check for low alarm */ - if ( w->strip_chart.currentBG != w->strip_chart.alarmColor ) { -! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.alarmColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.alarmColor; - } - } - else if ( checkValue <= w->strip_chart.lowWarn ) { /* check for low warning */ - if ( w->strip_chart.currentBG != w->strip_chart.warnColor ) { -! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.warnColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.warnColor; - } - } - else { - if ( w->strip_chart.currentBG != w->strip_chart.okColor ) { /* reset to okColor? */ -! XtVaSetValues((Widget)w, XtNbackground, w->strip_chart.okColor, NULL ); - w->strip_chart.currentBG = w->strip_chart.okColor; - } - } -*************** -*** 448,455 **** - - /* 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; - if (scale < w->strip_chart.min_scale) - scale = w->strip_chart.min_scale; - ---- 479,493 ---- - - /* 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) { -! #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 -+ } - if (scale < w->strip_chart.min_scale) - scale = w->strip_chart.min_scale; - -*************** -*** 479,490 **** - /* draw titles */ - - if ( w->strip_chart.topLabel ) { -! y = w->core.height/2; - x = 4; - XDS(w->strip_chart.topLabel); - } - if ( w->strip_chart.botLabel ) { -! y = (w->core.height/2) + w->strip_chart.font_height; - x = 4; - XDS(w->strip_chart.botLabel); - } ---- 517,528 ---- - /* draw titles */ - - if ( w->strip_chart.topLabel ) { -! y = w->core.height/2 - 2; - x = 4; - XDS(w->strip_chart.topLabel); - } - if ( w->strip_chart.botLabel ) { -! y = (w->core.height/2 - 2) + w->strip_chart.font_height; - x = 4; - XDS(w->strip_chart.botLabel); - } -*** ../xperfmon++/TimeChart.c Wed Jul 27 22:29:31 1994 ---- ./TimeChart.c Thu Apr 30 15:03:27 1998 -*************** -*** 47,52 **** ---- 47,62 ---- - * Moffett Field, California, rsmith@proteus.arc.nasa.gov - ******************************************************************/ - -+ #ifdef HAVE_SYS_PARAM_H -+ #include <sys/param.h> -+ #endif -+ -+ #if (defined(BSD) && (BSD >= 199506)) -+ # include <osreldate.h> -+ #else -+ # 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> -*** ../xperfmon++/misc.c Wed Jul 27 22:29:33 1994 ---- ./misc.c Thu Apr 30 15:03:27 1998 -*************** -*** 22,27 **** ---- 22,38 ---- - * Author: Roger Smith, Sterling Software @ NASA-Ames Research Center - * Moffett Field, California, rsmith@proteus.arc.nasa.gov - */ -+ -+ #ifdef HAVE_SYS_PARAM_H -+ #include <sys/param.h> -+ #endif -+ -+ #if (defined(BSD) && (BSD >= 199506)) -+ # include <osreldate.h> -+ #else -+ # error You have to use at least a FreeBSD 2.2.X system -+ #endif -+ - #include <stdio.h> - - #include <X11/IntrinsicP.h> -*************** -*** 58,64 **** - int i, keycode, length = 0; - /* PerfmonWidget pw = (PerfmonWidget) w;*/ - -! length = XLookupString(event, strbuf, STRBUFSIZE, &keycode, NULL); - switch (keycode) { - case 'Q': - case 'q': ---- 69,75 ---- - int i, keycode, length = 0; - /* PerfmonWidget pw = (PerfmonWidget) w;*/ - -! length = XLookupString((XKeyEvent *)event, strbuf, STRBUFSIZE, (KeySym *)&keycode, NULL); - switch (keycode) { - case 'Q': - case 'q': -*** ../xperfmon++/xperfmon.c Wed Jul 27 22:29:39 1994 ---- ./xperfmon.c Thu Aug 13 18:59:02 1998 -*************** -*** 58,63 **** ---- 58,73 ---- - * - */ - -+ #ifdef HAVE_SYS_PARAM_H -+ #include <sys/param.h> -+ #endif -+ -+ #if (defined(BSD) && (BSD >= 199506)) -+ # include <osreldate.h> -+ #else -+ # 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 **** ---- 109,119 ---- - { NULL, NULL }, - }; - -+ /* LK!!! */ -+ int MIN_HEIGHT=420; -+ #define MIN_WIDTH 185 -+ #define GRAPH_MIN_HEIGHT 28 -+ - #define XtNinterval "interval" - #define XtNcount "count" - #define XtCCount "Count" -*************** -*** 101,120 **** - #define XtCFill "Fill" - #define XtNfast "fast" - #define XtCFast "Fast" -- #define XtNstufAdd "stufAdd" -- #define XtCStufAdd "StufAdd" -- #define XtNstufSub "stufSub" -- #define XtCStufSub "StufSub" - #define XtNdebug "debug" - #define XtCDebug "Debug" - #define XtNusercpuAdd "usercpuAdd" - #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,192 **** - static XrmOptionDescRec optionDescList[] = { - { "-interval", ".interval", XrmoptionSepArg, (caddr_t) NULL}, - { "-immediate", "*PerfChart.immediate", XrmoptionNoArg, "True" }, -! - { "-lowmemAlarm", "*perfChartFree.lowAlarm", XrmoptionSepArg, NULL }, - { "-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 }, - { "-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 __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 - { "-lowuserAlarm", "*perfChartUser.lowAlarm", XrmoptionSepArg, NULL }, - { "-lowuserWarn", "*perfChartUser.lowWarn", XrmoptionSepArg, NULL }, - { "-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 >= 220000 -+ { "-freeswap", XtNfreememSub, XrmoptionNoArg, "True" }, -+ { "+freeswap", XtNfreememAdd, XrmoptionNoArg, "TRUE" }, -+ #else - { "-freemem", XtNfreememSub, XrmoptionNoArg, "True" }, - { "+freemem", XtNfreememAdd, XrmoptionNoArg, "TRUE" }, -+ #endif - { "-diskxfr", XtNdiskxfrSub, XrmoptionNoArg, "True" }, - { "+diskxfr", XtNdiskxfrAdd, XrmoptionNoArg, "TRUE" }, - { "-interrupts", XtNinterruptsSub , XrmoptionNoArg, "True" }, -*************** -*** 253,269 **** - { "+nfsclient", XtNnfsclientAdd, XrmoptionNoArg, "TRUE" }, - { "-nfsserver", XtNnfsserverSub, XrmoptionNoArg, "True" }, - { "+nfsserver", XtNnfsserverAdd, XrmoptionNoArg, "TRUE" }, -- { "-stuf", XtNstufAdd, XrmoptionNoArg, (XtPointer)"True" }, -- { "+stuf", XtNstufSub, XrmoptionNoArg, (XtPointer)"True" }, - }; - - /* Application Resource List - no particular widget */ - - static XtResource resources[] = { -- { XtNstufAdd, XtCStufAdd, XtRBool, sizeof(Bool), -- XtOffsetOf(AppData, addG[1]), XtRImmediate, (XtPointer) NULL }, -- { XtNstufSub, XtCStufSub, XtRBool, sizeof(Bool), -- XtOffsetOf(AppData, subG[0]), XtRImmediate, (XtPointer) NULL }, - { XtNinterval, XtCInterval, XtRInt, sizeof(int), - XtOffsetOf(AppData, interval), XtRImmediate, (caddr_t) DEF_INTERVAL }, - { XtNcount, XtCCount, XtRInt, sizeof(int), ---- 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 **** ---- 410,418 ---- - void - usage() - { -+ #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"); -*************** -*** 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"); - 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"); -+ #endif - 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"); -*************** -*** 361,370 **** - 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"); - 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, " intrpts | input | output | collision | nfsclient | nfsserver]\n"); - fprintf(stderr, " For Example:\n"); -+ #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"); -+ #endif - fprintf(stderr, "WARNING: It is an error condition to set both a high, and a low, limit warning or alarm.\n"); - exit(1); - } -*************** -*** 386,391 **** ---- 495,501 ---- - time(&timeStamp); - return; - } -+ - /*ARGSUSED*/ - void handleResize( w, unused, event, contin2disp ) - Widget w; -*************** -*** 394,400 **** - Boolean *contin2disp; - { - Dimension neww, newh; -! int i; - char eventString[60]; - switch (event->type) { - case Expose: ---- 504,511 ---- - Boolean *contin2disp; - { - Dimension neww, newh; -! Dimension hOverHead, boxH, timeH, newWidgetH; -! int i, window_size_changed; - char eventString[60]; - switch (event->type) { - case Expose: -*************** -*** 403,415 **** - strcpy(eventString,"expose"); - break; - case MapNotify: -! neww=0; -! newh=0; - strcpy(eventString,"map notify"); - break; - case ReparentNotify: -! neww=0; -! newh=0; - strcpy(eventString,"reparent"); - break; - case ConfigureNotify: ---- 514,531 ---- - strcpy(eventString,"expose"); - break; - case MapNotify: -! neww=w->core.width; -! newh=oldHeight; - strcpy(eventString,"map notify"); - break; -+ case UnmapNotify: -+ neww=w->core.width; -+ newh=oldHeight; -+ strcpy(eventString,"unmap notify"); -+ break; - case ReparentNotify: -! neww=w->core.width; -! newh=oldHeight; - strcpy(eventString,"reparent"); - break; - case ConfigureNotify: -*************** -*** 417,429 **** - newh=event->xconfigure.height; - strcpy(eventString,"configure"); - break; - - } -! if ( neww < 250 + 10 ) { -! neww = 250 + 10; -! w->core.width = 250 + 10; - XtResizeWindow(w); -! } - if ( appData.debug ) - printf("Resize Request: type=%d %s, oldw=%hu, oldh=%hu, neww=%hu, newh=%hu\n", - (int)event->type, eventString, ---- 533,567 ---- - newh=event->xconfigure.height; - strcpy(eventString,"configure"); - break; -+ } - -+ if ( neww < MIN_WIDTH ) { -+ neww = MIN_WIDTH; -+ w->core.width = MIN_WIDTH; -+ 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( 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,441 **** - neww, newh); - - if ( event->type == ConfigureNotify ) { -! /* Dimension h = perfmon[0]->core.height;*/ -! Dimension hOverHead = 5 * appData.numGraphsOn; -! Dimension boxH = labelBox->core.height; -! Dimension timeH = timechart->core.height; -! Dimension newWidgetH = (newh - (boxH+8) - (timeH+10) - hOverHead) / appData.numGraphsOn; - if ( oldWidth == neww && oldHeight == newh ) return; - - if ( appData.debug ) ---- 569,575 ---- - neww, newh); - - if ( event->type == ConfigureNotify ) { -! - if ( oldWidth == neww && oldHeight == newh ) return; - - if ( appData.debug ) -*************** -*** 455,460 **** ---- 589,595 ---- - XFlush(XtDisplay(w)); - - } -+ - oldWidth = neww+=10, oldHeight = newh; - return; - } -*************** -*** 464,472 **** - int argc; - char **argv; - { - Arg arg; - Pixmap icon_pixmap = None; -! Widget loadParent, pappaBox; - - char *progname = argv[0]; - Bool foundAnAdd = FALSE; ---- 599,611 ---- - int argc; - char **argv; - { -+ /* LK!!! */ -+ Dimension timeH, newWidgetW, newWidgetH, hOverHead, boxH; -+ unsigned int w, h; -+ - Arg arg; - Pixmap icon_pixmap = None; -! Widget pappaBox; - - char *progname = argv[0]; - Bool foundAnAdd = FALSE; -*************** -*** 478,483 **** ---- 617,626 ---- - optionDescList, XtNumber(optionDescList), - &argc, argv, - NULL, NULL); -+ -+ appData.toplevel->core.width=MIN_WIDTH; -+ appData.toplevel->core.height=MIN_HEIGHT; -+ - if (argc != 1) usage(); - - if ( appData.toplevel->core.depth == 1 ) -*************** -*** 540,561 **** - xperfmon_width, xperfmon_height)); - XtSetValues(appData.toplevel, &arg, 1); - } -- - /* create windows */ - - pappaBox = XtVaCreateManagedWidget("PappaBox", boxWidgetClass, appData.toplevel, - XtNborderWidth, 0, - NULL); -- - XtOverrideTranslations(pappaBox, XtParseTranslationTable(defaultTranslations)); - - (void)gethostname(hostname, sizeof(hostname)); - c = (char *) ((long) &hostname[0] + (int) strlen(hostname)); - sprintf(c, "\nUpdate Interval = %5.1f secs", (float)(appData.interval*appData.ms_per_sec)/1000.0); - - labelBox = XtVaCreateManagedWidget("LabelBox", labelWidgetClass, pappaBox, -! XtNwidth, 250, -! /* XtNheight, 16,*/ - XtNjustify, XtJustifyLeft, - XtNinternalHeight, 0, - XtNtop, XtChainTop, ---- 683,734 ---- - xperfmon_width, xperfmon_height)); - XtSetValues(appData.toplevel, &arg, 1); - } - /* create windows */ - - pappaBox = XtVaCreateManagedWidget("PappaBox", boxWidgetClass, appData.toplevel, - XtNborderWidth, 0, - NULL); - XtOverrideTranslations(pappaBox, XtParseTranslationTable(defaultTranslations)); - - (void)gethostname(hostname, sizeof(hostname)); - c = (char *) ((long) &hostname[0] + (int) strlen(hostname)); - sprintf(c, "\nUpdate Interval = %5.1f secs", (float)(appData.interval*appData.ms_per_sec)/1000.0); - -+ { /* LK!!! handle -geometry option correct, also small changes in handleResize */ -+ Window rwin; -+ int x,y,px,py; -+ unsigned int pw,ph,bw,d; -+ -+ XtRealizeWidget(appData.toplevel); -+ -+ XGetGeometry(XtDisplay(appData.toplevel),XtWindow(appData.toplevel), -+ &rwin,&x,&y,&w,&h,&bw,&d); -+ -+ if ( w > MIN_WIDTH) { -+ newWidgetW = w - 10; -+ appData.toplevel->core.width = w; -+ } else { -+ appData.toplevel->core.width = MIN_WIDTH; -+ newWidgetW = MIN_WIDTH - 10; -+ } -+ -+ hOverHead = (5.6 * appData.numGraphsOn) - (6 / appData.numGraphsOn); -+ boxH = 22; -+ timeH = 12; -+ if (h > GRAPH_MIN_HEIGHT * appData.numGraphsOn + hOverHead + (boxH+7) + (timeH+10)) -+ newWidgetH = (h - hOverHead - (boxH+7) - (timeH+10)) / appData.numGraphsOn; -+ else -+ newWidgetH = GRAPH_MIN_HEIGHT; -+ -+ MIN_HEIGHT = newWidgetH * appData.numGraphsOn + hOverHead + (boxH+7) + (timeH+10); -+ appData.toplevel->core.height = MIN_HEIGHT; -+ -+ XtResizeWindow(appData.toplevel); -+ } -+ - labelBox = XtVaCreateManagedWidget("LabelBox", labelWidgetClass, pappaBox, -! XtNwidth, newWidgetW, -! XtNheight, boxH, - XtNjustify, XtJustifyLeft, - XtNinternalHeight, 0, - XtNtop, XtChainTop, -*************** -*** 570,577 **** - perfmon[i] = XtVaCreateManagedWidget(hostname, perfChartWidgetClass, pappaBox, - XtNtopLabel, topNames[i], - XtNbotLabel, botNames[i], -! XtNwidth, 250, -! XtNheight, 36, - XtNupdate, appData.interval*appData.ms_per_sec, - XtNfillRect, (int)appData.fill, - XtNjumpScroll, 1, ---- 743,750 ---- - perfmon[i] = XtVaCreateManagedWidget(hostname, perfChartWidgetClass, pappaBox, - XtNtopLabel, topNames[i], - XtNbotLabel, botNames[i], -! XtNwidth, newWidgetW, -! XtNheight, newWidgetH, - XtNupdate, appData.interval*appData.ms_per_sec, - XtNfillRect, (int)appData.fill, - XtNjumpScroll, 1, -*************** -*** 580,600 **** - } - timechart = XtVaCreateManagedWidget("timeChart", timeChartWidgetClass, pappaBox, - XtNfromVert, perfmon[1], -! XtNwidth, 250, -! XtNheight, 18, - XtNupdate, appData.interval*appData.ms_per_sec, - XtNjumpScroll, 1, - NULL); - sys_setup(); - XtAddCallback(timechart, XtNgetValue, update_time_stat, NULL); - - for ( i=0; i<NUM_GRAPHS; i++ ) - if ( appData.graphOn[i] ) -! XtAddCallback(perfmon[i], XtNgetValue, update_stat, i); - - appData.interval_id = XtAppAddTimeOut(appData.app_context, - appData.interval*appData.ms_per_sec, start_graphs, (caddr_t) appData.toplevel); - -- XtRealizeWidget(appData.toplevel); - XtAppMainLoop(appData.app_context); - } ---- 753,773 ---- - } - timechart = XtVaCreateManagedWidget("timeChart", timeChartWidgetClass, pappaBox, - XtNfromVert, perfmon[1], -! XtNwidth, newWidgetW, -! XtNheight, timeH, - XtNupdate, appData.interval*appData.ms_per_sec, - XtNjumpScroll, 1, - NULL); -+ - sys_setup(); - XtAddCallback(timechart, XtNgetValue, update_time_stat, NULL); - - 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, - appData.interval*appData.ms_per_sec, start_graphs, (caddr_t) appData.toplevel); - - XtAppMainLoop(appData.app_context); - } diff --git a/sysutils/xperfmon/files/patch-ab b/sysutils/xperfmon/files/patch-ab deleted file mode 100644 index a3d29f3b6d85..000000000000 --- a/sysutils/xperfmon/files/patch-ab +++ /dev/null @@ -1,312 +0,0 @@ -*** ../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 - }; diff --git a/sysutils/xperfmon/files/patch-ac b/sysutils/xperfmon/files/patch-ac deleted file mode 100644 index d7f24ea9bc31..000000000000 --- a/sysutils/xperfmon/files/patch-ac +++ /dev/null @@ -1,336 +0,0 @@ -*** ../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 deleted file mode 100644 index 2067974cc5e9..000000000000 --- a/sysutils/xperfmon/pkg-descr +++ /dev/null @@ -1,7 +0,0 @@ -This package contains xperfmon++ V2.0 a X based system performance meter. - -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. diff --git a/sysutils/xperfmon/pkg-plist b/sysutils/xperfmon/pkg-plist deleted file mode 100644 index 4fc9fe3d29c0..000000000000 --- a/sysutils/xperfmon/pkg-plist +++ /dev/null @@ -1,2 +0,0 @@ -bin/xperfmon++ -lib/X11/app-defaults/XPerfmon++ diff --git a/sysutils/xperfmon/scripts/configure b/sysutils/xperfmon/scripts/configure deleted file mode 100644 index 9604303fdd20..000000000000 --- a/sysutils/xperfmon/scripts/configure +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -cp ${FILESDIR}/freebsd_system.c ${WRKSRC}/freebsd_system.c |