xsysinfo-1.7.orig/0000755000175000001440000000000010302066551013223 5ustar mvelausersxsysinfo-1.7.orig/README0000644000175000001440000001211206713720173014110 0ustar mvelausersREADME for xsysinfo version 1.6. WHAT IS XSYSINFO: Xsysinfo is an X application to display some Linux kernel parameters in graphical form. It is like a mix of top, free and xload with the difference that the values are shown in form of a horizontal bar. The displayed values are: CPU load average, CPU load, memory and swap sizes (details see below). Xsysinfo 1.6 runs at least under Linux 0.99pl5 with the proc filesystem (as kernels from this release on support the CPU idle time, no patch is necessary like in earlier versions of xsysinfo). Starting with version 1.3, xsysinfo also supports the new /proc/meminfo-format used in kernels >= 1.3.x FOR THE IMPATIENT: If you want to take a look at xsysinfo, before you decide to install it, make sure the proc fs is mounted at /proc, then just type: XAPPLRESDIR=. xsysinfo & HOW TO INSTALL: There is a compiled ELF-version of xsysinfo included in the archive, which was built under RedHat 4.2 with XFree86 3.3.1 and libc 5.3.12. If you want to install this binary just type make install as root. xsysinfo runs under normal (755) permissions, so you don't have to make it setuid/setgid. NOTE: Use this way to install xsysinfo! `make install' not only copies the binary to the right place, it also installs the system wide application defaults file (XSysinfo). Without this file you'll get a running xsysinfo, but it won't look very nice... If you want to create your own compiled version just type: xmkmf make clean make (you'll need the programming package and the libraries from the XFree distribution to do this.) Now you can install it as described above. Xsysinfo requires that the proc filesystem is compiled into the kernel (this is the default anyway) and that it is mounted on directory /proc. To check this just do an `ls' on /proc, which should give something like this: $ ls /proc 1/ 21/ 27/ 39/ 42/ 52/ kmsg uptime 14/ 22/ 28/ 4/ 44/ 75/ loadavg 15/ 23/ 29/ 40/ 46/ 87/ meminfo 20/ 24/ 38/ 41/ 47/ self/ version To mount the proc filesystem, add the following line to your /etc/fstab: none /proc proc defaults # proc fs WHAT IS DISPLAYED: Xsysinfo displays the following values: - CPU load average CPU load average between 0.000-8.000. The gauge's bar is subdivided into segments, where one segment represents a load value of 1.0. The bar's full length is automatically scaled, depending on the displayed value: load value (l) full length # segments ------------------------------------------------------ 0.00 <= l < 1.00 1.00 1 1.00 <= l < 2.00 2.00 2 2.00 <= l < 3.00 3.00 3 ... and so on ... - CPU load percentage CPU load time to CPU idle time subdivided in three segments: user load, system load and nice load. - Memory The memory gauge's bar is subdivided into two segments with following values (from left to right): o amount of physical memory, which is used by processes o physical memory used for the page and buffer cache The length of the whole bar, which is the sum of these two values, shows the amount of physical memory currently used by the system. - Swap The percentage of swap space used by the system to total amount of swap space. COMMAND LINE OPTIONS: Xsysinfo accepts the following command line options: -update set update rate to milli-seconds -title (-notitle) show (don't show) title string -labels (-nolabels) show (don't show) gauge labels -loadavg (-noloadavg) show (don't show) CPU load average value -load (-noload) show (don't show) CPU load value -mem (-nomem) show (don't show) Memory info -swap (-noswap) show (don't show) Swap info -help show this message You can also specify any of the standard toolkit options (see: manpage X(1)). CONFIGURATION: As the most X programs, xsysinfo is highly configurable. There are two resource files: XSysinfo with color independent settings and XSysinfo-color with color resources. The latter is automatically loaded, if your server is set up to use color customized resource files. To do this just add *customization: -color in your server resource file loaded by xrdb at startup (usually /usr/X11R6/lib/X11/xinit/.Xresources). ACKNOWLEDGMENTS: Thanks to Linus and the other kernel hackers, who made Linux to this great OS. Also thanks to Muhammad M. Saggaf for his suggestions and ideas for this xsysinfo release. And last but not least thanks to Lucas Bussmann and Joerg Fries for creating the color resources. COMMENTS: Xsyinfo is written by Gabor Herr (herr@iti.informatik.th-darmstadt.de) and currently maintained by Ronald Wahl (ronald.wahl@informatik.tu-chemnitz.de). Comments, bug reports, whishes etc... are welcome. Have fun watching the kernel... Gabor & Ronald 5/4/99 Mike Mondragon added SMP support to version 1.7 xsysinfo-1.7.orig/BarGauge.c0000644000175000001440000002660206417644225015066 0ustar mvelausers/* * BarGauge: Widget to periodically display values in form of a horizontal bar. * loosely based on Athena StripChart Widget. * * Author: Gabor Herr herr@iti.informatik.th-darmstadt.de * * $Id: BarGauge.c,v 1.3 1993/02/07 23:54:15 gabor Exp $ */ /*********************************************************** Copyright 1992, 1993 by Gabor Herr Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its 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 names of Gabor Herr or Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. GABOR HERR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL GABOR HERR 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. ******************************************************************/ #include #include #include #include #include "BarGaugeP.h" #include #ifdef USE_MILLI_SECONDS /* (ThMO) */ # define MS_PER_SEC 1 /* value already expressed in ms (ThMO) */ #else # define MS_PER_SEC 1000 #endif #define min(a,b) ((a) < (b) ? (a) : (b)) /* Private Data */ #define offset(field) XtOffsetOf(BarGaugeRec, field) static XtResource resources[] = { {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension), offset(core.width), XtRImmediate, (XtPointer) 120}, {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension), offset(core.height), XtRImmediate, (XtPointer) 12}, {XtNautoAdjust, XtCAutoAdjust, XtRBoolean, sizeof(Boolean), offset(bar_gauge.auto_adjust), XtRImmediate, (XtPointer) False}, {XtNsegments, XtCSegments, XtRInt, sizeof(int), offset(bar_gauge.segments), XtRImmediate, (XtPointer) 1}, {XtNsegmentGap, XtCSegmentGap, XtRInt, sizeof(int), offset(bar_gauge.segment_gap), XtRImmediate, (XtPointer) 2}, {XtNupdate, XtCInterval, XtRInt, sizeof(int), #ifdef USE_MILLI_SECONDS /* (ThMO) */ offset(bar_gauge.update), XtRImmediate, (XtPointer) 500}, #else offset(bar_gauge.update), XtRImmediate, (XtPointer) 10}, #endif {XtNgetValue, XtCCallback, XtRCallback, sizeof(XtPointer), offset(bar_gauge.get_value), XtRImmediate, (XtPointer) NULL}, {XtNmaxValue, XtCMaxValue, XtRFloat, sizeof(float), offset(bar_gauge.max_value), XtRString, (XtPointer) "1.0"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[0]), XtRString, XtDefaultForeground}, {XtNforeground1, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[1]), XtRString, XtDefaultForeground}, {XtNforeground2, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[2]), XtRString, XtDefaultForeground}, {XtNforeground3, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[3]), XtRString, XtDefaultForeground}, {XtNforeground4, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[4]), XtRString, XtDefaultForeground}, {XtNforeground5, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[5]), XtRString, XtDefaultForeground}, {XtNforeground6, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[6]), XtRString, XtDefaultForeground}, {XtNforeground7, XtCForeground, XtRPixel, sizeof(Pixel), offset(bar_gauge.fgpixel[7]), XtRString, XtDefaultForeground}, }; #undef offset static void Initialize(), Destroy(), Redisplay(); static Boolean SetValues(); static void repaint_window(); BarGaugeClassRec barGaugeClassRec = { { /* core fields */ (WidgetClass) &simpleClassRec, /* superclass */ "BarGauge", /* class_name */ sizeof(BarGaugeRec), /* size */ XawInitializeWidgetSet, /* class_initialize */ NULL, /* class_part_initialize */ FALSE, /* class_inited */ Initialize, /* initialize */ NULL, /* initialize_hook */ XtInheritRealize, /* realize */ NULL, /* actions */ 0, /* num_actions */ resources, /* resources */ XtNumber(resources), /* num_resources */ NULLQUARK, /* xrm_class */ TRUE, /* compress_motion */ XtExposeCompressMultiple | XtExposeGraphicsExposeMerged, /* compress_exposure */ TRUE, /* compress_enterleave */ FALSE, /* visible_interest */ Destroy, /* destroy */ NULL, /* resize */ Redisplay, /* expose */ SetValues, /* set_values */ NULL, /* set_values_hook */ NULL, /* set_values_almost */ NULL, /* get_values_hook */ NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ NULL, /* tm_table */ XtInheritQueryGeometry, /* query_geometry */ XtInheritDisplayAccelerator, /* display_accelerator */ NULL /* extension */ }, { /* Simple class fields */ XtInheritChangeSensitive /* change_sensitive */ } }; WidgetClass barGaugeWidgetClass = (WidgetClass) &barGaugeClassRec; /**************************************************************** * * Private Procedures * ****************************************************************/ static void draw_it(); /* ARGSUSED */ static void Initialize (greq, gnew) Widget greq, gnew; { BarGaugeWidget w = (BarGaugeWidget)gnew; XGCValues gcval; int i; if (w->bar_gauge.update > 0) w->bar_gauge.interval_id = XtAppAddTimeOut ( XtWidgetToApplicationContext(gnew), w->bar_gauge.update * MS_PER_SEC, draw_it, (XtPointer) gnew ); if (w->bar_gauge.segments > XG_NUM_SEGMENTS || w->bar_gauge.auto_adjust ) w->bar_gauge.segments = XG_NUM_SEGMENTS; /* reset values */ for ( i = 0; i < XG_NUM_SEGMENTS; i++ ) w->bar_gauge.last_values[i] = 0.0; /* create GCs for each active segment */ for ( i = 0; i < w->bar_gauge.segments; i++ ) { gcval.foreground = w->bar_gauge.fgpixel[i]; w->bar_gauge.fgGC[i] = XtGetGC( (Widget) w, GCForeground, &gcval ); } } static void Destroy (gw) Widget gw; { BarGaugeWidget w = (BarGaugeWidget)gw; int i; if (w->bar_gauge.update > 0) XtRemoveTimeOut (w->bar_gauge.interval_id); for ( i = 0; i < w->bar_gauge.segments; i++ ) XtReleaseGC( (Widget) w, w->bar_gauge.fgGC[i] ); } /* * NOTE: This function really needs to recieve graphics exposure * events, but since this is not easily supported until R4 I am * going to hold off until then. */ /* ARGSUSED */ static void Redisplay(w, event, region) Widget w; XEvent *event; Region region; { (void) repaint_window ((BarGaugeWidget)w); } /* ARGSUSED */ static void draw_it(client_data, id) XtPointer client_data; XtIntervalId *id; /* unused */ { BarGaugeWidget w = (BarGaugeWidget)client_data; XgBarGaugeValues vals; if (w->bar_gauge.update > 0) w->bar_gauge.interval_id = XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w), w->bar_gauge.update*MS_PER_SEC,draw_it, client_data); if (w->bar_gauge.get_value == NULL) return; vals.num_values = w->bar_gauge.segments; vals.values = w->bar_gauge.last_values; XtCallCallbacks( (Widget)w, XtNgetValue, (XtPointer)&vals ); if (XtIsRealized((Widget)w)) repaint_window(w); } /* draw_it */ static void repaint_window(w) BarGaugeWidget w; { double x_exact, error = 0.0; int x, lastx; int i; int n; Dimension valuewidth; if (XtIsRealized((Widget)w)) { XClearWindow( XtDisplay (w), XtWindow (w)); if (w->bar_gauge.auto_adjust) { n = (w->bar_gauge.last_values[0] / w->bar_gauge.max_value) + 1.0; if (n > XG_NUM_SEGMENTS) n = XG_NUM_SEGMENTS; valuewidth = (w->core.width - (n - 1) * w->bar_gauge.segment_gap) / n; for ( lastx = i = 0; i < n - 1; i++ ) { XFillRectangle(XtDisplay(w), XtWindow(w), w->bar_gauge.fgGC[i], lastx, 0, valuewidth, w->core.height); lastx += valuewidth + w->bar_gauge.segment_gap; } x = valuewidth * ( w->bar_gauge.last_values[0] - (n - 1) * w->bar_gauge.max_value); XFillRectangle(XtDisplay(w), XtWindow(w), w->bar_gauge.fgGC[i], lastx, 0, x, w->core.height); } else { valuewidth = w->core.width - (w->bar_gauge.segments - 1) * w->bar_gauge.segment_gap; for ( lastx = i = 0; i < w->bar_gauge.segments; i++ ) { x_exact = valuewidth * (w->bar_gauge.last_values[i] / w->bar_gauge.max_value); x = (int)(x_exact - error + 0.5); #ifndef ALLOW_EMPTY_SEGMENTS /* don't let segment disappear, * make it at least 1 pixel wide */ if (x <= 0) x = 1; #endif error += x - x_exact; XFillRectangle(XtDisplay(w), XtWindow(w), w->bar_gauge.fgGC[i], lastx, 0, x, w->core.height); lastx += (x + w->bar_gauge.segment_gap); } } XFlush(XtDisplay(w)); /* Flush output buffers */ } } /* ARGSUSED */ static Boolean SetValues (current, request, new) Widget current, request, new; { BarGaugeWidget old = (BarGaugeWidget)current; BarGaugeWidget w = (BarGaugeWidget)new; Boolean ret_val = FALSE; XGCValues gcval; int i; int checkgc; #define has_changed(resource) \ (old->bar_gauge.resource != w->bar_gauge.resource) if (has_changed(update)) { if (old->bar_gauge.update > 0) XtRemoveTimeOut (old->bar_gauge.interval_id); if (w->bar_gauge.update > 0) w->bar_gauge.interval_id = XtAppAddTimeOut (XtWidgetToApplicationContext(new), w->bar_gauge.update * MS_PER_SEC, draw_it, (XtPointer)w); } if (has_changed(auto_adjust) && w->bar_gauge.auto_adjust) w->bar_gauge.segments = XG_NUM_SEGMENTS; if (has_changed(segments)) { if (old->bar_gauge.segments > w->bar_gauge.segments) { /* free GC's, that we don't need any more */ for ( i = w->bar_gauge.segments; i < old->bar_gauge.segments; i++ ) XtReleaseGC((Widget)old,old->bar_gauge.fgGC[i]); } else { /* allocate GC's, for the new segments */ for ( i = old->bar_gauge.segments; i < w->bar_gauge.segments; i++ ) { gcval.foreground = w->bar_gauge.fgpixel[i]; w->bar_gauge.fgGC[i] = XtGetGC( (Widget) w, GCForeground, &gcval ); } } ret_val = True; } checkgc = min( w->bar_gauge.segments, old->bar_gauge.segments ); for ( i = 0; i < checkgc; i++ ) if ( has_changed( fgpixel[i] ) ) { XtReleaseGC( (Widget) old, old->bar_gauge.fgGC[i] ); gcval.foreground = w->bar_gauge.fgpixel[i]; w->bar_gauge.fgGC[i] = XtGetGC( (Widget) w, GCForeground, &gcval ); ret_val = True; } return( ret_val ); } xsysinfo-1.7.orig/BarGauge.h0000644000175000001440000001241306416662171015065 0ustar mvelausers #ifndef _XgBarGauge_h #define _XgBarGauge_h /*********************************************************************** * * BarGauge: Widget to periodically display a value in form of a horizontal bar. * based on Athena StripChart Widget. * * Author: Gabor Herr herr@iti.informatik.th-darmstadt.de * * $Id: BarGauge.h,v 1.3 1993/02/07 23:54:15 gabor Exp $ * ***********************************************************************/ /*********************************************************** Copyright 1992, 1993 by Gabor Herr Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its 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 names of Gabor Herr or Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. GABOR HERR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL GABOR HERR 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. ******************************************************************/ /* Name Class RepType Default Value ---- ----- ------- ------------- BarGauge resources: autoAdjust AutoAdjust Boolean False If False, displays each value returned by getValues procedure in a separate segment. If True, only the first value returned by getValues is displayed in n segments, where n is value/maxValue; the first n-1 segments are of length maxValue; the n'th segment is of length value%maxValue; the bar's total length is n*maxValue. segments Segments int 1 Total number of segments the bar is subdivided. segmentGap SegmentGap int 2 Gap between adjacent segments in pixel. foreground Foreground Pixel XtDefaultForeground foreground1 Foreground Pixel XtDefaultForeground foreground2 Foreground Pixel XtDefaultForeground foreground3 Foreground Pixel XtDefaultForeground foreground4 Foreground Pixel XtDefaultForeground foreground5 Foreground Pixel XtDefaultForeground foreground6 Foreground Pixel XtDefaultForeground foreground7 Foreground Pixel XtDefaultForeground Foreground color of each of the max. 8 segments. getValue Callback XtCallbackList NULL Callback procedure to be called to obtain the actual segment values. The call_data parameter is a pointer to XgBarGaugeValues. maxValue MaxValue float 1.0 The bar's full length. I.e. a segment with this value will completely fill the gauge. update Interval int 10 (seconds) Time between two calls of the getValue procedure. Inherited resources: accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitive Boolean True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 colormap Colormap Colormap parent's colormap cursor Cursor Cursor None cursorName Cursor String NULL depth Depth int parent's depth destroyCallback Callback XtCallbackList NULL height Height Dimension 120 insensitiveBorder Insensitive Pixmap GreyPixmap mappedWhenManaged MappedWhenManaged Boolean True pointerColor Foreground Pixel XtDefaultForeground pointerColorBackground Background Pixel XtDefaultBackground screen Screen Screen parent's screen sensitive Sensitive Boolean True translations Translations TranslationTable NULL width Width Dimension 120 x Position Position 0 y Position Position 0 */ #ifndef _XtStringDefs_h_ #define XtNupdate "update" #endif #define XtNautoAdjust "autoAdjust" #define XtCAutoAdjust "AutoAdjust" #define XtNgetValue "getValue" #define XtNsegments "segments" #define XtCSegments "Segments" #define XtNsegmentGap "segmentGap" #define XtCSegmentGap "SegmentGap" #define XtNmaxValue "maxValue" #define XtCMaxValue "MaxValue" #define XtNforeground1 "foreground1" #define XtNforeground2 "foreground2" #define XtNforeground3 "foreground3" #define XtNforeground4 "foreground4" #define XtNforeground5 "foreground5" #define XtNforeground6 "foreground6" #define XtNforeground7 "foreground7" /* call data param for getValue */ typedef struct { Cardinal num_values; /* # of values */ double *values; /* values[i] = value for i-th bar segment */ } XgBarGaugeValues; typedef struct _BarGaugeRec *BarGaugeWidget; typedef struct _BarGaugeClassRec *BarGaugeWidgetClass; extern WidgetClass barGaugeWidgetClass; #endif /* _XgBarGauge_h */ xsysinfo-1.7.orig/BarGaugeP.h0000644000175000001440000000600506416662117015205 0ustar mvelausers/* * BarGauge: Widget to periodically display a value in form of a horizontal bar. * based on Athena StripChart Widget. * * Author: Gabor Herr herr@iti.informatik.th-darmstadt.de * * $Id: BarGaugeP.h,v 1.3 1993/02/07 23:54:15 gabor Exp $ */ /*********************************************************** Copyright 1992, 1993 by Gabor Herr Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its 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 names of Gabor Herr or Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. GABOR HERR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL GABOR HERR 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. ******************************************************************/ #ifndef _XgBarGaugeP_h #define _XgBarGaugeP_h #include "BarGauge.h" #include /* * max. # of different segments within the bar. Change this only, if you also * add new (foreground) resources. * FIXME: This should better be a variable or a resource, and the foreground * values should be better in a list. */ #define XG_NUM_SEGMENTS 8 /* New fields for the barGauge widget instance record */ typedef struct { Pixel fgpixel[XG_NUM_SEGMENTS]; /* color index for each bar segments */ GC fgGC[XG_NUM_SEGMENTS]; /* graphics context for fgpixel */ Boolean auto_adjust; /* auto adjust mode */ float max_value; /* Max Value in bar */ int segments; /* # of segments */ int segment_gap; /* spacing between segments */ double last_values[XG_NUM_SEGMENTS]; /* last displayed values */ int update; /* update frequence */ XtCallbackList get_value; /* proc to call to fetch load pt */ XtIntervalId interval_id; } BarGaugePart; /* Full instance record declaration */ typedef struct _BarGaugeRec { CorePart core; SimplePart simple; BarGaugePart bar_gauge; } BarGaugeRec; /* New fields for the BarGauge widget class record */ typedef struct {int dummy;} BarGaugeClassPart; /* Full class record declaration. */ typedef struct _BarGaugeClassRec { CoreClassPart core_class; SimpleClassPart simple_class; BarGaugeClassPart bar_gauge_class; } BarGaugeClassRec; /* Class pointer. */ extern BarGaugeClassRec barGaugeClassRec; #endif /* _XgBarGaugeP_h */ xsysinfo-1.7.orig/Imakefile0000644000175000001440000000301406416665406015051 0ustar mvelausers/* * Written by Gabor Herr . * * Copyright (c) 1992, 1993 by Gabor Herr, all rights reserved. * * 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 may name is not used in * advertising or publicity pertaining to distribution of the software * without specific, written prior permission. I make no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. */ /* CDEBUGFLAGS = -g -fno-omit-frame-pointer */ /* * If ALLOW_EMPTY_SEGMENTS is defined then empty segments would be * disappearing. Otherwise every segment is at least 1 pixel wide. */ EXTRA_DEFINES = -DALLOW_EMPTY_SEGMENTS /* If USE_MILLI_SECONDS is defined *all* values specifying the update time * *have* to be expressed in milli-seconds instead of full seconds only. * To fall back to the old behaviour simply give 1000ms... * Note: * Be sure to update the file XSyscolor.ad accordingly if this symbol * is *not* defined ! * (ThMO) */ EXTRA_DEFINES += -DUSE_MILLI_SECONDS LOCAL_LIBRARIES = XawClientLibs DEPLIBS= SRCS = BarGauge.c sysinfo.c xsysinfo.c OBJS = $(SRCS:.c=.o) ComplexProgramTarget(xsysinfo) InstallAppDefaults(XSysinfo) InstallAppDefaults(XSysinfo-color) xsysinfo-1.7.orig/XSysinfo0000777000175000001440000000000010302066530017012 2XSysinfo.adustar mvelausersxsysinfo-1.7.orig/XSysinfo-color0000777000175000001440000000000010302066530021242 2XSysinfo-color.adustar mvelausersxsysinfo-1.7.orig/XSysinfo-color.ad0000644000175000001440000000307606417650634016452 0ustar mvelausers!* !* XSysinfo-color: app-defaults for color displays !* !* $Id: XSysinfo-color.ad,v 1.1 1993/02/22 20:03:45 gabor Exp $ !* !* Written by Gabor Herr . !* !* Copyright (c) 1993 by Gabor Herr, all rights reserved. !* !* 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 may name is not used in !* advertising or publicity pertaining to distribution of the software !* without specific, written prior permission. I make no representations !* about the suitability of this software for any purpose. It is !* provided "as is" without express or implied warranty. !* ! #include "XSysinfo" ! set foreground colors for load *loadavg*bar.foreground: RosyBrown1 *loadavg*bar.foreground1: IndianRed1 *loadavg*bar.foreground2: OrangeRed1 *loadavg*bar.foreground3: firebrick1 *loadavg*bar.foreground4: pink1 *loadavg*bar.foreground5: HotPink1 *loadavg*bar.foreground6: DeepPink2 *loadavg*bar.foreground7: maroon1 ! set idle gauge color *load*bar.foreground: cyan2 *load*bar.foreground1: SteelBlue2 *load*bar.foreground2: blue ! set mem info gauge colors *mem*bar.foreground: green2 *mem*bar.foreground1: green4 ! set swap gauge color *swap*bar.foreground: hotpink1 *swap*bar.foreground1: hotpink3 *swap*bar.foreground2: hotpink4 ! set background *.background: grey80 *.BarGauge.background: white xsysinfo-1.7.orig/XSysinfo.ad0000644000175000001440000000463406713744047015340 0ustar mvelausers!* !* XSysinfo: application for displaying some kernel parameters !* !* $Id: XSysinfo.ad,v 1.6 1993/02/22 20:03:02 gabor Exp $ !* !* Written by Gabor Herr . !* !* Copyright (c) 1992, 1993 by Gabor Herr, all rights reserved. !* !* 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 may name is not used in !* advertising or publicity pertaining to distribution of the software !* without specific, written prior permission. I make no representations !* about the suitability of this software for any purpose. It is !* provided "as is" without express or implied warranty. !* ! ! application resources to control whether or not a value should be displayed. ! These are all booleans: True = enable, False = disable. *.showTitle: True *.showLoadAvg: True *.showLoad: True *.showMem: True *.showSwap: True *.smpKernel: True ! define some nice fonts *.font: -adobe-courier-*-*-*-*-*-*-*-*-m-*-*-* *.title.font: -adobe-courier-*-*-*-*-*-140-*-*-m-*-*-* ! update interval for all values in milli-seconds (ThMO) *bar.update: 200 ! set foreground colors for load average *loadavg*bar.foreground: grey70 *loadavg*bar.foreground1: grey60 *loadavg*bar.foreground2: grey50 *loadavg*bar.foreground3: grey40 *loadavg*bar.foreground4: grey30 *loadavg*bar.foreground5: grey20 *loadavg*bar.foreground6: grey10 *loadavg*bar.foreground7: black *loadavg*bar.segmentGap: 1 ! set idle gauge color *load*bar.foreground: grey70 *load*bar.foreground1: grey50 *load*bar.foreground2: grey30 ! set mem info gauge colors *mem*bar.foreground: grey70 *mem*bar.foreground1: grey50 ! set swap gauge color *swap*bar.foreground: grey70 *swap*bar.foreground1: grey50 *swap*bar.foreground2: grey30 ! set background *.background: grey80 *.BarGauge.background: white ! this the amount of space in pixels between two adjacent segments in a bar *bar.segmentGap: 1 ! show only the border of the gauge windows *.BarGauge.borderWidth: 1 *.borderWidth: 0 ! text resources, you should not have to change these *.title.label: Linux Kernel Info *.title.width: 205 *.loadavg.name.label: LoadAvg: *.load.name.label: Load: *.mem.name.label: Memory: *.swap.name.label: Swap: xsysinfo-1.7.orig/sysinfo.c0000644000175000001440000001246706713761431015105 0ustar mvelausers /* * sysinfo.c - get kernel info * */ /* * Written by Gabor Herr . * * Copyright (c) 1992, 1993 by Gabor Herr, all rights reserved. * * 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 may name is not used in * advertising or publicity pertaining to distribution of the software * without specific, written prior permission. I make no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. */ /* $Id: sysinfo.c,v 1.3 1993/02/12 11:40:16 gabor Exp $ */ #include "sysinfo.h" #include #include #include #include static int meminfo_fd; static int load_fd; static int loadavg_fd; static int swaps_fd; static char buffer[1024]; static void reread( int fd, char *message ) { if ( lseek( fd, 0L, 0 ) == 0 && read( fd, buffer, sizeof(buffer) - 1 ) > 0 ) return; perror(message); exit(1); } static int getentry(const char *tag, const char *bufptr) { char *tail; int retval, len = strlen(tag); while (bufptr) { if (*bufptr == '\n') bufptr++; if (!strncmp(tag, bufptr, len)) { retval = strtol(bufptr + len, &tail, 10); if (tail == bufptr + len) { return -1; } else { return retval; } } bufptr = strchr( bufptr, '\n' ); } return -1; } void get_meminfo( int *swapdevs, struct meminfo *result ) { int i; char *bufptr; int res; int sw_size, sw_used; reread( meminfo_fd, "get_meminfo"); /* Try new /proc/meminfo format first */ *swapdevs = 1; if ((result[0].total = getentry("MemTotal:", buffer)) < 0 || (result[0].free = getentry("MemFree:", buffer)) < 0 || (result[0].shared = getentry("MemShared:", buffer)) < 0 || (result[0].buffers = getentry("Buffers:", buffer)) < 0 || (result[0].cache = getentry("Cached:", buffer)) < 0 || (result[1].total = getentry("SwapTotal:", buffer)) < 0 || (result[1].free = getentry("SwapFree:", buffer)) < 0) { /* Fall back to old format */ bufptr = strchr( buffer, '\n' ) + 1; sscanf( bufptr, "Mem: %d %*d %d %d %d", &result[0].total, &result[0].free, &result[0].shared, &result[0].cache ); result[0].buffers = -1; for ( i = 1; i < MAX_SWAPFILES; i++ ) { bufptr = strchr( bufptr, '\n' ) + 1; if ( *bufptr == '\0' || (res = sscanf( bufptr, "Swap: %d %*d %d", &result[i].total, &result[i].free )) != 2 ) break; } *swapdevs = i - 1; } else if (swaps_fd > 0) { reread( swaps_fd, "get_meminfo"); bufptr = buffer; for ( i = 1; i < MAX_SWAPFILES; i++ ) { bufptr = strchr( bufptr, '\n' ) + 1; if ( *bufptr == '\0' || (res = sscanf( bufptr, "%*s %*s %d %d", &sw_size, &sw_used)) != 2 ) break; result[i].total = sw_size; result[i].free = sw_size - sw_used; } *swapdevs = i - 1; } } double get_loadavg( void ) { double load; reread( loadavg_fd, "get_loadavg"); sscanf( buffer, "%lf", &load ); return load; } void get_load(struct load * result) { static int initialized = 0; static struct load *last_load; struct load *loadptr; struct load curr_load; int procs, i, index; char *bufptr; if(!initialized) { procs = get_total_procs(); last_load = (struct load *)malloc(procs * sizeof(struct load)); loadptr = last_load; for( i = 0; i < procs; i++) { loadptr->total = 0; loadptr->user = 0; loadptr->system = 0; loadptr->nice = 0; loadptr->idle = 0; loadptr->cpu = NULL; loadptr++; } initialized = 1; } reread( load_fd, "get_load" ); bufptr = buffer; if(sscanf(result->cpu, "cpu%d", &index) != 1) loadptr = last_load; else loadptr = last_load + index; bufptr = strstr(bufptr, result->cpu); sscanf( bufptr, "%*s %lu %lu %lu %lu\n", &curr_load.user, &curr_load.nice, &curr_load.system, &curr_load.idle ); curr_load.total = curr_load.user + curr_load.nice + curr_load.system + curr_load.idle; result->total = curr_load.total - loadptr->total; result->user = curr_load.user - loadptr->user; result->nice = curr_load.nice - loadptr->nice; result->system = curr_load.system - loadptr->system; result->idle = curr_load.idle - loadptr->idle; loadptr->total = curr_load.total; loadptr->user = curr_load.user; loadptr->nice = curr_load.nice; loadptr->system = curr_load.system; loadptr->idle = curr_load.idle; } int sysinfo_init( void ) { if ((meminfo_fd = open("/proc/meminfo",O_RDONLY)) < 0) { perror("/proc/meminfo"); return 1; } if ((loadavg_fd = open("/proc/loadavg",O_RDONLY)) < 0) { perror("/proc/loadavg"); return 1; } if ((load_fd = open("/proc/stat",O_RDONLY)) < 0) { perror("/proc/stat"); return 1; } /* Failing here is not critical. We can get the info from meminfo. */ swaps_fd = open("/proc/swaps",O_RDONLY); return 0; } int get_total_procs( void ) { int count = 1; char cpu_num[7]; char *bufptr; reread( load_fd, "get_total_procs" ); while(1) { bufptr = buffer; sprintf(cpu_num,"cpu%d ", count); if(strstr(bufptr, cpu_num) != NULL) count++; else return count; } return -1; } xsysinfo-1.7.orig/sysinfo.h0000644000175000001440000000251206713741522015077 0ustar mvelausers/* * sysinfo.h - get kernel info * */ /* * Written by Gabor Herr . * * Copyright (c) 1992, 1993 by Gabor Herr, all rights reserved. * * 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 may name is not used in * advertising or publicity pertaining to distribution of the software * without specific, written prior permission. I make no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. */ /* $Id: sysinfo.h,v 1.4 1993/02/12 11:40:16 gabor Exp $ */ #ifndef SYSINFO_INCLUDED #define SYSINFO_INCLUDED #define MAX_SWAPFILES 8 struct load { unsigned long total; unsigned long user; unsigned long system; unsigned long nice; unsigned long idle; char *cpu; }; struct meminfo { int total; int cache; int buffers; int free; int shared; }; extern void get_meminfo( int *, struct meminfo * ); extern double get_loadavg(void); extern void get_load(struct load *); extern int sysinfo_init(void); extern int get_total_procs( void ); #endif xsysinfo-1.7.orig/xsysinfo.c0000644000175000001440000002420506713756753015301 0ustar mvelausers/* * xsysinfo: X application for displaying some kernel parameters * * $Id: xsysinfo.c,v 1.9 1993/02/12 11:40:16 gabor Exp $ * */ /* * Written by Gabor Herr . * * Copyright (c) 1992, 1993 by Gabor Herr, all rights reserved. * * 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 may name is not used in * advertising or publicity pertaining to distribution of the software * without specific, written prior permission. I make no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. */ #include #include #include #include #include "BarGauge.h" #include #include "sysinfo.h" #define norm(x,max) ((max) == 0 ? 0 : (double)(x) / (max)) /* Application Ressources: */ typedef struct { Boolean show_title; Boolean show_labels; Boolean show_loadavg; Boolean show_load; Boolean show_mem; Boolean show_swap; Boolean smp_kernel; } AppData, *AppDataPtr; static AppData appres; static XtResource application_resources[] = { { "showTitle", "ShowTitle", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr,show_title), XtRImmediate, (XtPointer) True }, { "showLabels", "ShowLabels", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr,show_labels), XtRImmediate, (XtPointer) True }, { "showLoadAvg", "ShowLoadAvg", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr,show_loadavg), XtRImmediate, (XtPointer) True }, { "showLoad", "ShowLoad", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr,show_load), XtRImmediate, (XtPointer) True }, { "showMem", "ShowMem", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr,show_mem), XtRImmediate, (XtPointer) True }, { "showSwap", "ShowSwap", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr,show_swap), XtRImmediate, (XtPointer) True }, { "smpKernel", "SmpKernel", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr,smp_kernel), XtRImmediate, (XtPointer) True } }; /* Command line options */ static XrmOptionDescRec options[] = { { "-update", "*.bar.update", XrmoptionSepArg, NULL }, { "-title", "*showTitle", XrmoptionNoArg, (XtPointer) "True" }, { "-notitle", "*showTitle", XrmoptionNoArg, (XtPointer) "False" }, { "-labels", "*showLabels", XrmoptionNoArg, (XtPointer) "True" }, { "-nolabels", "*showLabels", XrmoptionNoArg, (XtPointer) "False" }, { "-loadavg", "*showLoadAvg", XrmoptionNoArg, (XtPointer) "True" }, { "-noloadavg", "*showLoadAvg", XrmoptionNoArg, (XtPointer) "False" }, { "-load", "*showLoad", XrmoptionNoArg, "True" }, { "-noload", "*showLoad", XrmoptionNoArg, "False" }, { "-mem", "*showMem", XrmoptionNoArg, (XtPointer) "True" }, { "-nomem", "*showMem", XrmoptionNoArg, (XtPointer) "False" }, { "-swap", "*showSwap", XrmoptionNoArg, (XtPointer) "True" }, { "-noswap", "*showSwap", XrmoptionNoArg, (XtPointer) "False" }, { "-smp", "*smpKernel", XrmoptionNoArg, (XtPointer) "True" }, { "-nosmp", "*smpKernel", XrmoptionNoArg, (XtPointer) "False" } }; static String fallback_resources[] = { "*.title.label: Linux System Info", "*.loadavg*label: CPU Load Avg:", "*.load*label: CPU Load:", "*.mem*label: Memory: ", "*.swap*label: Swap: ", NULL }; static XtAppContext context; static struct meminfo swap[MAX_SWAPFILES]; static int swapfiles; static int memupdate_freq = 0; static void getloadavgCB( widget, client_data, call_data ) Widget widget; XtPointer client_data; XtPointer call_data; { XgBarGaugeValues *gauge = (XgBarGaugeValues *) call_data; gauge->values[0] = get_loadavg(); } static void getloadCB( widget, client_data, call_data ) Widget widget; XtPointer client_data; XtPointer call_data; { struct load load; XgBarGaugeValues *gauge = (XgBarGaugeValues *) call_data; load.cpu = (char *)malloc(7*sizeof(char)); strcpy(load.cpu, (char *)client_data); get_load(&load); gauge->values[0] = norm(load.user, load.total); gauge->values[1] = norm(load.system, load.total); gauge->values[2] = norm(load.nice, load.total); } static void update_meminfo() { static int count = 0; if ( count-- > 0 ) return; count = memupdate_freq; get_meminfo( &swapfiles, swap ); } static void getmemCB( widget, client_data, call_data ) Widget widget; XtPointer client_data; XtPointer call_data; { XgBarGaugeValues *gauge = (XgBarGaugeValues *) call_data; struct meminfo *mem = swap; update_meminfo(); if (mem->buffers >= 0) { /* New style /proc/meminfo format */ gauge->values[0] = norm(mem->total - mem->free - mem->cache - mem->buffers,mem->total); gauge->values[1] = norm(mem->cache + mem->buffers,mem->total); } else { /* Old style /proc/meminfo format (no buffers-entry) */ gauge->values[0] = norm(mem->total - mem->free - mem->cache, mem->total); gauge->values[1] = norm(mem->cache,mem->total); } } static void getswapCB( widget, client_data, call_data ) Widget widget; XtPointer client_data; XtPointer call_data; { XgBarGaugeValues *gauge = (XgBarGaugeValues *) call_data; int i; int total; update_meminfo(); if ( gauge->num_values != swapfiles ) XtVaSetValues( widget, XtNsegments, swapfiles, NULL); for ( total = i = 0; i < gauge->num_values; i++ ) total += swap[i + 1].total; for ( i = 0; i < gauge->num_values; i++ ) gauge->values[i] = norm(swap[i + 1].total - swap[i + 1].free, total); } static Widget create_gauge( name, parent, segs, valueproc, client_data ) String name; Widget parent; XtCallbackProc valueproc; int segs; XtPointer client_data; { Widget gauge; Widget bar; Widget label; gauge = XtCreateManagedWidget( name, formWidgetClass, parent, NULL, 0 ); if (appres.show_labels) { label = XtVaCreateManagedWidget( "name",labelWidgetClass,gauge, XtNright, XawChainLeft, NULL); bar = XtVaCreateManagedWidget( "bar",barGaugeWidgetClass,gauge, XtNsegments, segs, XtNfromHoriz, label, XtNleft, XawChainLeft, NULL); } else { bar = XtVaCreateManagedWidget( "bar",barGaugeWidgetClass,gauge, XtNsegments, segs, XtNleft, XawChainLeft, NULL); } XtAddCallback( bar, XtNgetValue, valueproc, client_data ); return bar; } static void create_app( top ) Widget top; { Widget form; Widget above_widget = NULL; Widget this; Widget bar; char *bufptr; int total_procs, i; form = XtCreateManagedWidget( "form", formWidgetClass, top, NULL, 0 ); if (appres.show_title) above_widget = XtVaCreateManagedWidget( "title", labelWidgetClass, form, XtNright, XawChainRight, NULL); if (appres.show_loadavg) { bar = create_gauge( "loadavg", form, 1, getloadavgCB, NULL ); XtVaSetValues( bar, XtNautoAdjust, True, NULL ); this = XtParent(bar); XtVaSetValues( this, XtNfromVert, above_widget, XtNright, XawChainRight, NULL ); above_widget = this; } if (appres.show_load) { total_procs = get_total_procs(); if(!appres.smp_kernel || total_procs == 1) { bufptr = (char *)malloc(7*sizeof(char)); sprintf(bufptr, "cpu "); this = XtParent(create_gauge( "load", form, 3, getloadCB, bufptr )); XtVaSetValues( this, XtNfromVert, above_widget, XtNright, XawChainRight, NULL ); above_widget = this; } else { for( i = 0; i < total_procs; i ++) { bufptr = (char *)malloc(7*sizeof(char)); sprintf(bufptr, "cpu%d ", i); this = XtParent(create_gauge( "load", form, 3, getloadCB, bufptr )); XtVaSetValues( this, XtNfromVert, above_widget, XtNright, XawChainRight, NULL ); above_widget = this; } } } if (appres.show_mem) { this = XtParent(create_gauge( "mem", form, 2, getmemCB, NULL )); XtVaSetValues( this, XtNfromVert, above_widget, XtNright, XawChainRight, NULL ); above_widget = this; memupdate_freq++; } if (appres.show_swap && swapfiles > 0) { this = XtParent(create_gauge( "swap", form, swapfiles, getswapCB, NULL )); XtVaSetValues( this, XtNfromVert, above_widget, XtNright, XawChainRight, NULL ); above_widget = this; memupdate_freq++; } if (above_widget == NULL) XtAppError( context,"All gauges disabled, nothing to show.\n" ); } static void show_usage() { fprintf(stderr,"xsysinfo version 1.7\n\n"); fprintf(stderr,"usage: xsysinfo [options...]\n\n"); fprintf(stderr,"where options include:\n"); #ifdef USE_MILLI_SECONDS /* (ThMO) */ fprintf(stderr,"-update set update rate to milli-seconds\n"); #else fprintf(stderr,"-update set update rate to seconds\n"); #endif fprintf(stderr,"-title (-notitle) show (don't show) title string\n"); fprintf(stderr,"-labels (-nolabels) show (don't show) gauge labels\n"); fprintf(stderr,"-loadavg (-noloadavg) show (don't show) CPU load average value\n"); fprintf(stderr,"-load (-noload) show (don't show) CPU load value\n"); fprintf(stderr,"-mem (-nomem) show (don't show) Memory info\n"); fprintf(stderr,"-swap (-noswap) show (don't show) Swap info\n"); fprintf(stderr,"-smp (-nosmp) smp (not smp) kernel\n"); fprintf(stderr,"-help show this message\n"); fprintf(stderr,"\nor one of the standard toolkit options.\n\n"); } main( argc, argv ) int argc; char **argv; { Arg args[1]; Widget toplevel; toplevel = XtAppInitialize( &context, "XSysinfo", options, XtNumber(options), &argc, argv, fallback_resources, NULL, 0 ); if (argc != 1) { show_usage(); exit(1); } XtGetApplicationResources( toplevel, &appres, application_resources, XtNumber( application_resources ), NULL, 0 ); if (sysinfo_init() != 0) { fprintf(stderr, "Proc filesystem isn't mounted on `/proc'.\n"); exit(1); } update_meminfo(); create_app( toplevel ); XtRealizeWidget(toplevel); XtAppMainLoop(context); } xsysinfo-1.7.orig/CHANGES0000644000175000001440000001211306713750456014233 0ustar mvelausersChanges from version 1.6 to 1.7: o Added full SMP support as follows: o the follow data and/or functions were modified to support a SMP kernel in sysinfo.h char *cpu field added to load struct // modified extern int get_total_procs( void ); // added o the follow data and/or functions were modified to support a SMP kernel in sysinfo.c void get_load(struct load * result) // modified int get_total_procs( void ); // added o the follow data and/or functions were modified to support a SMP kernel in xsysinfo.c struct AppData, *AppDataPtr // modified static XtResource application_resources[] // modified static XrmOptionDescRec options[] // modified static void getloadCB( widget, client_data, call_data ) // modified static void create_app( top ) // modified o Added a define to allow turning off of the now default SMP mode. Turning off SMP mode on a SMP enabled kernel will display the the average of all the cpu's load which is still contained on on the first line of /proc/stat Mike Mondragon Changes from version 1.5 to 1.6: o Added a define to allow specifying the update time in milli-seconds. This is currently the default. To change the behaviour edit the Imakefile and XSysinfo.ad, call `imake', `make clean' and `make'. This change was contributed by Thomas M. Ott . o Added support for /proc/swaps in newer (2.1.24) kernels. This pseudo file gives information about every swapfile used by the system. This change was contributed by Florian Depke . o Fixed a cosmetical bug which leaves space between the right end of the bar and the right end of the gauge if the bar should have the same width as the gauge. o There was a bug which cause a segmentation fault after starting xsysinfo if compiled without optimization. This is now fixed. o minor changes to the X resources o The changes in xsysinfo are now explained in a separate CHANGES file. o Added "Maintained-by:" to the LSM file. Ronald Wahl Changes from version 1.4 to 1.5: o The mem-bar now consist of two segments only: used memory and cache/buffers. o Rename the load to loadavg. o Replaced the idle bar with a load bar consisting of three segments: user load/system load/nice load o Added a define to allow empty segments to disappear (currently the default). Otherwise every segment will be at least 1 pixel wide. To change the behaviour edit the Imakefile, call `imake', `make clean' and `make'. o Changed color of some bars. Ronald Wahl Changes from version 1.3 to 1.4: o Fixed mem-bar that was broken in 1.3. Removed 4th segment again and merged buffers & cached. o Added -nolabels switch for use with fvwm's GoodStuff (thanks to Ronald Wahl for patches) Martin Buck Changes from version 1.2 to 1.3: o Made xsysinfo understand new /proc/meminfo format introduced in 1.3.x kernels. o Split mem-bar into 4 segments (data, shared, buffers, cached) if info is available. Martin Buck Changes from version 1.1 to 1.2: o load value The gauge for CPU load is now capable to display values up to 8.0. The bar is automatically subdivided in segments when necessary (see. below). o proc filesystem The proc filesystem under kernel 0.99pl5 reports the absolute CPU idle time in file /proc/uptime and not like the earlier kernels, with my patches applied, in file /proc/idle. I changed xsysinfo to obtain the idle value from uptime. o swap display The 0.99pl5 kernel doesn't support a detailed swap space reporting in /proc/meminfo any longer. Only the total swap space statistics can be obtained, so the swap gauge of xsysinfo is not segmented as in version 1.1. o color resources There is a separate resource file for color displays, which is loaded automatically by X's customizations mechanism (see below). Changes from version 1.0 to 1.1: o proc filesystem I have completely rewritten the code to get the kernel params. It now uses the proc filesystem, which made the whole stuff a lot easier. Another advantage of the proc fs is, that xsysinfo can run under normal permissions and need not to be recompiled with every new kernel release. o memory display changed The two gauges for memory and cache sizes are now merged together. The new gauge is still in form of a bar, but is subdivided into three `segments', each displayed in a different color. The meaning of the three segments is: buffer cache, shared part of memory, non-shared part of memory. The length of the whole bar is proportional to the amount of all used memory. o more than one swap area supported The gauge for swap size is now also subdivided, one `segment' for each swap file/partition. o gauges now can be disabled Now it is possible to disable each of the gauges either through application resources or through command line options. xsysinfo-1.7.orig/Makefile.readhat0000644000175000001440000005316006713752046016313 0ustar mvelausers# Makefile generated by imake - do not edit! # $TOG: imake.c /main/97 1997/06/20 20:23:51 kaleb $ # ---------------------------------------------------------------------- # Makefile generated from "Imake.tmpl" and # $TOG: Imake.tmpl /main/245 1997/05/20 10:05:47 kaleb $ # # # # # $XFree86: xc/config/cf/Imake.tmpl,v 3.32.2.5 1997/07/06 07:27:59 dawes Exp $ # ---------------------------------------------------------------------- all:: .SUFFIXES: .i # $TOG: Imake.cf /main/28 1997/06/25 08:31:36 barstow $ # $XFree86: xc/config/cf/Imake.cf,v 3.34.2.3 1997/07/27 02:41:02 dawes Exp $ # ----------------------------------------------------------------------- # site-specific configuration parameters that need to come before # the platform-specific parameters - edit site.def to change # site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $ # site: $XFree86: xc/config/cf/site.def,v 3.17.2.1 1997/06/22 10:32:21 dawes Exp $ # $XFree86: xc/config/cf/xf86site.def,v 3.101.2.11 1997/06/22 10:32:22 dawes Exp $ # ---------------------------------------------------------------------- # platform-specific configuration parameters - edit linux.cf to change # platform: $TOG: linux.cf /main/36 1997/06/16 22:21:03 kaleb $ # platform: $XFree86: xc/config/cf/linux.cf,v 3.57.2.10 1997/07/28 14:17:25 dawes Exp $ # operating system: Linux 2.0.29 i686 [ELF] (2.0.29) # libc: (5.3.12) # binutils: (27) # $XConsortium: lnxLib.rules /main/13 1996/09/28 16:11:01 rws $ # $XFree86: xc/config/cf/lnxLib.rules,v 3.28.2.3 1997/06/22 10:32:20 dawes Exp $ # $XFree86: xc/config/cf/xfree86.cf,v 3.129.2.14 1997/07/06 07:28:00 dawes Exp $ # $XConsortium: xfree86.cf /main/34 1996/12/06 11:45:18 rws $ LINKKITDIR = $(USRLIBDIR)/Server XF98LINKKITDIR = $(USRLIBDIR)/Server XF86SRC = $(SERVERSRC)/hw/xfree86 XF86ACCELSRC = $(XF86SRC)/accel XF86COMSRC = $(XF86SRC)/common XF86CONFIGSRC = $(XF86COMSRC) XF86HWSRC = $(XF86SRC)/common_hw XF86OSSRC = $(XF86SRC)/os-support VGADRIVERSRC = $(XF86SRC)/vga256/drivers VGA16DRIVERSRC = $(XF86SRC)/vga16/drivers VGA2DRIVERSRC = $(XF86SRC)/vga2/drivers MONODRIVERSRC = $(XF86SRC)/mono/drivers S3DRIVERSRC = $(XF86SRC)/accel/s3/drivers S3VDRIVERSRC = $(XF86SRC)/accel/s3_virge/drivers XF68SRC = $(SERVERSRC)/hw/xfree68 XF68COMSRC = $(XF68SRC)/common XF68CONFIGSRC = $(XF68COMSRC) XF68OSSRC = $(XF68SRC)/os-support XF98SRC = $(SERVERSRC)/hw/xfree98 XF98ACCELSRC = $(XF98SRC)/accel XF98COMSRC = $(XF98SRC)/common XF98CONFIGSRC = $(XF98COMSRC) XF98HWSRC = $(XF98SRC)/common_hw/generic XF98HWNECSRC = $(XF98SRC)/common_hw/nec XF98HWPWSKBSRC = $(XF98SRC)/common_hw/pwskb XF98HWPWLBSRC = $(XF98SRC)/common_hw/pwlb XF98HWGA968SRC = $(XF98SRC)/common_hw/ga968 XF98OSSRC = $(XF98SRC)/os-support XF98VGADRIVERSRC = $(XF98SRC)/vga256/drivers XF98VGA16DRIVERSRC = $(XF98SRC)/vga16/drivers XF98VGA2DRIVERSRC = $(XF98SRC)/vga2/drivers XF98MONODRIVERSRC = $(XF98SRC)/mono/drivers XF98NECS3DRIVERSRC = $(XF98SRC)/accel/s3nec/drivers XF98PWSKBDRIVERSRC = $(XF98SRC)/accel/s3pwskb/drivers XF98PWLBDRIVERSRC = $(XF98SRC)/accel/s3pwlb/drivers XF98GA968DRIVERSRC = $(XF98SRC)/accel/s3ga968/drivers XFREE86DOCDIR = $(LIBDIR)/doc XFREE86PSDOCDIR = $(XFREE86DOCDIR)/PostScript XFREE86HTMLDOCDIR = $(XFREE86DOCDIR)/html XFREE86JAPANESEDOCDIR = $(XFREE86DOCDIR)/Japanese # $XConsortium: xf86.rules /main/9 1996/10/31 14:54:26 kaleb $ # $XFree86: xc/config/cf/xf86.rules,v 3.16.2.1 1997/05/18 12:00:01 dawes Exp $ # ---------------------------------------------------------------------- # site-specific configuration parameters that go after # the platform-specific parameters - edit site.def to change # site: $XConsortium: site.def /main/revisionist/4 1996/12/31 08:02:07 kaleb $ # site: $XFree86: xc/config/cf/site.def,v 3.17.2.1 1997/06/22 10:32:21 dawes Exp $ # --------------------------------------------------------------------- # Imake rules for building libraries, programs, scripts, and data files # rules: $TOG: Imake.rules /main/222 1997/07/17 20:04:40 kaleb $ # rules: $XFree86: xc/config/cf/Imake.rules,v 3.33.2.5 1997/07/19 04:59:07 dawes Exp $ _NULLCMD_ = @ echo -n TKLIBNAME = tk4.2 TKLIBDIR = /usr/local/lib TCLLIBNAME = tcl7.6 TCLIBDIR = /usr/local/lib PATHSEP = / SHELL = /bin/sh TOP = . CURRENT_DIR = . IMAKE = imake DEPEND = gccmakedep MKDIRHIER = mkdir -p EXPORTLISTGEN = CONFIGSRC = $(TOP)/config IMAKESRC = $(CONFIGSRC)/imake DEPENDSRC = $(CONFIGSRC)/util INCROOT = /usr/X11R6/include USRLIBDIR = /usr/X11R6/lib VARLIBDIR = /var/lib SHLIBDIR = /usr/X11R6/lib LINTLIBDIR = $(USRLIBDIR)/lint MANPATH = /usr/X11R6/man MANSOURCEPATH = $(MANPATH)/man MANDIR = $(MANSOURCEPATH)1 LIBMANDIR = $(MANSOURCEPATH)3 FILEMANDIR = $(MANSOURCEPATH)5 AR = ar clq BOOTSTRAPCFLAGS = CC = gcc AS = as .SUFFIXES: .cc CXX = c++ CXXFILT = c++filt CXXLIB = CXXDEBUGFLAGS = -O2 -fno-strength-reduce CXXDEPENDINCLUDES = CXXEXTRA_DEFINES = CXXEXTRA_INCLUDES = CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE $(CXXPROJECT_DEFINES) CXXOPTIONS = CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES) $(DEFINES) CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) COMPRESS = compress GZIPCMD = gzip CPP = /lib/cpp $(STD_CPP_DEFINES) PREPROCESSCMD = gcc -E $(STD_CPP_DEFINES) INSTALL = install INSTALLFLAGS = -c LD = ld LEX = flex -l LEXLIB = -lfl YACC = bison -y CCYACC = bison -y LINT = lint LINTLIBFLAG = -C LINTOPTS = -axz LN = ln -s MAKE = make MV = mv -f CP = cp RANLIB = ranlib RANLIBINSTFLAGS = RM = rm -f MANSUFFIX = 1x LIBMANSUFFIX = 3x FILEMANSUFFIX = 5x TROFF = psroff NROFF = nroff MSMACROS = -ms MANMACROS = -man TBL = tbl EQN = eqn NEQN = neqn COL = col DVIPS = dvips LATEX = latex STD_INCLUDES = STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE $(PROJECT_DEFINES) STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DX_LOCALE $(PROJECT_DEFINES) EXTRA_LOAD_FLAGS = EXTRA_LDOPTIONS = EXTRA_LIBRARIES = TAGS = ctags PARALLELMFLAGS = SHAREDCODEDEF = SHLIBDEF = SHLIBLDFLAGS = -shared PICFLAGS = -fPIC CXXPICFLAGS = -fPIC PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO INSTPGMFLAGS = -s INSTBINFLAGS = -m 0755 INSTUIDFLAGS = -m 4711 INSTLIBFLAGS = -m 0644 INSTINCFLAGS = -m 0444 INSTMANFLAGS = -m 0444 INSTDATFLAGS = -m 0444 INSTKMEMFLAGS = -m 4711 PROJECTROOT = /usr/X11R6 CDEBUGFLAGS = -O2 -fno-strength-reduce CCOPTIONS = ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) LDPRELIB = -L$(USRLIBDIR) LDPOSTLIB = LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) CCLINK = $(CC) CXXLINK = $(CXX) LDSTRIPFLAGS = -x LDCOMBINEFLAGS = -r DEPENDFLAGS = # Not sure this belongs here TKLIBDIR = /usr/local/lib TKINCDIR = /usr/local/include TKLIBNAME = tk4.2 TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) TCLLIBDIR = /usr/local/lib TCLINCDIR = /usr/local/include TCLLIBNAME = tcl7.6 TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) MACROFILE = linux.cf RM_CMD = $(RM) IMAKE_DEFINES = IRULESRC = $(CONFIGDIR) IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xf86site.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) # $TOG: X11.rules /main/4 1997/04/30 15:23:24 kaleb $ # ---------------------------------------------------------------------- # X Window System Build Parameters and Rules # $TOG: X11.tmpl /main/292 1997/05/20 10:05:59 kaleb $ # # # # # $XFree86: xc/config/cf/X11.tmpl,v 1.8.2.3 1997/05/21 15:02:13 dawes Exp $ # ----------------------------------------------------------------------- # X Window System make variables; these need to be coordinated with rules XTOP = $(TOP) BINDIR = /usr/X11R6/bin BUILDINCROOT = $(TOP)/exports BUILDINCDIR = $(BUILDINCROOT)/include BUILDINCTOP = ../.. BUILDLIBDIR = $(TOP)/exports/lib BUILDLIBTOP = ../.. BUILDBINDIR = $(TOP)/exports/bin BUILDBINTOP = ../.. XBUILDINCROOT = $(XTOP)/exports XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 XBUILDINCTOP = ../../.. XBUILDBINDIR = $(XBUILDINCROOT)/bin INCDIR = $(INCROOT) ADMDIR = /usr/adm LIBDIR = $(USRLIBDIR)/X11 TOP_X_INCLUDES = -I$(XPROJECTROOT)/include FONTDIR = $(LIBDIR)/fonts XINITDIR = $(LIBDIR)/xinit XDMDIR = $(LIBDIR)/xdm XDMVARDIR = $(VARLIBDIR)/xdm TWMDIR = $(LIBDIR)/twm XSMDIR = $(LIBDIR)/xsm NLSDIR = $(LIBDIR)/nls XLOCALEDIR = $(LIBDIR)/locale PEXAPIDIR = $(LIBDIR)/PEX LBXPROXYDIR = $(LIBDIR)/lbxproxy PROXYMANAGERDIR = $(LIBDIR)/proxymngr XPRINTDIR = $(LIBDIR) XAPPLOADDIR = $(LIBDIR)/app-defaults FONTCFLAGS = -t INSTAPPFLAGS = $(INSTDATFLAGS) RGB = rgb FONTC = bdftopcf MKFONTDIR = mkfontdir DOCUTILSRC = $(XTOP)/doc/util CLIENTSRC = $(TOP)/clients DEMOSRC = $(TOP)/demos XDOCMACROS = $(DOCUTILSRC)/macros.t XIDXMACROS = $(DOCUTILSRC)/indexmacros.t PROGRAMSRC = $(TOP)/programs LIBSRC = $(XTOP)/lib FONTSRC = $(XTOP)/fonts INCLUDESRC = $(BUILDINCROOT)/include XINCLUDESRC = $(INCLUDESRC)/X11 SERVERSRC = $(XTOP)/programs/Xserver CONTRIBSRC = $(XTOP)/../contrib UNSUPPORTEDSRC = $(XTOP)/unsupported DOCSRC = $(XTOP)/doc RGBSRC = $(XTOP)/programs/rgb BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir FONTSERVERSRC = $(PROGRAMSRC)/xfs FONTINCSRC = $(XTOP)/include/fonts EXTINCSRC = $(XTOP)/include/extensions TRANSCOMMSRC = $(LIBSRC)/xtrans TRANS_INCLUDES = -I$(TRANSCOMMSRC) XENVLIBDIR = $(USRLIBDIR) CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) # $XConsortium: lnxLib.tmpl,v 1.5 95/01/11 21:44:44 kaleb Exp $ # $XFree86: xc/config/cf/lnxLib.tmpl,v 3.9 1996/02/24 04:32:52 dawes Exp $ XLIBSRC = $(LIBSRC)/X11 SOXLIBREV = 6.1 DEPXONLYLIB = XONLYLIB = -lX11 LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln XLIBONLY = $(XONLYLIB) XEXTLIBSRC = $(LIBSRC)/Xext SOXEXTREV = 6.3 DEPEXTENSIONLIB = EXTENSIONLIB = -lXext LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln LINTEXTENSIONLIB = $(LINTEXTENSION) DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) XLIB = $(EXTENSIONLIB) $(XONLYLIB) LINTXLIB = $(LINTXONLYLIB) XSSLIBSRC = $(LIBSRC)/Xss DEPXSSLIB = $(USRLIBDIR)/libXss.a XSSLIB = -lXss LINTXSS = $(LINTLIBDIR)/llib-lXss.ln XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc DEPXXF86MISCLIB = $(USRLIBDIR)/libXxf86misc.a XXF86MISCLIB = -lXxf86misc LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm DEPXXF86VMLIB = $(USRLIBDIR)/libXxf86vm.a XXF86VMLIB = -lXxf86vm LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga DEPXXF86DGALIB = $(USRLIBDIR)/libXxf86dga.a XXF86DGALIB = -lXxf86dga LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln XDPMSLIBSRC = $(LIBSRC)/Xdpms DEPXDPMSLIB = $(USRLIBDIR)/libXdpms.a XDPMSLIB = -lXdpms LINTXDPMS = $(LINTLIBDIR)/llib-lXdpms.ln XAUTHSRC = $(LIBSRC)/Xau DEPXAUTHLIB = $(USRLIBDIR)/libXau.a XAUTHLIB = -lXau LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln XDMCPLIBSRC = $(LIBSRC)/Xdmcp DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a XDMCPLIB = -lXdmcp LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln XMUSRC = $(LIBSRC)/Xmu SOXMUREV = 6.0 DEPXMULIB = XMULIB = -lXmu LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln OLDXLIBSRC = $(LIBSRC)/oldX DEPOLDXLIB = $(USRLIBDIR)/liboldX.a OLDXLIB = -loldX LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln XPLIBSRC = $(LIBSRC)/Xp SOXPREV = 6.2 DEPXPLIB = XPLIB = -lXp LINTXP = $(LINTLIBDIR)/llib-lXp.ln TOOLKITSRC = $(LIBSRC)/Xt SOXTREV = 6.0 DEPXTOOLONLYLIB = XTOOLONLYLIB = -lXt LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) LINTXTOOLLIB = $(LINTXTOOLONLYLIB) XALIBSRC = $(LIBSRC)/Xa SOXAREV = 1.0 DEPXALIB = XALIB = -lXa LINTXA = $(LINTLIBDIR)/llib-lXa.ln AWIDGETSRC = $(LIBSRC)/Xaw SOXAWREV = 6.1 DEPXAWLIB = XAWLIB = -lXaw LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln XILIBSRC = $(LIBSRC)/Xi SOXINPUTREV = 6.0 DEPXILIB = XILIB = -lXi LINTXI = $(LINTLIBDIR)/llib-lXi.ln XTESTLIBSRC = $(LIBSRC)/Xtst SOXTESTREV = 6.1 DEPXTESTLIB = XTESTLIB = -lXtst LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln PEXLIBSRC = $(LIBSRC)/PEX5 SOPEXREV = 6.0 DEPPEXLIB = PEXLIB = -lPEX5 LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln XIELIBSRC = $(LIBSRC)/XIE SOXIEREV = 6.0 DEPXIELIB = XIELIB = -lXIE LINTXIE = $(LINTLIBDIR)/llib-lXIE.ln PHIGSLIBSRC = $(LIBSRC)/PHIGS DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a PHIGSLIB = -lphigs LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a XBSDLIB = -lXbsd LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln ICESRC = $(LIBSRC)/ICE SOICEREV = 6.3 DEPICELIB = ICELIB = -lICE LINTICE = $(LINTLIBDIR)/llib-lICE.ln SMSRC = $(LIBSRC)/SM SOSMREV = 6.0 DEPSMLIB = SMLIB = -lSM LINTSM = $(LINTLIBDIR)/llib-lSM.ln XKEYSRC = $(LIBSRC)/Xkey SOXKEYREV = 6.0 DEPXKEYLIB = XKEYLIB = -lXkey LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln FSLIBSRC = $(LIBSRC)/FS DEPFSLIB = $(USRLIBDIR)/libFS.a FSLIB = -lFS LINTFS = $(LINTLIBDIR)/llib-lFS.ln FONTLIBSRC = $(LIBSRC)/font DEPFONTLIB = $(USRLIBDIR)/libfont.a FONTLIB = -lfont LINTFONT = $(LINTLIBDIR)/llib-lfont.ln XPMLIBSRC = $(LIBSRC)/Xpm DEPXPMLIB = $(USRLIBDIR)/libXpm.a XPMLIB = -lXpm LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln XKBFILELIBSRC = $(LIBSRC)/xkbfile DEPXKBFILELIB = $(USRLIBDIR)/libxkbfile.a XKBFILELIB = -lxkbfile LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln XKBCOMPCMD = xkbcomp XKBUILIBSRC = $(LIBSRC)/xkbui DEPXKBUILIB = $(USRLIBDIR)/libxkbui.a XKBUILIB = -lxkbui LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) DEPLIBS1 = $(DEPLIBS) DEPLIBS2 = $(DEPLIBS) DEPLIBS3 = $(DEPLIBS) DEPLIBS4 = $(DEPLIBS) DEPLIBS5 = $(DEPLIBS) DEPLIBS6 = $(DEPLIBS) DEPLIBS7 = $(DEPLIBS) DEPLIBS8 = $(DEPLIBS) DEPLIBS9 = $(DEPLIBS) DEPLIBS10 = $(DEPLIBS) XMULIBONLY = -lXmu XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) CONFIGDIR = $(LIBDIR)/config USRLIBDIRPATH = $(USRLIBDIR) LDPRELIBS = -L$(USRLIBDIR) LDPOSTLIBS = TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) PROJECT_DEFINES = CXXPROJECT_DEFINES = # ---------------------------------------------------------------------- # start of Imakefile EXTRA_DEFINES = -DALLOW_EMPTY_SEGMENTS EXTRA_DEFINES += -DUSE_MILLI_SECONDS LOCAL_LIBRARIES = $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB) DEPLIBS= SRCS = BarGauge.c sysinfo.c xsysinfo.c OBJS = $(SRCS:.c=.o) PROGRAM = xsysinfo all:: xsysinfo xsysinfo: $(OBJS) $(DEPLIBS) $(RM) $@ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) install:: xsysinfo @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) xsysinfo $(DESTDIR)$(BINDIR)/xsysinfo install.man:: xsysinfo.man @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xsysinfo.man $(DESTDIR)$(MANDIR)/xsysinfo.$(MANSUFFIX) depend:: $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) lint: $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) lint1: $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) clean:: $(RM) xsysinfo install:: XSysinfo.ad @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XSysinfo.ad $(DESTDIR)$(XAPPLOADDIR)/XSysinfo install:: XSysinfo-color.ad @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \ else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XSysinfo-color.ad $(DESTDIR)$(XAPPLOADDIR)/XSysinfo-color # ---------------------------------------------------------------------- # common rules for all Makefiles - do not edit .c.i: $(RM) $@ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ emptyrule:: clean:: $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* Makefile:: -@if [ -f Makefile ]; then set -x; \ $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ else exit 0; fi $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) tags:: $(TAGS) -w *.[ch] $(TAGS) -xw *.[ch] > TAGS man_keywords:: # ---------------------------------------------------------------------- # empty rules for directories that do not have SUBDIRS - do not edit install:: @echo "install in $(CURRENT_DIR) done" install.man:: @echo "install.man in $(CURRENT_DIR) done" install.linkkit:: @echo "install.linkkit in $(CURRENT_DIR) done" Makefiles:: includes:: depend:: # ---------------------------------------------------------------------- # dependencies generated by makedepend # DO NOT DELETE BarGauge.o: BarGauge.c /usr/include/stdio.h /usr/include/features.h \ /usr/include/sys/cdefs.h /usr/include/libio.h \ /usr/include/_G_config.h /usr/X11R6/include/X11/IntrinsicP.h \ /usr/X11R6/include/X11/Intrinsic.h /usr/X11R6/include/X11/Xlib.h \ /usr/include/sys/types.h /usr/include/linux/types.h \ /usr/include/linux/posix_types.h /usr/include/asm/posix_types.h \ /usr/include/asm/types.h /usr/include/sys/bitypes.h \ /usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \ /usr/X11R6/include/X11/Xosdefs.h \ /usr/lib/gcc-lib/i386-linux/2.7.2.1/include/stddef.h \ /usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/Xresource.h \ /usr/include/string.h /usr/X11R6/include/X11/Core.h \ /usr/X11R6/include/X11/Composite.h \ /usr/X11R6/include/X11/Constraint.h /usr/X11R6/include/X11/Object.h \ /usr/X11R6/include/X11/RectObj.h /usr/X11R6/include/X11/CoreP.h \ /usr/X11R6/include/X11/CompositeP.h \ /usr/X11R6/include/X11/ConstrainP.h /usr/X11R6/include/X11/ObjectP.h \ /usr/X11R6/include/X11/RectObjP.h /usr/X11R6/include/X11/StringDefs.h \ /usr/X11R6/include/X11/Xaw/XawInit.h BarGaugeP.h BarGauge.h \ /usr/X11R6/include/X11/Xaw/SimpleP.h \ /usr/X11R6/include/X11/Xaw/Simple.h \ /usr/X11R6/include/X11/Xmu/Converters.h \ /usr/X11R6/include/X11/Xfuncs.h sysinfo.o: sysinfo.c sysinfo.h /usr/include/stdio.h \ /usr/include/features.h /usr/include/sys/cdefs.h /usr/include/libio.h \ /usr/include/_G_config.h /usr/include/unistd.h \ /usr/include/posix_opt.h /usr/include/gnu/types.h \ /usr/lib/gcc-lib/i386-linux/2.7.2.1/include/stddef.h \ /usr/include/confname.h /usr/include/sys/types.h \ /usr/include/linux/types.h /usr/include/linux/posix_types.h \ /usr/include/asm/posix_types.h /usr/include/asm/types.h \ /usr/include/sys/bitypes.h /usr/include/string.h /usr/include/fcntl.h \ /usr/include/linux/fcntl.h /usr/include/asm/fcntl.h xsysinfo.o: xsysinfo.c /usr/X11R6/include/X11/Intrinsic.h \ /usr/X11R6/include/X11/Xlib.h /usr/include/sys/types.h \ /usr/include/linux/types.h /usr/include/linux/posix_types.h \ /usr/include/asm/posix_types.h /usr/include/asm/types.h \ /usr/include/sys/bitypes.h /usr/X11R6/include/X11/X.h \ /usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \ /usr/lib/gcc-lib/i386-linux/2.7.2.1/include/stddef.h \ /usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/Xresource.h \ /usr/include/string.h /usr/include/features.h \ /usr/include/sys/cdefs.h /usr/X11R6/include/X11/Core.h \ /usr/X11R6/include/X11/Composite.h \ /usr/X11R6/include/X11/Constraint.h /usr/X11R6/include/X11/Object.h \ /usr/X11R6/include/X11/RectObj.h /usr/X11R6/include/X11/StringDefs.h \ /usr/X11R6/include/X11/Xaw/Form.h /usr/X11R6/include/X11/Xaw/Label.h \ /usr/X11R6/include/X11/Xaw/Simple.h \ /usr/X11R6/include/X11/Xmu/Converters.h BarGauge.h \ /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \ sysinfo.h xsysinfo-1.7.orig/xsysinfo-1.7.lsm0000644000175000001440000000073306713757545016155 0ustar mvelausersBegin3 Title: xsysinfo Version: 1.7 Entered-date: 14OKT97 Description: Displays CPU load average, CPU load, memory and swap sizes in an X window Keywords: system status Author: herr@iti.informatik.th-darmstadt.de (Gabor Herr) Maintained-by: ronald.wahl@informatik.tu-chemnitz.de (Ronald Wahl) Primary-site: sunsite.unc.edu /pub/Linux/system/status/xstatus 27kB xsysinfo-1.6.tar.gz Copying-policy: BSD End