*** /dev/null Fri Feb 16 03:00:55 1990 --- contrib/clients/xcpustate/CHANGES.Pat01 Fri Feb 16 03:32:34 1990 *************** *** 0 **** --- 1,9 ---- + - puts the hostname in the bar for s-bsd. + + - system file for Cray XMP systems from Walter Poxon + Thanks. (I haven't a Cray to test this, alas:-) + + - uses stippling instead of tiling to avoid hallucinogenic effects + on colour displays + + - uses the R4 include and Imakefile conventions *** /dev/null Fri Feb 16 03:00:55 1990 --- contrib/clients/xcpustate/patchlevel.h Fri Feb 16 03:20:00 1990 *************** *** 0 **** --- 1 ---- + #define PATCHLEVEL 1 diff -c -r orig/xcpustate/Bar.c contrib/clients/xcpustate/Bar.c *** orig/xcpustate/Bar.c Mon Jul 31 19:25:37 1989 --- contrib/clients/xcpustate/Bar.c Fri Feb 16 03:18:20 1990 *************** *** 161,175 **** for(i = 0; i < MAXGRAY; i++) { bcp->gray[i] = XCreatePixmapFromBitmapData(XtDisplay(new), DefaultRootWindow(XtDisplay(new)), gray_bits[i], 3, 3, - BlackPixelOfScreen(XtScreen(new)), WhitePixelOfScreen(XtScreen(new)), ! DefaultDepthOfScreen(XtScreen(new))); } } ! gcValues.tile = bcp->gray[0]; ! gcValues.fill_style = FillTiled; w->bar.gc = XCreateGC(XtDisplay(new), DefaultRootWindow(XtDisplay(new)), ! GCFillStyle | GCTile, &gcValues); /* Width and height override length and thickness */ if (w->bar.length == def_dimension) w->bar.length = DEF_LENGTH; --- 161,174 ---- for(i = 0; i < MAXGRAY; i++) { bcp->gray[i] = XCreatePixmapFromBitmapData(XtDisplay(new), DefaultRootWindow(XtDisplay(new)), gray_bits[i], 3, 3, WhitePixelOfScreen(XtScreen(new)), ! BlackPixelOfScreen(XtScreen(new)), 1); } } ! gcValues.stipple = bcp->gray[0]; ! gcValues.fill_style = FillOpaqueStippled; w->bar.gc = XCreateGC(XtDisplay(new), DefaultRootWindow(XtDisplay(new)), ! GCFillStyle | GCStipple, &gcValues); /* Width and height override length and thickness */ if (w->bar.length == def_dimension) w->bar.length = DEF_LENGTH; *************** *** 238,244 **** else rectlen = w->core.width - x; } ! XSetTile(XtDisplay(gw), w->bar.gc, barClassRec.bar_class.gray[igray]); if(vertical) { XFillRectangle(XtDisplay(gw), XtWindow(gw), w->bar.gc, x, y, width, rectlen); --- 237,243 ---- else rectlen = w->core.width - x; } ! XSetStipple(XtDisplay(gw), w->bar.gc, barClassRec.bar_class.gray[igray]); if(vertical) { XFillRectangle(XtDisplay(gw), XtWindow(gw), w->bar.gc, x, y, width, rectlen); diff -c -r orig/xcpustate/BarP.h contrib/clients/xcpustate/BarP.h *** orig/xcpustate/BarP.h Tue Jul 25 22:56:26 1989 --- contrib/clients/xcpustate/BarP.h Fri Feb 16 03:18:21 1990 *************** *** 6,12 **** #ifndef _BarP_h #define _BarP_h ! #include #include "Bar.h" /* include superclass private header file */ #include --- 6,12 ---- #ifndef _BarP_h #define _BarP_h ! #include #include "Bar.h" /* include superclass private header file */ #include Only in contrib/clients/xcpustate: CHANGES.Pat01 diff -c -r orig/xcpustate/Imakefile contrib/clients/xcpustate/Imakefile *** orig/xcpustate/Imakefile Sat Jul 29 01:10:21 1989 --- contrib/clients/xcpustate/Imakefile Fri Feb 16 03:30:48 1990 *************** *** 1,7 **** LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) SRCS = xcpustate.c Bar.c s.c OBJS = xcpustate.o Bar.o s.o ! ! INSTALLFLAGS = $(INSTKMEMFLAGS) ComplexProgramTarget(xcpustate) --- 1,7 ---- LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) + DEP_LIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) SRCS = xcpustate.c Bar.c s.c OBJS = xcpustate.o Bar.o s.o ! INSTPGMFLAGS = $(INSTKMEMFLAGS) ComplexProgramTarget(xcpustate) diff -c -r orig/xcpustate/s-bsd.c contrib/clients/xcpustate/s-bsd.c *** orig/xcpustate/s-bsd.c Sat Jul 29 00:24:59 1989 --- contrib/clients/xcpustate/s-bsd.c Fri Feb 16 03:18:22 1990 *************** *** 1,4 **** ! /* System dependent file for BSD systems */ /* Chris Siebenmann, CSRI, University of Toronto */ /* LINTLIBRARY */ #include --- 1,7 ---- ! /* ! * System dependent file for BSD derivatives that have _cp_time in their ! * kernels to hold the CPU states. Seen to work on SunOS and Ultrix. ! */ /* Chris Siebenmann, CSRI, University of Toronto */ /* LINTLIBRARY */ #include *************** *** 5,10 **** --- 8,18 ---- #include #include + #ifndef MAXHOSTNAMELEN + /* Some U*x deviants managed to not have this in sys/param.h */ + # define MAXHOSTNAMELEN 64 + #endif + extern char *xmalloc(/* int nbytes */); extern int open(), read(); *************** *** 19,29 **** { "" }, }; /* Called at the beginning to inquire how many bars are needed. */ int num_bars() { ! return 1; } /* Called after num_bars to ask for the bar names */ --- 27,39 ---- { "" }, }; + #define NPROCS 1 + /* Called at the beginning to inquire how many bars are needed. */ int num_bars() { ! return NPROCS; } /* Called after num_bars to ask for the bar names */ *************** *** 31,38 **** char ** label_bars(nbars) { ! static char *name[] = {"CPU states"}; return name; } --- 41,54 ---- char ** label_bars(nbars) { ! static char *name[NPROCS]; ! static char hname[MAXHOSTNAMELEN]; + name[0] = hname; + if (gethostname(name[0], MAXHOSTNAMELEN) < 0) { + perror("gethostname"); + *name[0] = '\0'; + } return name; } Only in contrib/clients/xcpustate: s-cray-xmp.c diff -c -r orig/xcpustate/s-iris4d.c contrib/clients/xcpustate/s-iris4d.c *** orig/xcpustate/s-iris4d.c Sat Jul 29 00:00:45 1989 --- contrib/clients/xcpustate/s-iris4d.c Fri Feb 16 03:18:23 1990 *************** *** 33,39 **** names = (char **) xmalloc(nbars * sizeof(char *)); for(i = 0; i < nbars; i++) { ! #define CPUNAME "CPU#%d states" char buf[sizeof(CPUNAME) + 32]; (void) sprintf(buf, CPUNAME, i); --- 33,39 ---- names = (char **) xmalloc(nbars * sizeof(char *)); for(i = 0; i < nbars; i++) { ! #define CPUNAME "%d" char buf[sizeof(CPUNAME) + 32]; (void) sprintf(buf, CPUNAME, i); diff -c -r orig/xcpustate/s.c contrib/clients/xcpustate/s.c *** orig/xcpustate/s.c Sat Jul 29 00:38:45 1989 --- contrib/clients/xcpustate/s.c Fri Feb 16 03:21:00 1990 *************** *** 9,11 **** --- 9,15 ---- #ifndef s_included # include "s-bsd.c" #endif + + #ifdef CRAY1 + # include "s-cray-xmp.c" + #endif diff -c -r orig/xcpustate/xcpustate.c contrib/clients/xcpustate/xcpustate.c *** orig/xcpustate/xcpustate.c Thu Oct 5 23:03:35 1989 --- contrib/clients/xcpustate/xcpustate.c Fri Feb 16 03:18:25 1990 *************** *** 10,18 **** #include #include ! #include ! #include ! #include #include "Bar.h" #include "s.h" --- 10,18 ---- #include #include ! #include ! #include ! #include #include "Bar.h" #include "s.h" diff -c -r orig/xcpustate/xcpustate.man contrib/clients/xcpustate/xcpustate.man *** orig/xcpustate/xcpustate.man Mon Jul 31 19:29:52 1989 --- contrib/clients/xcpustate/xcpustate.man Fri Feb 16 03:37:00 1990 *************** *** 17,22 **** --- 17,26 ---- On an Iris4D, there may be more than one bar, one for each CPU, and each bar indicates the proportions of idle + wait, user, kernel, sxbrk and interrupt time for each cpu. + .PP + On a Cray X/MP or Y/MP, under Unicos 5.1 or greater, it will display + bars for as many cpus as are configured. The proportions of + idle, user and system time are shown for each cpu. .SH OPTIONS .I Xcpustate accepts all of the standard X Toolkit command line options, plus: *************** *** 67,70 **** xperfmon, xload .SH AUTHOR Mark Moraes, University of Toronto ! (Thanks to Chris Siebenmann for the code for BSD systems) --- 71,76 ---- xperfmon, xload .SH AUTHOR Mark Moraes, University of Toronto ! Thanks to Chris Siebenmann for the code for BSD systems. ! Thanks to Walter D. Poxon from Cray Research for the code for Cray X/MP and ! Y/MPs.