home *** CD-ROM | disk | FTP | other *** search
- README for XMON - Graphically monitor a list
-
- George Ferguson, ferguson@cs.rochester.edu
-
- 7 Aug 1990
-
- DISCLAIMER:
-
- This is an ALPHA release. While it has been in use for some time
- at our site, there are certainly many bugs left to find.
-
- This software is provided as is with no warranty expressed or implied.
- I hope you find it useful, but I won't be held responsable for
- any damage that may occur from reading, compiling, installing or
- using it.
-
- You are free to use any part of this code for other purposes. It
- would be nice if you could keep my name on some part of whatever the
- final product is.
-
- Note: This program is similar in functionality to the Faceserver
- program posted to the net previously. (Actually I don't know that
- since I never saw it run, only read the documentation.) Xmon is
- a much less ambitious program whose purpose was to (a) provide some
- useful tools, and (b) produce code that could by used to simplify
- future X projects. No infringement on the Faceserver code is
- intended, and I hope none is perceived.
-
- OVERVIEW:
-
- Xmon is a program which monitors a list and displays its contents
- graphically in an X window. The list is usually generated by a
- command and the updates performed at regular intervals. Xmon is
- built using the Athena widgets. The icons to be displayed are
- standard X bitmap files (32x32 size normally) which can be created
- with the "bitmap" program as documented in the man page.
-
- Xmon by itself is not very interesting, but using xmon as a core we
- have built more useful tools including: xru (monitor users), xrf
- (monitor machines), xls (directory browser), and xfrom (monitor
- mailbox). These specializations are performed using Athena widget
- resources.
-
- This distribution includes code that can easily be used for other
- X applications. In particular, translate.c implements a mapping
- between class names and Widget classes which, together with the function
- initWidgets() in xmon.c, implements dynamic creation of all the widgets
- in an application for complete "customizability".
-
- Many utility programs are included in this distribution, including
- ad2c (convert app-defaults files to C declarations), ru-awk and rf-awk
- (filters for rwho and ruptime), and some other stuff in the util
- directory.
-
- PRINCIPLES OF OPERATION:
-
- This is my feeble attempt to explain how the code works so that those
- who want to customize it at either the C code or resource levels can
- do so.
-
- The basic principle is that xmon (or whatever derived program in class
- Xmon) runs the command specified by the updateCommand resource at a
- rate given by the updateInterval resource. The output is gathered and
- if the nameCommand resourec is non-NULL it is piped through that command.
- The first word of each line of the result used as the name of an icon
- to look for in the directory given by the faceDirectory resource. If
- it is not found then a default icon is used. The icons are displayed
- in a Box widget (by default, and I don't see why you'd change it).
-
- In order to speed things up, xmon caches both Widgets and Bitmaps,
- the former to prevent extra calls to XtCreateManagedWidget() and the
- latter to avoid extra XReadBitmapFromFile() calls. There is a
- translation action (xmon-reinit()) which clears the cache.
-
- The anticipated most common usage is to click on a "face". By default
- this puts the entire line of text from the updateCommand into the
- infoLabel widget. Xmon allows you complete control over what widgets you
- want. In particular, you can create buttons which use information from
- the currently selected "face" to create a command to execute. This is
- provided by the xmon-cmd() translation action which is fully documented
- in the man page. Some other actions are also provided, see the man page.
-
- INSTALLATION:
-
- 1. Edit the Imakefile to reflect any changes for your site. These
- include setting BINDIR, LIBDIR, and MANDIR if needed, and
- checking CDEBUGFLAGS if debugging or optimization is desired.
-
- The variable FACEDIR should be where the face icons will live
- and should be the same as the entry for Xmon.faceDirectory in
- Xmon.ad. The directory will be created if necessary.
-
- The variable XMONDIR should be where any utility programs will
- live, and will also be created if necessary.
-
- If you want to use any of the utility programs like ru-awk, rf-awk,
- name2icon or xls-cmd, make sure that the definition of UTIL includes
- the ones you want so they will be installed correctly.
-
- If you've installed "ad2c" you may want to change the declaration
- of AD2C.
-
- See the comment concerning the derived tools under (4) below.
-
- 2. Edit Xmon.ad as well, checking especially the entries for
- Xmon.faceDirectory
- *.updateCommand
- *.nameCommand
- You may also want to change other defaults; consult the man page for
- details. Note that the application-defaults file contains the defaults
- for the entire Xmon _class_ of programs, which includes xru, xrf, xls
- and xfrom, so be sure to check the whole file for necessary changes.
-
- If you use the utility program "xls-cmd" (in the util directory),
- edit it so that the xmon executable is properly found. You may not
- need a full path if xmon lives in a standard directory. The utility
- program "name2icon" is used in the xls.nameCommand resource; it
- should be edited to reflect your installation (use XMONDIR).
-
- The FILES section of the man page xmon.man should be edited to reflect
- the locations of the various files.
-
- 2. Execute
- % xmkmf
- to create the Makefile.
-
- 3. Execute
- % make depend
- to add the dependencies to the Makefile. This is necessary to
- ensure that Xmon.ad.h is created when needed.
- IMPORTANT: Ignore the error message from makedepend when Xmon.ad.h
- is not found; it will be created automatically.
-
- 4. Make the package using
- % make
- or install it directly with
- % make install install.man
- The default installation will create symbolic links for xru, xrf,
- xls and xfrom in BINDIR. Alternatively you can achieve this effect by
- invoking xmon with the "-name" option, either from an alias or a
- shell script, as described in the man page. You can install shell
- scripts automatically by editing the Imakefile; see the comments
- above the "install::" target.
-
-
-