Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Graphical display for the current UVM status.
+24
View File
@@ -0,0 +1,24 @@
# $NetBSD: Makefile,v 1.21 2012/10/23 19:51:39 asau Exp $
#
DISTNAME= ${PKGNAME_NOREV:S/-//}
PKGNAME= xuvmstat-20050909
PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.NetBSD.org/~chuck/gz/
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Graphical display for the current UVM status
ONLY_FOR_PLATFORM= NetBSD-*-*
WRKSRC= ${WRKDIR}/xuvmstat
INSTALLATION_DIRS= bin share/doc/xuvmstat
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xuvmstat ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${PREFIX}/share/doc/xuvmstat
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+3
View File
@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:16:23 joerg Exp $
bin/xuvmstat
share/doc/xuvmstat/LICENSE
+9
View File
@@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.10 2011/09/29 21:00:19 wiz Exp $
SHA1 (xuvmstat20050909.tar.gz) = b8118b1b11c260683ff14fe2200e9ee584f6b7c5
RMD160 (xuvmstat20050909.tar.gz) = 6400ee7e396c410bf22ef9673b27b909f2a29a68
Size (xuvmstat20050909.tar.gz) = 7661 bytes
SHA1 (patch-aa) = 85115066c866198ba3c40b3bf819d68272921cdd
SHA1 (patch-ab) = d68a14dc0a465b1f6e6a3b422f41f677c03b20b6
SHA1 (patch-ac) = e1c71e5f4a1936723a8b591e5fd5543e1f2f8223
SHA1 (patch-ad) = 3e607f136531e486f2404368b3922250cd3b3d8c
+252
View File
@@ -0,0 +1,252 @@
$NetBSD: patch-aa,v 1.10 2011/09/29 21:00:19 wiz Exp $
--- xuvmstat.c.orig 2005-09-09 13:38:48.000000000 +0000
+++ xuvmstat.c
@@ -24,6 +24,7 @@
* xuvmstat.c
*/
+#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
@@ -40,19 +41,19 @@
#include "libcdcx.h"
-void get_uvmexp __P((struct uvmexp *));
+void get_uvmexp __P((struct uvmexp_sysctl *));
void redraw __P((struct xdpy *, Window, GC, int));
u_long black, white, red, green, blue, magenta, orange, purple;
XFontStruct *fnt_fixed, *fnt_8x13bold;
-struct uvmexp cexp, oexp; /* current, old */
+struct uvmexp_sysctl curexp, oexp; /* current, old */
struct timeval tv, otv;
struct graph *gp_faults, *gp_traps, *gp_intrs, *gp_ctx;
#define WIDTH 300
-main(argc, argv)
+int main(argc, argv)
int argc;
char **argv;
@@ -100,7 +101,7 @@ char **argv;
XMapRaised(xdpy.dpy, win);
XFlush(xdpy.dpy);
- get_uvmexp(&cexp);
+ get_uvmexp(&curexp);
gettimeofday(&tv, NULL);
get_uvmexp(&oexp);
gettimeofday(&otv, NULL);
@@ -135,8 +136,8 @@ char **argv;
if (retval == 0) {
timeradd(&now, &incr, &ping);
otv = tv;
- oexp = cexp;
- get_uvmexp(&cexp);
+ oexp = curexp;
+ get_uvmexp(&curexp);
gettimeofday(&tv, NULL);
/* NEW GRAPH DATA HERE */
@@ -186,7 +187,7 @@ int was_timeout;
XSetFont(xdpy->dpy, gc, fnt_fixed->fid);
snprintf(buf, sizeof(buf),"The UVM system manages %d %d-byte pages",
- cexp.npages, cexp.pagesize);
+ curexp.npages, curexp.pagesize);
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
buf, strlen(buf));
y += get_fontheight(fnt_fixed) + 5;
@@ -205,12 +206,12 @@ int was_timeout;
colors[4] = purple;
}
- vals[0] = cexp.active;
- vals[1] = cexp.inactive;
- vals[2] = cexp.free;
- vals[3] = cexp.wired;
- vals[4] = cexp.npages - (vals[0]+vals[1]+vals[2]+vals[3]);
- y = draw_barbox(xdpy, win, gc, fnt_fixed, 5, 295, y, 5, cexp.npages, names,
+ vals[0] = curexp.active;
+ vals[1] = curexp.inactive;
+ vals[2] = curexp.free;
+ vals[3] = curexp.wired;
+ vals[4] = curexp.npages - (vals[0]+vals[1]+vals[2]+vals[3]);
+ y = draw_barbox(xdpy, win, gc, fnt_fixed, 5, 295, y, 5, curexp.npages, names,
vals, colors, white);
}
@@ -229,12 +230,12 @@ int was_timeout;
colors[4] = purple;
}
- vals[0] = cexp.filepages;
- vals[1] = cexp.anonpages;
- vals[2] = cexp.execpages;
- vals[3] = cexp.free;
- vals[4] = cexp.npages - (vals[0]+vals[1]+vals[2]+vals[3]);
- y = draw_barbox(xdpy, win, gc, fnt_fixed, 5, 295, y, 5, cexp.npages, names,
+ vals[0] = curexp.filepages;
+ vals[1] = curexp.anonpages;
+ vals[2] = curexp.execpages;
+ vals[3] = curexp.free;
+ vals[4] = curexp.npages - (vals[0]+vals[1]+vals[2]+vals[3]);
+ y = draw_barbox(xdpy, win, gc, fnt_fixed, 5, 295, y, 5, curexp.npages, names,
vals, colors, white);
}
@@ -245,11 +246,11 @@ int was_timeout;
u_long vals[3];
u_long colors[3];
- vals[0] = cexp.freemin; colors[0] = black;
- vals[1] = cexp.freetarg; colors[1] = black;
- vals[2] = cexp.free; colors[2] = green;
+ vals[0] = curexp.freemin; colors[0] = black;
+ vals[1] = curexp.freetarg; colors[1] = black;
+ vals[2] = curexp.free; colors[2] = green;
- y = draw_barlvl(xdpy, win, gc, fnt_fixed, 5, 295, y, 3, cexp.npages, names,
+ y = draw_barlvl(xdpy, win, gc, fnt_fixed, 5, 295, y, 3, curexp.npages, names,
vals, colors, white);
}
@@ -260,10 +261,10 @@ int was_timeout;
u_long vals[2];
u_long colors[2];
- vals[0] = cexp.inactarg; colors[0] = black;
- vals[1] = cexp.inactive; colors[1] = blue;
+ vals[0] = curexp.inactarg; colors[0] = black;
+ vals[1] = curexp.inactive; colors[1] = blue;
- y = draw_barlvl(xdpy, win, gc, fnt_fixed, 5, 295, y, 2, cexp.npages, names,
+ y = draw_barlvl(xdpy, win, gc, fnt_fixed, 5, 295, y, 2, curexp.npages, names,
vals, colors, white);
}
@@ -274,10 +275,10 @@ int was_timeout;
u_long vals[2];
u_long colors[2];
- vals[0] = cexp.wiredmax; colors[0] = black;
- vals[1] = cexp.wired; colors[1] = orange;
+ vals[0] = curexp.wiredmax; colors[0] = black;
+ vals[1] = curexp.wired; colors[1] = orange;
- y = draw_barlvl(xdpy, win, gc, fnt_fixed, 5, 295, y, 2, cexp.npages, names,
+ y = draw_barlvl(xdpy, win, gc, fnt_fixed, 5, 295, y, 2, curexp.npages, names,
vals, colors, white);
}
@@ -289,15 +290,15 @@ int was_timeout;
if (init == 0) {
static char *names[] = { "faults", "anon", "ancow", "obj",
"copy", "zero" };
- static int *before[6], *after[6];
+ static int64_t *before[6], *after[6];
static u_long color[6];
init = 1;
- before[0] = &oexp.faults; after[0] = &cexp.faults; color[0] = black;
- before[1] = &oexp.flt_anon; after[1] = &cexp.flt_anon; color[1] = red;
- before[2] = &oexp.flt_acow; after[2] = &cexp.flt_acow; color[2] = blue;
- before[3] = &oexp.flt_obj; after[3] = &cexp.flt_obj; color[3] = green;
- before[4] = &oexp.flt_prcopy; after[4] = &cexp.flt_prcopy; color[4] = orange;
- before[5] = &oexp.flt_przero; after[5] = &cexp.flt_przero; color[5] = purple;
+ before[0] = &oexp.faults; after[0] = &curexp.faults; color[0] = black;
+ before[1] = &oexp.flt_anon; after[1] = &curexp.flt_anon; color[1] = red;
+ before[2] = &oexp.flt_acow; after[2] = &curexp.flt_acow; color[2] = blue;
+ before[3] = &oexp.flt_obj; after[3] = &curexp.flt_obj; color[3] = green;
+ before[4] = &oexp.flt_prcopy; after[4] = &curexp.flt_prcopy; color[4] = orange;
+ before[5] = &oexp.flt_przero; after[5] = &curexp.flt_przero; color[5] = purple;
gp_faults = create_graph(6, "FAULTS", names, before, after, color, white);
}
@@ -311,10 +312,10 @@ int was_timeout;
if (init == 0) {
static char *names[] = { "traps" };
- static int *before[1], *after[1];
+ static int64_t *before[1], *after[1];
static u_long color[1];
init = 1;
- before[0] = &oexp.traps; after[0] = &cexp.traps; color[0] = black;
+ before[0] = &oexp.traps; after[0] = &curexp.traps; color[0] = black;
gp_traps = create_graph(1, "TRAPS", names, before, after, color, white);
}
@@ -330,12 +331,12 @@ int was_timeout;
if (init == 0) {
static char *names[] = { "intrs", "soft", "syscall" };
- static int *before[3], *after[3];
+ static int64_t *before[3], *after[3];
static u_long color[3];
init = 1;
- before[0] = &oexp.intrs; after[0] = &cexp.intrs; color[0] = black;
- before[1] = &oexp.softs; after[1] = &cexp.softs; color[1] = blue;
- before[2] = &oexp.syscalls; after[2] = &cexp.syscalls; color[2] = red;
+ before[0] = &oexp.intrs; after[0] = &curexp.intrs; color[0] = black;
+ before[1] = &oexp.softs; after[1] = &curexp.softs; color[1] = blue;
+ before[2] = &oexp.syscalls; after[2] = &curexp.syscalls; color[2] = red;
gp_intrs = create_graph(3, "INTRS", names, before, after, color, white);
}
@@ -349,12 +350,12 @@ int was_timeout;
if (init == 0) {
static char *names[] = { "cswtch", "swin", "swout" };
- static int *before[3], *after[3];
+ static int64_t *before[3], *after[3];
static u_long color[3];
init = 1;
- before[0] = &oexp.swtch; after[0] = &cexp.swtch; color[0] = black;
- before[1] = &oexp.swapins; after[1] = &cexp.swapins; color[1] = green;
- before[2] = &oexp.swapouts; after[2] = &cexp.swapouts; color[2] = red;
+ before[0] = &oexp.swtch; after[0] = &curexp.swtch; color[0] = black;
+ before[1] = &oexp.swapins; after[1] = &curexp.swapins; color[1] = green;
+ before[2] = &oexp.swapouts; after[2] = &curexp.swapouts; color[2] = red;
gp_ctx = create_graph(3, "SWITCH/SWAP", names, before, after, color, white);
}
@@ -372,26 +373,31 @@ int was_timeout;
buf, strlen(buf));
y += get_fontheight(fnt_fixed) + 5;
+#if __NetBSD_Version__ >= 599002100
+ snprintf(buf, sizeof(buf), " woke=%d, revs=%d",
+ curexp.pdwoke, curexp.pdrevs);
+#else
snprintf(buf, sizeof(buf), " woke=%d, revs=%d, swout=%d",
- cexp.pdwoke, cexp.pdrevs, cexp.pdswout);
+ curexp.pdwoke, curexp.pdrevs, curexp.pdswout);
+#endif
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
buf, strlen(buf));
y += get_fontheight(fnt_fixed) + 1;
snprintf(buf, sizeof(buf), " scans=%d, anon_scans=%d, obj_scans=%d",
- cexp.pdscans, cexp.pdanscan, cexp.pdobscan);
+ curexp.pdscans, curexp.pdanscan, curexp.pdobscan);
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
buf, strlen(buf));
y += get_fontheight(fnt_fixed) + 1;
snprintf(buf, sizeof(buf), " busy=%d, freed=%d, pending=%d",
- cexp.pdbusy, cexp.pdfreed, cexp.pdpending);
+ curexp.pdbusy, curexp.pdfreed, curexp.pdpending);
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
buf, strlen(buf));
y += get_fontheight(fnt_fixed) + 1;
snprintf(buf, sizeof(buf), " reactivate=%d, deactivate=%d, pageouts=%d",
- cexp.pdreact, cexp.pddeact, cexp.pdpageouts);
+ curexp.pdreact, curexp.pddeact, curexp.pdpageouts);
XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y,
buf, strlen(buf));
y += get_fontheight(fnt_fixed) + 1;
+22
View File
@@ -0,0 +1,22 @@
$NetBSD: patch-ab,v 1.3 2006/11/10 10:07:20 martin Exp $
--- libcdcx.h.orig 2005-09-09 15:38:48.000000000 +0200
+++ libcdcx.h 2006-11-10 11:01:26.000000000 +0100
@@ -21,7 +21,7 @@
int nlines;
char *title;
char **names;
- int **before, **after;
+ int64_t **before, **after;
u_long *colors;
u_long backcolor;
int nslot, ptr;
@@ -36,7 +36,7 @@
u_long create_color __P((struct xdpy *, Colormap, char *, u_long));
XFontStruct *create_font __P((struct xdpy *, char *, char *));
-struct graph *create_graph __P((int, char *, char **, int **, int **, u_long *,
+struct graph *create_graph __P((int, char *, char **, int64_t **, int64_t **, u_long *,
u_long));
int draw_barbox __P((struct xdpy *, Window, GC, XFontStruct *,
int, int, int, int, int, char **, u_long *, u_long *,
+30
View File
@@ -0,0 +1,30 @@
$NetBSD: patch-ac,v 1.4 2011/09/29 21:00:19 wiz Exp $
--- get_uvmexp.c.orig 2001-02-19 14:23:55.000000000 +0000
+++ get_uvmexp.c
@@ -20,6 +20,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <err.h>
#include <stdio.h>
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -28,14 +29,14 @@
void get_uvmexp(uvmexp)
-struct uvmexp *uvmexp;
+struct uvmexp_sysctl *uvmexp;
{
int mib[2];
size_t len;
mib[0] = CTL_VM;
- mib[1] = VM_UVMEXP;
+ mib[1] = VM_UVMEXP2;
len = sizeof(*uvmexp);
if (sysctl(mib, 2, uvmexp, &len, NULL, 0) < 0)
- err(1, "sysctl: CTL_VM.VM_UVMEXP");
+ err(1, "sysctl: CTL_VM.VM_UVMEXP2");
}
+21
View File
@@ -0,0 +1,21 @@
$NetBSD: patch-ad,v 1.2 2011/09/29 21:00:19 wiz Exp $
--- libcdcx.c.orig 2005-09-09 13:38:48.000000000 +0000
+++ libcdcx.c
@@ -31,6 +31,7 @@
*/
+#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -285,7 +286,7 @@ struct graph *create_graph(nlines, title
int nlines;
char *title;
char **names;
-int **before, **after;
+int64_t **before, **after;
u_long *colors;
u_long backcolor;