diff options
author | vd <vd@FreeBSD.org> | 2006-11-09 16:55:20 +0800 |
---|---|---|
committer | vd <vd@FreeBSD.org> | 2006-11-09 16:55:20 +0800 |
commit | 8b9bdb99beb12ee0b3f2bcf1956190874794acb3 (patch) | |
tree | 1d0270b216d87090a9c5770f4cb51ef30ad7f027 /sysutils | |
parent | a3c1b360c6a45b2441b7a7e95ac014cbffd8a988 (diff) | |
download | freebsd-ports-gnome-8b9bdb99beb12ee0b3f2bcf1956190874794acb3.tar.gz freebsd-ports-gnome-8b9bdb99beb12ee0b3f2bcf1956190874794acb3.tar.zst freebsd-ports-gnome-8b9bdb99beb12ee0b3f2bcf1956190874794acb3.zip |
Remove expired ports:
2006-11-05 deskutils/offix-trash: development ceased in 1996
2006-11-04 devel/mingw: use mingw32-* ports instead
2006-11-04 devel/mingw-binutils: use mingw32-* ports instead
2006-11-04 devel/mingw-bin-msvcrt: use mingw32-* ports instead
2006-11-04 devel/mingw-gcc: use mingw32-* ports instead
2006-11-04 devel/mingw-opengl-headers: use mingw32-* ports instead
2006-11-05 editors/offix-editor: developement ceased in 1996
2006-11-05 print/offix-printer: development ceased in 1996
2006-11-05 sysutils/wmmon: no longer available from mastersite
2006-11-04 sysutils/xsysinfo: no longer available from mastersite
2006-11-04 textproc/xmlada: no longer available from mastersite; 2.0 is available
2006-11-05 www/p5-CGI-Application-ValidateRM: no longer available from mastersites
2006-11-05 x11/offix-clipboard: development ceased in 1996
2006-11-05 x11/offix-execute: development ceased in 1996
2006-11-05 x11-fm/offix-files: development ceased in 1996
2006-11-05 x11-wm/icepref: is for IceWM version 1.04 (6 years old)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 2 | ||||
-rw-r--r-- | sysutils/wmmon/Makefile | 31 | ||||
-rw-r--r-- | sysutils/wmmon/distinfo | 3 | ||||
-rw-r--r-- | sysutils/wmmon/files/patch-aa | 52 | ||||
-rw-r--r-- | sysutils/wmmon/files/patch-ab | 34 | ||||
-rw-r--r-- | sysutils/wmmon/files/patch-ac | 13 | ||||
-rw-r--r-- | sysutils/wmmon/files/patch-ad | 881 | ||||
-rw-r--r-- | sysutils/wmmon/files/patch-ae | 177 | ||||
-rw-r--r-- | sysutils/wmmon/files/patch-af | 76 | ||||
-rw-r--r-- | sysutils/wmmon/pkg-descr | 17 | ||||
-rw-r--r-- | sysutils/wmmon/pkg-plist | 3 | ||||
-rw-r--r-- | sysutils/xsysinfo/Makefile | 33 | ||||
-rw-r--r-- | sysutils/xsysinfo/distinfo | 3 | ||||
-rw-r--r-- | sysutils/xsysinfo/files/patch-sysinfo.c | 324 | ||||
-rw-r--r-- | sysutils/xsysinfo/pkg-descr | 2 |
15 files changed, 0 insertions, 1651 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 573fde01503c..7c93e8c6cef9 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -676,7 +676,6 @@ SUBDIR += wmmemfree SUBDIR += wmmemload SUBDIR += wmmemmon - SUBDIR += wmmon SUBDIR += wmmount SUBDIR += wmpccard SUBDIR += wmshutdown @@ -721,7 +720,6 @@ SUBDIR += xsi SUBDIR += xstow SUBDIR += xsu - SUBDIR += xsysinfo SUBDIR += xsysstats SUBDIR += xvidcap SUBDIR += xwipower diff --git a/sysutils/wmmon/Makefile b/sysutils/wmmon/Makefile deleted file mode 100644 index cd42f5f3d8da..000000000000 --- a/sysutils/wmmon/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# New ports collection makefile for: wmmon -# Date created: 27 November 1998 -# Whom: Kris Kennaway <kkennawa@physics.adelaide.edu.au> -# -# $FreeBSD$ -# - -PORTNAME= wmmon -PORTVERSION= 1.0b2 -PORTREVISION= 1 -CATEGORIES= sysutils windowmaker -MASTER_SITES= # disappeared - -MAINTAINER= ports@FreeBSD.org -COMMENT= WindowMaker dockable system load/performance monitor - -DEPRECATED= no longer available from mastersite -EXPIRATION_DATE=2006-11-05 - -WRKSRC= ${WRKDIR}/wmmon.app/wmmon - -USE_X_PREFIX= yes -USE_XPM= yes - -.if !defined(NOPORTDOCS) -post-install: - ${MKDIR} ${PREFIX}/share/doc/wmmon - ${INSTALL_MAN} ${WRKSRC}/../HINTS ${PREFIX}/share/doc/wmmon -.endif - -.include <bsd.port.mk> diff --git a/sysutils/wmmon/distinfo b/sysutils/wmmon/distinfo deleted file mode 100644 index 4f16926c6905..000000000000 --- a/sysutils/wmmon/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (wmmon-1.0b2.tar.gz) = 1b8c780b8c24a6958c69330fef4171df -SHA256 (wmmon-1.0b2.tar.gz) = 0d34003747b36d47c1f6361675eee982d6eaf458b33f8cf4ecb157e87cdde9bf -SIZE (wmmon-1.0b2.tar.gz) = 21589 diff --git a/sysutils/wmmon/files/patch-aa b/sysutils/wmmon/files/patch-aa deleted file mode 100644 index f1ade06b4e94..000000000000 --- a/sysutils/wmmon/files/patch-aa +++ /dev/null @@ -1,52 +0,0 @@ -*** ../../wmmon.app/wmmon/Makefile.orig Tue May 19 17:13:16 1998 ---- ../../wmmon.app/wmmon/Makefile Mon May 24 21:38:45 1999 -*************** -*** 1,19 **** -! LIBDIR = -L/usr/X11R6/lib -! LIBS = -lXpm -lXext -lX11 -! OBJS = wmmon.o \ -! ../wmgeneral/wmgeneral.o \ -! ../wmgeneral/misc.o \ -! ../wmgeneral/list.o -! - - .c.o: -! cc -c -O2 -Wall $< -o $*.o - -! wmmon: $(OBJS) -! cc -o wmmon $^ $(LIBDIR) $(LIBS) - - clean:: -! for i in $(OBJS) ; do \ -! rm $$i;\ -! done -! rm wmmon ---- 1,28 ---- -! # -! # Makefile for FreeBSD 3.x and 4.0 versions of wmmon -! # -! LIBDIR = -L${X11BASE}/lib -! LIBS = -lXpm -lXext -lX11 -lkvm -ldevstat -! CFLAGS ?= -O2 -! CFLAGS += -I${X11BASE}/include -! OBJS = wmmon.o \ -! ../wmgeneral/wmgeneral.o \ -! ../wmgeneral/misc.o \ -! ../wmgeneral/list.o -! PROG = wmmon - - .c.o: -! ${CC} -c $(CFLAGS) $< -o $*.o -! -! $(PROG): $(OBJS) -! ${CC} -o $@ $> -lXext $(LIBDIR) $(LIBS) - -! all:: $(PROG) - - clean:: -! rm -f $(OBJS) -! rm -f $(PROG) -! -! install:: -! install -c -g kmem -m 2755 -o root $(PROG) ${PREFIX}/bin -! diff --git a/sysutils/wmmon/files/patch-ab b/sysutils/wmmon/files/patch-ab deleted file mode 100644 index ca5cd9ee390d..000000000000 --- a/sysutils/wmmon/files/patch-ab +++ /dev/null @@ -1,34 +0,0 @@ -*** ../../wmmon.app/wmgeneral/list.c.orig Tue May 19 17:13:23 1998 ---- ../../wmmon.app/wmgeneral/list.c Mon May 24 21:26:26 1999 -*************** -*** 44,51 **** - LinkedList* cell; - - cell = (LinkedList*)malloc(sizeof(LinkedList)); -! cell->head = head; -! cell->tail = tail; - return cell; - } - ---- 44,54 ---- - LinkedList* cell; - - cell = (LinkedList*)malloc(sizeof(LinkedList)); -! if (cell) -! { -! cell->head = head; -! cell->tail = tail; -! } - return cell; - } - -*************** -*** 84,89 **** ---- 87,93 ---- - INLINE void - list_remove_head(LinkedList** list) - { -+ if (!list) return; - if (!*list) return; - if ((*list)->tail) - { diff --git a/sysutils/wmmon/files/patch-ac b/sysutils/wmmon/files/patch-ac deleted file mode 100644 index 78d2d262b954..000000000000 --- a/sysutils/wmmon/files/patch-ac +++ /dev/null @@ -1,13 +0,0 @@ -*** ../../wmmon.app/wmgeneral/misc.c.orig Tue May 19 17:13:23 1998 ---- ../../wmmon.app/wmgeneral/misc.c Mon May 24 21:26:26 1999 -*************** -*** 64,69 **** ---- 64,71 ---- - - t = ret = malloc(strlen(word)+1); - ptr = word; -+ -+ if (ret==NULL) return NULL; - - state = 0; - *t = 0; diff --git a/sysutils/wmmon/files/patch-ad b/sysutils/wmmon/files/patch-ad deleted file mode 100644 index 4929f232e2d7..000000000000 --- a/sysutils/wmmon/files/patch-ad +++ /dev/null @@ -1,881 +0,0 @@ -*** wmmon.c.orig Tue May 19 16:13:16 1998 ---- wmmon.c Fri Dec 31 12:05:34 1999 -*************** -*** 28,33 **** ---- 28,44 ---- - Changes: - ---- - -+ 12/01/1999 (Stephen Kiernan, sk-ports@vegamuse.org) -+ * Change to revert to real userid and groupid -+ after kvm_openfiles is accomplished. -+ (Patch from Steve Reid, sreid@sea-to-sky.net) -+ 05/24/1999 (Stephen Kiernan, sk-ports@vegamuse.org) -+ * Ported to FreeBSD 4.0 -+ 12/11/1998 (Stephen Kiernan, sk-ports@vegamuse.org) -+ * Ported to FreeBSD 2.2, 3.0 -+ * Based on code from the FreeBSD 2.2 version of top -+ by Christos Zoulas, Steven Wallace, and -+ Wolfram Schneider - 18/05/1998 (Antoine Nulle, warp@xs4all.nl) - * MEM/SWAP/UPTIME only updated when visible - * Using global file descriptors to reduce file -*************** -*** 72,81 **** ---- 83,109 ---- - #include <fcntl.h> - #include <unistd.h> - -+ #include <errno.h> -+ - #include <sys/wait.h> - #include <sys/param.h> - #include <sys/types.h> - -+ #include <kvm.h> -+ #include <limits.h> -+ #include <osreldate.h> -+ #include <sys/conf.h> -+ #include <sys/dkstat.h> -+ #if __FreeBSD_version >= 300000 -+ #include <devstat.h> -+ #endif -+ #include <sys/sysctl.h> -+ #include <sys/time.h> -+ #if __FreeBSD_version < 400005 -+ #include <sys/rlist.h> -+ #endif -+ #include <sys/vmmeter.h> -+ - #include <X11/Xlib.h> - #include <X11/xpm.h> - #include <X11/extensions/shape.h> -*************** -*** 106,117 **** ---- 134,193 ---- - FILE *fp_stat; - FILE *fp_loadavg; - -+ kvm_t *kvmd = NULL; -+ struct nlist nl[] = { -+ #define N_CNT 0 -+ { "_cnt" }, -+ #define N_BUFSPACE 1 -+ { "_bufspace" }, -+ #define N_CP_TIME 2 -+ { "_cp_time" }, -+ #define N_AVERUN 3 -+ { "_averunnable" }, -+ #if __FreeBSD_version >= 300000 -+ #define N_TK_NIN 4 -+ { "_tk_nin" }, -+ #define N_TK_NOUT 5 -+ { "_tk_nout" }, -+ #else -+ #define N_DK_NDRIVE 4 -+ { "_dk_ndrive" }, -+ #define N_DK_WDS 5 -+ { "_dk_wds" }, -+ #endif -+ #if __FreeBSD_version < 400000 -+ #define VM_SWAPLIST 6 -+ { "_swaplist" }, -+ #define VM_SWDEVT 7 -+ { "_swdevt" }, -+ #define VM_NSWAP 8 -+ { "_nswap" }, -+ #define VM_NSWDEV 9 -+ { "_nswdev" }, -+ #define VM_DMMAX 10 -+ { "_dmmax" }, -+ #endif -+ { "" } -+ }; -+ int psize; -+ int pshift; -+ long *cur_dk_wds; -+ long *last_dk_wds; -+ int ndrives; -+ char errbuf[_POSIX2_LINE_MAX]; -+ static int swappgsin = -1; -+ static int swappgsout = -1; -+ - /* functions */ - void usage(void); - void printversion(void); - void DrawStats(int *, int, int, int, int); - void DrawStats_io(int *, int, int, int, int); - -+ #if defined(__FreeBSD__) || defined(__NetBSD__) -+ int swapmode( long *retavail, long *retfree); -+ #endif /* __FreeBSD__ || __NetBSD__ */ -+ - void wmmon_routine(int, char **); - - void main(int argc, char *argv[]) { -*************** -*** 154,159 **** ---- 230,241 ---- - } - } - -+ if( checkversion() < 0 ) -+ { -+ fprintf( stderr, devstat_errbuf ); -+ exit(1); -+ } -+ - wmmon_routine(argc, argv); - } - -*************** -*** 213,238 **** - long istat; - long idle; - -! FILE *fp; -! char temp[128]; - char *p; - -! int xpm_X = 0, xpm_Y = 0; - - long online_time = 0; - long ref_time = 0; - long cnt_time; - -! -! fp = fopen("/proc/uptime", "r"); -! fp_meminfo = fopen("/proc/meminfo", "r"); -! fp_loadavg = fopen("/proc/loadavg", "r"); -! fp_stat = fopen("/proc/stat", "r"); -! -! if (fp) { -! fscanf(fp, "%ld", &online_time); - ref_time = time(0); -! fclose(fp); - } - - for (i=0; i<MAX_STAT_DEVICES; i++) { ---- 295,363 ---- - long istat; - long idle; - -! int mib[2]; -! size_t size; -! struct timeval boottime; - char *p; - -! int xpm_X = 0, xpm_Y = 0; - - long online_time = 0; - long ref_time = 0; - long cnt_time; - -! mib[0] = CTL_KERN; -! mib[1] = KERN_BOOTTIME; -! size = sizeof(boottime); -! if ((sysctl(mib, 2, &boottime, &size, NULL, 0)!=-1) && -! (boottime.tv_sec != 0)) { - ref_time = time(0); -! online_time = ref_time - boottime.tv_sec + 30; -! } -! -! psize = getpagesize(); -! for (pshift = 0, psize = getpagesize(); psize>1; pshift++, psize>>=1) -! continue; -! pshift -= 10; -! psize = getpagesize(); -! -! if (kvmd==NULL) kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); -! if (kvmd==NULL) { fprintf(stderr, "kvm_openfiles: %s\n", errbuf); exit(errno); } -! -! /* We're sgid kmem. Give up privs. */ -! if (setgid(getgid()) != 0) { perror("setgid"); exit(errno); } -! -! /* If we're suid, give that up too. */ -! if (setuid(getuid()) != 0) { perror("seguid"); exit(errno); } -! -! if (kvmd) { -! if (kvm_nlist(kvmd, nl) >= 0) { -! struct nlist *nlp; -! -! for( nlp = nl; *nlp->n_name != '\0'; nlp++ ) { -! if( nlp->n_type == 0 ) -! fprintf (stderr, "kvm_nlist: Symbol '%s' not found\n", nlp->n_name); -! } -! -! #if __FreeBSD_version >= 300000 -! ndrives = getnumdevs(); -! #else -! if (nl[0].n_type != 0) { -! (void) kvm_read(kvmd, nl[N_DK_NDRIVE].n_value, (char *)&ndrives, sizeof(ndrives)); -! if (ndrives > 0) { -! cur_dk_wds = calloc(ndrives, sizeof(long)); -! last_dk_wds = calloc(ndrives, sizeof(long)); -! bzero(last_dk_wds, sizeof(long) * ndrives); -! } -! #endif -! fprintf (stderr, "Monitoring %d devices for activity.\n", ndrives); -! #if __FreeBSD_version < 300000 -! } -! #endif -! } -! else { -! fprintf( stderr, "kvm_nlist: %s\n", kvm_geterr(kvmd) ); -! } - } - - for (i=0; i<MAX_STAT_DEVICES; i++) { -*************** -*** 246,261 **** - if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION); - if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION); - -! strcpy(temp, "/etc/wmmonrc"); -! parse_rcfile(temp, wmmon_keys); - -! p = getenv("HOME"); -! strcpy(temp, p); -! strcat(temp, "/.wmmonrc"); -! parse_rcfile(temp, wmmon_keys); - -! strcpy(temp, "/etc/wmmonrc.fixed"); -! parse_rcfile(temp, wmmon_keys); - - stat_online = checksysdevs(); - ---- 371,390 ---- - if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION); - if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION); - -! parse_rcfile("/etc/wmmonrc", wmmon_keys); - -! if ((p = getenv("HOME")) != NULL) { -! #define RCFILE "/.wmmonrc" -! int tmpsize = strlen(p) + sizeof(RCFILE) + 1; -! char *tmp = malloc(tmpsize); -! if (tmp != NULL) { -! snprintf(tmp, tmpsize, "%s" RCFILE, p); -! parse_rcfile(tmp, wmmon_keys); -! free(tmp); -! } -! } - -! parse_rcfile("/etc/wmmonrc.fixed", wmmon_keys); - - stat_online = checksysdevs(); - -*************** -*** 484,489 **** ---- 613,623 ---- - st->rt_idle = idle - st->idlelast; - st->idlelast = idle; - -+ /* There's a problem here with values crossing -+ the max long size barrier becoming negative -- -+ things restabilize after some time, but a -+ better solution needs to be designed -+ */ - st->rt_stat = istat - st->statlast; - st->statlast = istat; - -*************** -*** 499,543 **** - - void update_stat_mem(stat_dev *st, stat_dev *st2) { - -! char temp[128]; -! unsigned long free, shared, buffers, cached; - -! freopen("/proc/meminfo", "r", fp_meminfo); -! while (fgets(temp, 128, fp_meminfo)) { -! if (strstr(temp, "Mem:")) { -! sscanf(temp, "Mem: %ld %ld %ld %ld %ld %ld", -! &st->rt_idle, &st->rt_stat, -! &free, &shared, &buffers, &cached); -! st->rt_idle >>= 10; -! st->rt_stat -= buffers+cached; -! st->rt_stat >>= 10; -! // break; -! } -! if (strstr(temp, "Swap:")) { -! sscanf(temp, "Swap: %ld %ld", &st2->rt_idle, &st2->rt_stat); -! st2->rt_idle >>= 10; -! st2->rt_stat >>= 10; -! break; - } - } - } - - void update_stat_swp(stat_dev *st) { - -! char temp[128]; - -! fseek(fp_meminfo, 0, SEEK_SET); -! while (fgets(temp, 128, fp_meminfo)) { -! if (strstr(temp, "Swap:")) { -! sscanf(temp, "Swap: %ld %ld", &st->rt_idle, &st->rt_stat); -! st->rt_idle >>= 10; -! st->rt_stat >>= 10; -! break; - } - } - - } - - /*******************************************************************************\ - |* get_statistics *| - \*******************************************************************************/ ---- 633,887 ---- - - void update_stat_mem(stat_dev *st, stat_dev *st2) { - -! unsigned long buffers; - -! if (kvmd==NULL) kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); -! if (kvmd==NULL) { fprintf(stderr, "kvm_openfiles: %s\n", errbuf); exit(errno); } -! if (kvmd) { -! if (kvm_nlist(kvmd, nl) >= 0) { -! if (nl[0].n_type != 0) { -! static int first_time_done = 0; -! int dpagein, dpageout; -! struct vmmeter sum; -! -! if ((kvm_read(kvmd, nl[N_CNT].n_value, (char *)&sum, sizeof(sum))==sizeof(sum)) && -! (kvm_read(kvmd, nl[N_BUFSPACE].n_value, (char *)&buffers, sizeof(buffers))==sizeof(buffers))) { -! st->rt_idle = (sum.v_page_count - (buffers/psize) - sum.v_wire_count) << pshift; -! st->rt_stat = sum.v_active_count << pshift; -! -! if (swappgsin < 0) { -! dpagein = 0; -! dpageout = 0; -! } -! else { -! dpagein = (sum.v_swappgsin - swappgsin) << pshift; -! dpageout = (sum.v_swappgsout - swappgsout) << pshift; -! } -! swappgsin = sum.v_swappgsin; -! swappgsout = sum.v_swappgsout; -! -! if ((dpagein>0) || (dpageout>0) || (first_time_done==0)) { -! swapmode(&st2->rt_idle, &st2->rt_stat); -! st2->rt_stat = st2->rt_idle - st2->rt_stat; -! } -! first_time_done = 1; -! } -! } - } - } - } - - void update_stat_swp(stat_dev *st) { - -! if (kvmd==NULL) kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); -! if (kvmd==NULL) { fprintf(stderr, "kvm_openfiles: %s\n", errbuf); exit(errno); } -! if (kvmd) { -! if (kvm_nlist(kvmd, nl) >= 0) { -! if (nl[0].n_type != 0) { -! static int first_time_done = 0; -! int dpagein, dpageout; -! -! struct vmmeter sum; -! if (kvm_read(kvmd, nl[N_CNT].n_value, (char *)&sum, sizeof(sum))==sizeof(sum)) { -! if (swappgsin < 0) { -! dpagein = 0; -! dpageout = 0; -! } -! else { -! dpagein = (sum.v_swappgsin - swappgsin) << pshift; -! dpageout = (sum.v_swappgsout - swappgsout) << pshift; -! } -! swappgsin = sum.v_swappgsin; -! swappgsout = sum.v_swappgsout; -! -! if ((dpagein>0) || (dpageout>0) || (first_time_done==0)) { -! swapmode(&st->rt_idle, &st->rt_stat); -! st->rt_stat = st->rt_idle - st->rt_stat; -! } -! first_time_done = 1; -! } -! } -! } -! } -! } -! -! #if __FreeBSD_version < 400000 -! /* -! * swapmode for FreeBSD 2.x and 3.x is based on a program called swapinfo -! * written by Kevin Lahey <kml@rokkaku.atl.ga.us>. -! */ -! -! #define SVAR(var) __STRING(var) /* to force expansion */ -! #define KGET(idx, var) \ -! KGET1(idx, &var, sizeof(var), SVAR(var)) -! #define KGET1(idx, p, s, msg) \ -! KGET2(nl[idx].n_value, p, s, msg) -! #define KGET2(addr, p, s, msg) \ -! if (kvm_read(kvmd, (u_long)(addr), p, s) != s) { \ -! return (0); \ -! } -! #define KGETRET(addr, p, s, msg) \ -! if (kvm_read(kvmd, (u_long)(addr), p, s) != s) { \ -! return (0); \ -! } -! #endif -! -! -! int swapmode( long *retavail, long *retfree) -! { -! int used, avail; -! #if __FreeBSD_version >= 400000 -! struct kvm_swap kvmswap; -! #else -! char *header; -! int hlen, nswap, nswdev, dmmax; -! int i, div, nfree, npfree; -! struct swdevt *sw; -! long blocksize, *perdev; -! u_long ptr; -! struct rlist head; -! # if __FreeBSD_version >= 220000 -! struct rlisthdr swaplist; -! # else -! struct rlist *swaplist; -! # endif -! struct rlist *swapptr; -! #endif -! -! /* -! * Counter for error messages. If we reach the limit, -! * stop reading information from swap devices and -! * return zero. This prevent endless 'bad address' -! * messages. -! */ -! static int warning = 10; -! -! if (warning <= 0) { -! /* a single warning */ -! if (!warning) { -! warning--; -! fprintf(stderr, -! "Too much errors, stop reading swap devices ...\n"); -! (void)sleep(3); -! } -! return(0); -! } -! warning--; /* decrease counter, see end of function */ -! -! #if __FreeBSD_version >= 400000 -! if( kvm_getswapinfo( kvmd, &kvmswap, 1, 0 ) < 0 ) { -! fprintf(stderr, "kvm_getswapinfo failed\n"); -! return(0); -! } -! -! *retavail = avail = kvmswap.ksw_total; -! used = kvmswap.ksw_used; -! *retfree = kvmswap.ksw_total - used; -! #else -! KGET(VM_NSWAP, nswap); -! if (!nswap) { -! fprintf(stderr, "No swap space available\n"); -! return(0); -! } -! -! KGET(VM_NSWDEV, nswdev); -! KGET(VM_DMMAX, dmmax); -! KGET1(VM_SWAPLIST, &swaplist, sizeof(swaplist), "swaplist"); -! if ((sw = (struct swdevt *)malloc(nswdev * sizeof(*sw))) == NULL || -! (perdev = (long *)malloc(nswdev * sizeof(*perdev))) == NULL) -! { -! perror("malloc"); -! exit(1); -! } -! KGET1(VM_SWDEVT, &ptr, sizeof ptr, "swdevt"); -! KGET2(ptr, sw, nswdev * sizeof(*sw), "*swdevt"); - -! /* 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 -! KGET2(swapptr, &head, sizeof(struct rlist), "swapptr"); -! #else -! KGET2(swaplist, &head, sizeof(struct rlist), "swaplist"); -! #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). -+ */ -+ -+ xsize = sw[i].sw_nblks; -+ 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. -+ */ -+ *retavail = avail / 2; -+ *retfree = nfree / 2; -+ used = avail - nfree; -+ free(sw); free(perdev); -+ #endif /* __FreeBSD_version >= 400000 */ -+ -+ /* increase counter, no errors occurs */ -+ warning++; -+ -+ return (int)(((double)used / (double)avail * 100.0) + 0.5); - } - -+ -+ - /*******************************************************************************\ - |* get_statistics *| - \*******************************************************************************/ -*************** -*** 545,554 **** - void get_statistics(char *devname, long *is, long *ds, long *idle) { - - int i; -! char temp[128]; -! char *p; -! char *tokens = " \t\n"; -! float f; - long maxdiskio=0; - - *is = 0; ---- 889,896 ---- - void get_statistics(char *devname, long *is, long *ds, long *idle) { - - int i; -! long averun[3]; -! long cp_time[CPUSTATES]; - long maxdiskio=0; - - *is = 0; -*************** -*** 556,592 **** - *idle = 0; - - if (!strncmp(devname, "cpu", 3)) { -! fseek(fp_stat, 0, SEEK_SET); -! while (fgets(temp, 128, fp_stat)) { -! if (strstr(temp, "cpu")) { -! p = strtok(temp, tokens); -! /* 1..3, 4 == idle, we don't want idle! */ -! for (i=0; i<3; i++) { -! p = strtok(NULL, tokens); -! *ds += atol(p); -! } -! p = strtok(NULL, tokens); -! *idle = atol(p); -! } -! } -! fp_loadavg = freopen("/proc/loadavg", "r", fp_loadavg); -! fscanf(fp_loadavg, "%f", &f); -! *is = (long) (100 * f); - } - - if (!strncmp(devname, "i/o", 3)) { - -! fseek(fp_stat, 0, SEEK_SET); -! while (fgets(temp, 128, fp_stat)) { -! if (strstr(temp, "disk_rio") || strstr(temp, "disk_wio")) { -! p = strtok(temp, tokens); -! /* 1..4 */ -! for (i=0; i<4; i++) { -! p = strtok(NULL, tokens); -! *ds += atol(p); - } - } - } - if (*ds > maxdiskio) maxdiskio = *ds; - } - } ---- 898,1102 ---- - *idle = 0; - - if (!strncmp(devname, "cpu", 3)) { -! if (kvmd==NULL) kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); -! if (kvmd==NULL) { fprintf(stderr, "kvm_openfiles: %s\n", errbuf); exit(errno); } -! if (kvmd) { -! if (kvm_nlist(kvmd, nl) >= 0) { -! if (nl[0].n_type != 0) { -! if ((kvm_read(kvmd, nl[N_CP_TIME].n_value, (char *)&cp_time, sizeof(cp_time))==sizeof(cp_time)) && -! (kvm_read(kvmd, nl[N_AVERUN].n_value, (char *)&averun, sizeof(averun))==sizeof(averun))) { -! *is = (long) (100 * ((double)averun[0] / FSCALE)); -! -! for (i = 0; i < CPUSTATES; i++) { -! if (i != CP_IDLE) *ds += cp_time[i]; -! } -! *idle = cp_time[CP_IDLE]; -! } -! } -! } -! } - } - - if (!strncmp(devname, "i/o", 3)) { -+ #if __FreeBSD_version < 300000 -+ if (kvmd==NULL) kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); -+ if (kvmd==NULL) { fprintf(stderr, "kvm_openfiles: %s\n", errbuf); exit(errno); } -+ if (kvmd) { -+ if (kvm_nlist(kvmd, nl) >= 0) { -+ if (nl[0].n_type != 0) { -+ if (kvm_read(kvmd, nl[N_DK_WDS].n_value, (char *)cur_dk_wds, ndrives * sizeof(long))==(ndrives*sizeof(long))) { -+ for (i = 0; i < ndrives; i++) { -+ *ds += cur_dk_wds[i]; -+ } -+ } -+ } -+ } -+ } -+ #else -+ static int initted = 0; -+ static struct statinfo last; -+ static struct statinfo cur; -+ int ndevs = getnumdevs(); -+ int gotdevs = 0; -+ long generation; -+ int num_devices_specified = 0; -+ int num_selected; -+ int num_selections; -+ int maxshowdevs = 10; -+ int num_matches = 0; -+ struct devstat_match *matches = NULL; -+ struct device_selection *dev_select = NULL; -+ char **specified_devices; -+ long select_generation; -+ -+ if( !initted ) -+ { -+ bzero( &cur, sizeof(cur) ); -+ bzero( &last, sizeof(cur) ); -+ -+ 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) ); -! -! specified_devices = (char **)malloc(sizeof(char *)); -! } -! else -! { -! struct devinfo *tmp; -! -! if (kvmd==NULL) kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf); -! if (kvmd==NULL) -! { -! fprintf(stderr, "kvm_openfiles: %s\n", errbuf); -! exit(errno); -! } -! else -! { -! (void)kvm_read( kvmd, nl[N_TK_NIN].n_value, &cur.tk_nin, -! sizeof(cur.tk_nin) ); -! (void)kvm_read( kvmd, nl[N_TK_NOUT].n_value, &cur.tk_nout, -! sizeof(cur.tk_nout) ); -! (void)kvm_read( kvmd, nl[N_CP_TIME].n_value, -! cur.cp_time, sizeof(cur.cp_time) ); -! } -! -! tmp = last.dinfo; -! memcpy( &last, &cur, sizeof(cur) ); -! cur.dinfo = tmp; -! -! last.busy_time = cur.busy_time; -! } -! -! if( !gotdevs && ( getdevs( &cur ) >= 0 ) ) -! gotdevs = 1; -! -! if( gotdevs ) -! { -! generation = cur.dinfo->generation; -! ndevs = cur.dinfo->numdevs; -! -! if( !initted ) -! { -! selectdevs( &dev_select, &num_selected, &num_selections, -! &select_generation, generation, cur.dinfo->devices, -! ndevs, matches, num_matches, specified_devices, -! num_devices_specified, DS_SELECT_ONLY, maxshowdevs, -! 1 ); -! } -! else -! { -! struct devinfo *tmpinfo; -! long tmp; -! -! switch( getdevs( &cur ) ) -! { -! case 1: -! selectdevs( &dev_select, &num_selected, -! &num_selections, &select_generation, -! generation, cur.dinfo->devices, -! ndevs, matches, num_matches, -! specified_devices, -! num_devices_specified, -! DS_SELECT_ONLY, -! maxshowdevs, 1 ); -! -! if (kvmd==NULL) -! { -! fprintf(stderr, "kvm_openfiles: %s\n", errbuf); -! exit(errno); -! } -! else -! { -! (void)kvm_read( kvmd, nl[N_TK_NIN].n_value, &cur.tk_nin, -! sizeof(cur.tk_nin) ); -! (void)kvm_read( kvmd, nl[N_TK_NOUT].n_value, &cur.tk_nout, -! sizeof(cur.tk_nout) ); -! (void)kvm_read( kvmd, nl[N_CP_TIME].n_value, -! cur.cp_time, sizeof(cur.cp_time) ); -! } -! -! tmpinfo = last.dinfo; -! memcpy( &last, &cur, sizeof(cur) ); -! cur.dinfo = tmpinfo; -! -! last.busy_time = cur.busy_time; -! break; -! default: -! break; -! } -! -! selectdevs( &dev_select, &num_selected, &num_selections, -! &select_generation, generation, cur.dinfo->devices, -! ndevs, matches, num_matches, specified_devices, -! num_devices_specified, DS_SELECT_ONLY, maxshowdevs, -! 1 ); -! -! tmp = cur.tk_nin; -! cur.tk_nin -= last.tk_nin; -! last.tk_nin = tmp; -! tmp = cur.tk_nout; -! cur.tk_nout -= last.tk_nout; -! last.tk_nout = tmp; -! -! { -! register int dn; -! long double transfers_per_second; -! long double kb_per_transfer, mb_per_second; -! u_int64_t total_bytes, total_transfers, total_blocks; -! long double busy_seconds; -! long double blocks_per_second, ms_per_transaction; -! -! busy_seconds = compute_etime( cur.busy_time, last.busy_time ); -! -! for( dn = 0; dn < ndevs; dn++ ) -! { -! int di = dev_select[dn].position; -! -! if( compute_stats( &cur.dinfo->devices[di], -! &last.dinfo->devices[di], -! busy_seconds, -! &total_bytes, -! &total_transfers, -! &total_blocks, -! &kb_per_transfer, -! &transfers_per_second, -! &mb_per_second, -! &blocks_per_second, -! &ms_per_transaction ) == 0 ) -! { -! *ds += total_blocks; -! } -! } - } - } -+ initted = 1; - } -+ -+ if( dev_select ) -+ free( dev_select ); -+ #endif - if (*ds > maxdiskio) maxdiskio = *ds; - } - } -*************** -*** 597,605 **** - - int checksysdevs(void) { - -! strcpy(stat_device[0].name, "cpu0"); -! strcpy(stat_device[1].name, "i/o"); -! strcpy(stat_device[2].name, "sys"); - - return 3; - } ---- 1107,1115 ---- - - int checksysdevs(void) { - -! strncpy(stat_device[0].name, "cpu0", 5); -! strncpy(stat_device[1].name, "i/o", 5); -! strncpy(stat_device[2].name, "sys", 5); - - return 3; - } -*************** -*** 638,643 **** ---- 1148,1154 ---- - int *p; - int d; - -+ /* printf ("size = %d, num = %d\n", size, num); */ - pixels_per_byte = 100; - p = his; - for (j=0; j<num; j++) { diff --git a/sysutils/wmmon/files/patch-ae b/sysutils/wmmon/files/patch-ae deleted file mode 100644 index 5ba2ce6e413b..000000000000 --- a/sysutils/wmmon/files/patch-ae +++ /dev/null @@ -1,177 +0,0 @@ -*** wmmon.c.orig Sun May 4 21:15:27 2003 ---- wmmon.c Sun May 4 21:16:48 2003 -*************** -*** 93,99 **** ---- 93,104 ---- - #include <limits.h> - #include <osreldate.h> - #include <sys/conf.h> -+ #if __FreeBSD_version < 500101 - #include <sys/dkstat.h> -+ #endif -+ #if __FreeBSD_version >= 500106 -+ #include <sys/resource.h> -+ #endif - #if __FreeBSD_version >= 300000 - #include <devstat.h> - #endif -*************** -*** 190,196 **** - - void wmmon_routine(int, char **); - -! void main(int argc, char *argv[]) { - - int i; - ---- 195,201 ---- - - void wmmon_routine(int, char **); - -! int main(int argc, char *argv[]) { - - int i; - -*************** -*** 230,236 **** ---- 235,245 ---- - } - } - -+ #if __FreeBSD_version >= 500106 -+ if( devstat_checkversion(NULL) < 0 ) -+ #else - if( checkversion() < 0 ) -+ #endif - { - fprintf( stderr, devstat_errbuf ); - exit(1); -*************** -*** 338,345 **** - if( nlp->n_type == 0 ) - fprintf (stderr, "kvm_nlist: Symbol '%s' not found\n", nlp->n_name); - } -! -! #if __FreeBSD_version >= 300000 - ndrives = getnumdevs(); - #else - if (nl[0].n_type != 0) { ---- 347,356 ---- - if( nlp->n_type == 0 ) - fprintf (stderr, "kvm_nlist: Symbol '%s' not found\n", nlp->n_name); - } -! -! #if __FreeBSD_version >= 500106 -! ndrives = devstat_getnumdevs(NULL); -! #elif __FreeBSD_version >= 300000 - ndrives = getnumdevs(); - #else - if (nl[0].n_type != 0) { -*************** -*** 936,942 **** ---- 947,957 ---- - static int initted = 0; - static struct statinfo last; - static struct statinfo cur; -+ #if __FreeBSD_version >= 500106 -+ int ndevs = devstat_getnumdevs(NULL); -+ #else - int ndevs = getnumdevs(); -+ #endif - int gotdevs = 0; - long generation; - int num_devices_specified = 0; -*************** -*** 986,995 **** ---- 1001,1018 ---- - memcpy( &last, &cur, sizeof(cur) ); - cur.dinfo = tmp; - -+ #if __FreeBSD_version >= 500106 -+ last.snap_time = cur.snap_time; -+ #else - last.busy_time = cur.busy_time; -+ #endif - } - -+ #if __FreeBSD_version >= 500106 -+ if( !gotdevs && ( devstat_getdevs( NULL, &cur ) >= 0 ) ) -+ #else - if( !gotdevs && ( getdevs( &cur ) >= 0 ) ) -+ #endif - gotdevs = 1; - - if( gotdevs ) -*************** -*** 999,1005 **** ---- 1022,1032 ---- - - if( !initted ) - { -+ #if __FreeBSD_version >= 500106 -+ devstat_selectdevs( &dev_select, &num_selected, &num_selections, -+ #else - selectdevs( &dev_select, &num_selected, &num_selections, -+ #endif - &select_generation, generation, cur.dinfo->devices, - ndevs, matches, num_matches, specified_devices, - num_devices_specified, DS_SELECT_ONLY, maxshowdevs, -*************** -*** 1010,1019 **** ---- 1037,1054 ---- - struct devinfo *tmpinfo; - long tmp; - -+ #if __FreeBSD_version >= 500106 -+ switch( devstat_getdevs( NULL, &cur ) ) -+ #else - switch( getdevs( &cur ) ) -+ #endif - { - case 1: -+ #if __FreeBSD_version >= 500106 -+ devstat_selectdevs( &dev_select, &num_selected, -+ #else - selectdevs( &dev_select, &num_selected, -+ #endif - &num_selections, &select_generation, - generation, cur.dinfo->devices, - ndevs, matches, num_matches, -*************** -*** 1041,1053 **** ---- 1076,1096 ---- - memcpy( &last, &cur, sizeof(cur) ); - cur.dinfo = tmpinfo; - -+ #if __FreeBSD_version >= 500106 -+ last.snap_time = cur.snap_time; -+ #else - last.busy_time = cur.busy_time; -+ #endif - break; - default: - break; - } - -+ #if __FreeBSD_version >= 500106 -+ devstat_selectdevs( &dev_select, &num_selected, &num_selections, -+ #else - selectdevs( &dev_select, &num_selected, &num_selections, -+ #endif - &select_generation, generation, cur.dinfo->devices, - ndevs, matches, num_matches, specified_devices, - num_devices_specified, DS_SELECT_ONLY, maxshowdevs, -*************** -*** 1068,1074 **** ---- 1111,1121 ---- - long double busy_seconds; - long double blocks_per_second, ms_per_transaction; - -+ #if __FreeBSD_version >= 500106 -+ busy_seconds = cur.snap_time - last.snap_time; -+ #else - busy_seconds = compute_etime( cur.busy_time, last.busy_time ); -+ #endif - - for( dn = 0; dn < ndevs; dn++ ) - { diff --git a/sysutils/wmmon/files/patch-af b/sysutils/wmmon/files/patch-af deleted file mode 100644 index 2c5c66e21430..000000000000 --- a/sysutils/wmmon/files/patch-af +++ /dev/null @@ -1,76 +0,0 @@ ---- wmmon.c.orig Tue Apr 27 11:22:29 2004 -+++ wmmon.c Tue Apr 27 11:22:03 2004 -@@ -186,8 +186,8 @@ - /* functions */ - void usage(void); - void printversion(void); --void DrawStats(int *, int, int, int, int); --void DrawStats_io(int *, int, int, int, int); -+void DrawStats(long *, int, int, int, int); -+void DrawStats_io(long *, int, int, int, int); - - #if defined(__FreeBSD__) || defined(__NetBSD__) - int swapmode( long *retavail, long *retfree); -@@ -255,7 +255,7 @@ - typedef struct { - - char name[5]; /* "cpu0..cpuz", eventually.. :) */ -- int his[55]; -+ long his[55]; - int hisaddcnt; - long rt_stat; - long statlast; -@@ -900,7 +900,11 @@ - void get_statistics(char *devname, long *is, long *ds, long *idle) { - - int i; -+#if defined(__FreeBSD__) -+ double averun[1]; -+#else - long averun[3]; -+#endif - long cp_time[CPUSTATES]; - long maxdiskio=0; - -@@ -915,8 +919,13 @@ - if (kvm_nlist(kvmd, nl) >= 0) { - if (nl[0].n_type != 0) { - if ((kvm_read(kvmd, nl[N_CP_TIME].n_value, (char *)&cp_time, sizeof(cp_time))==sizeof(cp_time)) && -+#if defined(__FreeBSD__) -+ (kvm_getloadavg(kvmd, averun, 1)==1)) { -+ *is = (long) (100 * averun[0]); -+#else - (kvm_read(kvmd, nl[N_AVERUN].n_value, (char *)&averun, sizeof(averun))==sizeof(averun))) { - *is = (long) (100 * ((double)averun[0] / FSCALE)); -+#endif - - for (i = 0; i < CPUSTATES; i++) { - if (i != CP_IDLE) *ds += cp_time[i]; -@@ -1188,11 +1197,11 @@ - |* DrawStats *| - \*******************************************************************************/ - --void DrawStats(int *his, int num, int size, int x_left, int y_bottom) { -+void DrawStats(long *his, int num, int size, int x_left, int y_bottom) { - - int pixels_per_byte; - int j,k; -- int *p; -+ long *p; - int d; - - /* printf ("size = %d, num = %d\n", size, num); */ -@@ -1235,11 +1244,11 @@ - |* DrawStats_io *| - \*******************************************************************************/ - --void DrawStats_io(int *his, int num, int size, int x_left, int y_bottom) { -+void DrawStats_io(long *his, int num, int size, int x_left, int y_bottom) { - - float pixels_per_byte; - int j,k; -- int *p; -+ long *p; - int d; - - static int global_io_scale = 1; diff --git a/sysutils/wmmon/pkg-descr b/sysutils/wmmon/pkg-descr deleted file mode 100644 index 9d11bcd0606f..000000000000 --- a/sysutils/wmmon/pkg-descr +++ /dev/null @@ -1,17 +0,0 @@ -WMMon monitors the realtime CPU load as well the average system load and gives -you some nice additional features too... - -WMMon currently provides: - - * Realtime CPU 'stress' meter; - * Average systemload, like xload & wmavgload; - * Average systemload graphic is autoscaling; - * Realtime Disk I/O 'stress' meter; - * Average Disk I/O load grapic (autoscaling); - * Realtime total Mem & Swap usage meters; - * System uptime display; - * Realtime cycling through all monitor modes; - * Can lauch 3 user definable commands through ~/.wmmonrc; - * Can be started multiple times; - * Commandline options for help (-h), version (-v), - start mode (-i & -s) and display (-d); diff --git a/sysutils/wmmon/pkg-plist b/sysutils/wmmon/pkg-plist deleted file mode 100644 index 576f7f90c9a4..000000000000 --- a/sysutils/wmmon/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/wmmon -share/doc/wmmon/HINTS -@dirrm share/doc/wmmon diff --git a/sysutils/xsysinfo/Makefile b/sysutils/xsysinfo/Makefile deleted file mode 100644 index 1abc28c7cc26..000000000000 --- a/sysutils/xsysinfo/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# New ports collection makefile for: xsysinfo -# Date created: 4 April 1996 -# Whom: jdli -# -# $FreeBSD$ -# - -PORTNAME= xsysinfo -PORTVERSION= 1.4a -PORTREVISION= 3 -CATEGORIES= sysutils -MASTER_SITES= # disappeared - -MAINTAINER= ports@FreeBSD.org -COMMENT= A system information display tool - -DEPRECATED= no longer available from mastersite -EXPIRATION_DATE= 2006-11-04 - -USE_IMAKE= yes -MANCOMPRESSED= yes -MAN1= xsysinfo.1 -PLIST_FILES= bin/xsysinfo - -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:DEFINES =:DEFINES = -DHAVE_DEVSTAT:" Imakefile.in > Imakefile.i1 ; \ - ${SED} -e "s:-lkvm:-lkvm -ldevstat:" Imakefile.i1 > Imakefile ; \ - fi - -.include <bsd.port.mk> diff --git a/sysutils/xsysinfo/distinfo b/sysutils/xsysinfo/distinfo deleted file mode 100644 index 14ae039163b8..000000000000 --- a/sysutils/xsysinfo/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (xsysinfo-1.4a.tar.gz) = 29359c8fc72ad6ab08528c70ca320fff -SHA256 (xsysinfo-1.4a.tar.gz) = 517b6d5b69bb52875c04bbc81b72ba05485b008f9508c2cf5910c77f3369a7eb -SIZE (xsysinfo-1.4a.tar.gz) = 23432 diff --git a/sysutils/xsysinfo/files/patch-sysinfo.c b/sysutils/xsysinfo/files/patch-sysinfo.c deleted file mode 100644 index b4b37105a598..000000000000 --- a/sysutils/xsysinfo/files/patch-sysinfo.c +++ /dev/null @@ -1,324 +0,0 @@ ---- sysinfo.c.orig Tue Oct 6 16:21:18 1998 -+++ sysinfo.c Fri Sep 16 10:30:05 2005 -@@ -13,7 +13,9 @@ - #include <sys/ioctl_compat.h> /* XXX NTTYDISC is too well hidden */ - #include <sys/tty.h> - #include <sys/conf.h> -+#if __FreeBSD_version < 400000 - #include <sys/rlist.h> -+#endif - #include <sys/sysctl.h> - #include <sys/socket.h> - #include <err.h> -@@ -34,8 +36,14 @@ - #include <sys/time.h> - #include <sys/mount.h> - #include <nfs/rpcv2.h> -+#if __FreeBSD_version >= 500000 -+#include <nfs/nfsproto.h> -+#include <nfsclient/nfs.h> -+#include <nfsserver/nfs.h> -+#else - #include <nfs/nfsv2.h> - #include <nfs/nfs.h> -+#endif - #include <osreldate.h> - #include <fcntl.h> - -@@ -95,6 +103,9 @@ - #endif /* HAVE_DEVSTAT */ - - static struct nfsstats nfsstats; -+#if __FreeBSD_version >= 500000 -+static struct nfsrvstats nfsrvstats; -+#endif - static struct _nfsStats { - int nfsServer, nfsClient; - } nfsStats, old_nfsStats; -@@ -102,6 +113,7 @@ - struct nlist nl[] = { - #define X_CP_TIME 0 - { "_cp_time" }, -+#if __FreeBSD_version < 400000 - #define VM_SWAPLIST 1 - { "_swaplist" },/* list of free swap areas */ - #define VM_SWDEVT 2 -@@ -129,6 +141,33 @@ - #define X_DKXFER 12 - { "_dk_xfer" }, - #endif -+#else /* __FreeBSD_version < 400000 */ -+#define VM_DMMAX 1 -+ { "_dmmax" }, /* maximum size of a swap block */ -+#define V_MOUNTLIST 2 -+ { "_mountlist" }, /* address of head of mount list. */ -+#define V_NUMV 3 -+ { "_numvnodes" }, -+#define FNL_NFILE 4 -+/* nfiles changes name to openfiles in FreeBSD 6, -+ and also for a short period of time in RELENG_5 */ -+#if (__FreeBSD_version > 600000) || ((__FreeBSD_version >= 503101) && (__FreeBSD_version < 503105)) -+ {"_openfiles"}, -+#else -+ {"_nfiles"}, -+#endif -+#define FNL_MAXFILE 5 -+ {"_maxfiles"}, -+#define NLMANDATORY FNL_MAXFILE /* names up to here are mandatory */ -+#define X_CNT 6 -+ { "_cnt" }, /* struct vmmeter cnt */ -+#define N_IFNET 7 -+ { "_ifnet" }, -+#ifndef HAVE_DEVSTAT -+#define X_DKXFER 8 -+ { "_dk_xfer" }, -+#endif -+#endif /* __FreeBSD_version < 400000 */ - { "" }, - }; - -@@ -238,6 +277,14 @@ - int pkt_in_out; - int total_xfers=0; - int mib[3], size; -+#if __FreeBSD_version >= 500000 -+ int rvsize; -+ struct xvfsconf vfc; -+#else -+#if (__FreeBSD_version >= 300004) -+ struct vfsconf vfc; -+#endif -+#endif // #if __FreeBSD_version >= 500000 - - /* NPROCS=0, CPU */ - if (cpuflag) { -@@ -356,19 +403,39 @@ - for (i=0; i<10; i++) - states[i] = 0; - size = sizeof(nfsstats); -+#if __FreeBSD_version >= 500000 -+ rvsize = sizeof(nfsrvstats); -+#endif - #if (__FreeBSD_version < 199512) - mib[0] = CTL_FS; - #else - mib[0] = CTL_VFS; - #endif --#if (__FreeBSD_version >= 300003) /* ?? */ -- mib[1] = MNT_EXPORTED; -+#if (__FreeBSD_version >= 300004) -+ if (getvfsbyname("nfs", &vfc) < 0) -+ /* no NFS in the kernel */ -+ goto nfs_out; -+ mib[1] = vfc.vfc_typenum; - #else -- mib[1] = MNT_NFS; -+ mib[1] = MOUNT_NFS; - #endif - mib[2] = NFS_NFSSTATS; -+#if __FreeBSD_version >= 500000 -+ if (sysctl( mib, 3, &nfsstats, &size, NULL, 0) < 0) { -+ return; -+ } -+ else { -+ size_t len = 3; -+ sysctlnametomib("vfs.nfsrv", mib, &len); -+ mib[2] = NFS_NFSRVSTATS; -+ } -+ if (sysctl( mib, 3, &nfsrvstats, &rvsize, NULL, 0) < 0) { -+ return; -+ } -+#else - if (sysctl( mib, 3, &nfsstats, &size, NULL, 0) < 0) - goto nfs_out; -+#endif - else { - old_nfsStats = nfsStats; - -@@ -395,6 +462,22 @@ - #else - nfsstats.rpccnt[NFSPROC_READDIR]; - #endif -+#if __FreeBSD_version >= 500000 -+ nfsStats.nfsServer = nfsrvstats.srvrpccnt[NFSPROC_GETATTR] + -+ nfsrvstats.srvrpccnt[NFSPROC_SETATTR] + -+ nfsrvstats.srvrpccnt[NFSPROC_LOOKUP] + -+ nfsrvstats.srvrpccnt[NFSPROC_READLINK] + -+ nfsrvstats.srvrpccnt[NFSPROC_READ] + -+ nfsrvstats.srvrpccnt[NFSPROC_WRITE] + -+ nfsrvstats.srvrpccnt[NFSPROC_CREATE] + -+ nfsrvstats.srvrpccnt[NFSPROC_REMOVE] + -+ nfsrvstats.srvrpccnt[NFSPROC_RENAME] + -+ nfsrvstats.srvrpccnt[NFSPROC_LINK] + -+ nfsrvstats.srvrpccnt[NFSPROC_SYMLINK] + -+ nfsrvstats.srvrpccnt[NFSPROC_MKDIR] + -+ nfsrvstats.srvrpccnt[NFSPROC_RMDIR] + -+ nfsrvstats.srvrpccnt[NFSPROC_READDIR]; -+#else - nfsStats.nfsServer = nfsstats.srvrpccnt[NFSPROC_GETATTR] + - nfsstats.srvrpccnt[NFSPROC_SETATTR] + - nfsstats.srvrpccnt[NFSPROC_LOOKUP] + -@@ -418,6 +501,7 @@ - #else - nfsstats.srvrpccnt[NFSPROC_READDIR]; - #endif -+#endif // #if __FreeBSD_version >= 500000 - } - scale_bar(250, nfsStats.nfsClient-old_nfsStats.nfsClient, 25, states, 0); - draw_bar(nfsflag-1, states, 10); -@@ -428,7 +512,7 @@ - } - nfs_out: - --} -+;} - - - /* swapmode is derived from freebsd's pstat source ... -@@ -438,6 +522,21 @@ - void - swapmode(int *used, int *avail) - { -+#if __FreeBSD_version >= 400000 -+ /* based on swapmode from /usr/src/usr.bin/top/machine.c */ -+ int n; -+ struct kvm_swap swapary[1]; -+ -+ n = kvm_getswapinfo(kd, swapary, 1, 0); -+ if (n < 0) { -+ *avail = *used = 0; -+ return; -+ } -+ -+ *avail = swapary[0].ksw_total - swapary[0].ksw_used; -+ *used = swapary[0].ksw_used; -+ return; -+#else - char *header; - int hlen, nswap, nswdev, dmmax; - int i, div, nfree, npfree; -@@ -546,6 +645,7 @@ - *used = *avail - nfree; - free(sw); - free(perdev); -+#endif /* __FreeBSD_version >= 400000 */ - } - - /* -@@ -623,13 +723,21 @@ - * Make sure that the userland devstat version matches the kernel - * devstat version. - */ -+#if __FreeBSD_version >= 500000 -+ if (devstat_checkversion(kd) < 0) { -+#else - if (checkversion() < 0) { -+#endif - nodisk++; - return; - } - - /* find out how many devices we have */ -+#if __FreeBSD_version >= 500000 -+ if ((num_devices = devstat_getnumdevs(kd)) < 0) { -+#else - if ((num_devices = getnumdevs()) < 0) { -+#endif - nodisk++; - return; - } -@@ -644,7 +752,11 @@ - * changed here, since it almost certainly has. We only look for - * errors. - */ -+#if __FreeBSD_version >= 500000 -+ if (devstat_getdevs(NULL,&cur) == -1) { -+#else - if (getdevs(&cur) == -1) { -+#endif - nodisk++; - return; - } -@@ -656,7 +768,11 @@ - - /* only interested in disks */ - matches = NULL; -+#if __FreeBSD_version >= 500000 -+ if (devstat_buildmatch("da", &matches, &num_matches) != 0) { -+#else - if (buildmatch("da", &matches, &num_matches) != 0) { -+#endif - nodisk++; - return; - } -@@ -671,7 +787,11 @@ - * 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 __FreeBSD_version >= 500000 -+ if (devstat_selectdevs(&dev_select, &num_selected, -+#else - if (selectdevs(&dev_select, &num_selected, -+#endif - &num_selections, &select_generation, - generation, cur.dinfo->devices, num_devices, - matches, num_matches, -@@ -697,7 +817,11 @@ - * the selection process again, in case a device that we - * were previously displaying has gone away. - */ -+#if __FreeBSD_version >= 500000 -+ switch (devstat_getdevs(NULL,&cur)) { -+#else - switch (getdevs(&cur)) { -+#endif - case -1: - return (0); - case 1: { -@@ -705,7 +829,11 @@ - - num_devices = cur.dinfo->numdevs; - generation = cur.dinfo->generation; -+#if __FreeBSD_version >= 500000 -+ retval = devstat_selectdevs(&dev_select, &num_selected, -+#else - retval = selectdevs(&dev_select, &num_selected, -+#endif - &num_selections, &select_generation, - generation, cur.dinfo->devices, - num_devices, matches, num_matches, -@@ -729,14 +857,22 @@ - * Calculate elapsed time up front, since it's the same for all - * devices. - */ -+#if __FreeBSD_version >= 500000 -+ busy_seconds = cur.snap_time - last.snap_time; -+#else - busy_seconds = compute_etime(cur.busy_time, last.busy_time); -+#endif - - /* 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; -+#if __FreeBSD_version >= 500000 -+ last.snap_time = cur.snap_time; -+#else - last.busy_time = cur.busy_time; -+#endif - return (0); - } - -@@ -764,7 +900,11 @@ - last.dinfo = cur.dinfo; - cur.dinfo = tmp_dinfo; - -+#if __FreeBSD_version >= 500000 -+ last.snap_time = cur.snap_time; -+#else - last.busy_time = cur.busy_time; -+#endif - - } else - /* no disks found ? */ diff --git a/sysutils/xsysinfo/pkg-descr b/sysutils/xsysinfo/pkg-descr deleted file mode 100644 index a786f1ad8f2b..000000000000 --- a/sysutils/xsysinfo/pkg-descr +++ /dev/null @@ -1,2 +0,0 @@ -xsysinfo - display FreeBSD system states (cpu, load, memory, swap, -disk I/O, network packets, NFS client/server) statistics. |