[1002] in linux-announce channel archive
Xwatch 1.02 is out and uploaded
daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Sat Sep 2 10:08:11 1995
Date: Fri, 1 Sep 1995 23:58:46 +0300
From: Lars Wirzenius <wirzeniu@cc.helsinki.fi>
To: linux-announce@vger.rutgers.edu
From: Karel Kubat <karel@bambix.icce.rug.nl>
Subject: Xwatch 1.02 is out and uploaded
Newsgroups: comp.os.linux.announce
Approved: linux-announce@news.ornl.gov (Lars Wirzenius)
Organization: ?
Followup-to: comp.os.linux.x
Hi,
This message goes to the sysops of sunsite.unc.edu and of tsx-11.mit.edu, and
to the c.o.l.announce list.
I've recently uploaded xwatch-1.02.tar.gz (plus xwatch.README and xwatch.lsm)
to the incoming directories on tsx-11 and sunsite. The archive is also
available on the primary site: ftp://ftp.icce.rug.nl/pub/unix/. Btw, ftp is
still uploading now to sunsite, though 100% is complete (just hope the files
will get there eventually). Just incase, if you want it, get it from
ftp.icce.rug.nl.
Version 1.02 supports, in contrast to 1.01, different text colors for
different files. E.g., you can decide to watch all files in /var/adm in the
`standard' color (say, black) but /var/adm/critical in red because you think
that it's more important.
For the sysops: please kindly move the files to their appropriate places. For
the readers of the announces list: below follows xwatch.lsm and xwatch.README.
Begin3
Title: xwatch: Logfile watcher under X-windows
Version: 1.02
Entered-date: 1995
Description: Xwatch will monitor logfiles and display new information on
them in a window under X. Basically, you get to see what's
going on _during_ say a break-in, instead of having to check
the logfiles after the damage is done. Of course, you need to
have the syslog daemons configured right, so that the logfiles
are created.. Xwatch reads options from its commandline as
well as from a app-defaults resource file (example supplied).
Keywords: logfiles watcher
Author: karel@icce.rug.nl (Karel Kubat)
Maintained-by: karel@icce.rug.nl (Karel Kubat)
Primary-site: ftp.icce.rug.nl: /pub/unix/xwatch-X.YY.tar.gz
Alternate-site: sunsite.unc.edu: no idea where
tsx-11.mit.edu : no idea where
Copying-policy: PostcardWare (if you like it, send me a postcard)
MegaHard (who wants a Microsoft)
but really: GPL
End
-----------------------------------------------------------------------------
XWATCH
Logfile watcher for X
Karel Kubat (karel@icce.rug.nl)
-----------------------------------------------------------------------------
Introduction
Xwatch is a small program that I wrote to monitor logfiles and to see any
changes _directly_ (instead of having to read all the logs after a breakin
or a crash). Xwatch is simply started with a few file arguments, and any
information that appears on the files is displayed. With a slider you can
see past information; i.e., lines that scroll in xwatch's window. A small
button activates an `options' window, in which you can set a number of
parameters. All such parameters can also be set via flags on the
commandline or via an application-defaults file.
Xwatch is incidentally my first applications with the XForms GUI library
for X, which I can highly recommend for developers who want to start `X
programming' but who don't want to go through the hassle of having to
learn about intrinsics. XForms is really excellent. Congrats, T.C. Zhao
and Mark Overmars (the latter is rumored to bootleg at a soccer club in
his free time ;).
Using xwatch
You typically start xwatch when activating an X session; e.g., from the
file which xdm uses to fire up a user's session (this file is normally
/usr/X11/lib/X11/xdm/Xsession). The command that starts xwatch is
something like
xwatch [options] file(s) &
where `options' are optional flags, file(s) are the files to watch, and
the ampersand character is used to start xwatch in the background. The
files to watch are typically /var/adm/*: files which are created by the
syslog daemon (see the file syslogd.conf.SAMPLE in the distribution for an
example). Xwatch accepts only filenames which are (a) ordinary files (no
sockets or pipes) and (b) which are non-binaries. Other files are not
monitored; xwatch will warn about the file having the non-proper type and
will delete it from its list of names.
The options are many, start xwatch without arguments to see what is
supported. All options can also be stated in the file
/usr/lib/X11/app-defaults/XWatch as X resources (see the file XWatch.ap as
an example). In the following enumeration, a # denotes a number:
-border # : Specifies whether xwatch should start with a border. #
must be 0 or 1. When you start xwatch without a border, your window
manager may not be able to resize or even recognize it.
-xpos # and -ypos # : Defines the initial screen coordinates.
-width # and -height # : Defines the initial width and height.
-fred # and -fgreen # and -fblue # : Defines the RGB code of the
foreground color (in which the characters are displayed).
-bred # and -bgreen # and -bblue # : Defines the RGB code of the
background color.
-printtime # : Defines whether xwatch should prefix any info on the
watched files with a timestamp.
-printname # : Defines whether xwatch should prefix any info on the
watched files with the filename.
-newline # : Defines whether xwatch should let a newline follow the
time and/or filename stamp, so that the actual information is
displayed on its own line.
-interval # : Defines the scanning interval. Each # seconds, xwatch
will check if new information has arrived on the watched files.
-linelen # : Defines the number of characters at which a line will be
broken up.
-font # : Defines the initial display font.
-firstwarnings # : Defines whether xwatch should print initial
warnings into the watch window. E.g., you might like to set
firstwarnings to zero, and then start xwatch with the file argument
/var/adm/*. Warnings about, e.g., utmp being a binary file would then
be suppressed.
-printversion # : Controls whether xwatch prints its version number
and copyright notice upon startup in the watch window.
Before you use the options, create an application defaults file
/usr/lib/X11/app-defaults/XWatch. You can do so by copying the file
XWatch.ap, extracted from the archive. to
/usr/lib/X11/app-defaults/XWatch.
Some systems do not have the directory /usr/lib/X11/app-defaults. In that
case, you should create the following links:
/usr/X11 should point to your X11 distribution; e.g. to /usr/X11R6;
/usr/lib/X11 should point to /usr/X11/lib/X11.
Then edit the file XWatch in the application defaults directory, and
follow the instructions therein to define your favorite settings. If you
need to start xwatch incidentally with another setting, use a flag.
The filename arguments can optionally be followed by a red/green/blue
specification that applies only to that particular file. E.g., say you
want to see all the files in /var/adm normally in blue text; but you want
to see /var/adm/critical (critical messages from applications) in yellow
and /var/adm/auth (authentification messages) in red. In that case, the
course to follow would be:
(a) The default foreground color would be blue. You could set this
with the flags -fred 0 -fgreen 0 -fblue 255, or in the application
defaults file.
(b) The color for /var/adm/critical should be yellow. Hence, the first
file argument would be /var/adm/critical:255/255/0. The red and green
components are set here to the maximum value, making the color yellow.
(c) The color for /var/adm/auth should be red, hence the second file
argument would be /var/adm/auth:255/0/0.
(d) The following arguments would be the files, using the standard
foreground (blue): /var/adm/*, without any extra color specifications.
Obtaining xwatch
Xwatch can be obtained at the ftp site ftp.icce.rug.nl, in the directory
/pub/unix, as the file xwatch-X.YY.tar.gz. X.YY is the version number,
e.g., 1.00. This site is the primary site, so check here for new versions.
To unpack the archive, change-dir to your `sources' directory (e.g.,
/usr/local/src) and type
tar xvzf ..../xwatch-X.YY.tar.gz
Next, change-dir to the unpacked subdirectory xwatch and check there. You
will find a subdirectory src (with the full sources) and a subdirectory
bin-linux (with a precompiled binary for Linux). You have now two choices:
either trust me and copy bin-linux/xwatch to e.g. /usr/local/bin or
compile your own version.
Compiling xwatch
Please note (again) that you don't have to compile your own version: you
can use the binary in bin-linux/xwatch. But if you really _want_ to
compile all, follow these steps.
a. You will need the XForms library and include files to compile xwatch.
Check the Makefile in the src subdirectory for two ftp sites that carry
XForms for Linux. Obtain the library and install it.
b. In the src/ subdirectory, edit the Makefile and adjust some defines at
the top. E.g., a `make install' copies the binary by default to
/usr/local/bin; adjust that if you don't like this behavior.
c. Next, do a `make install', followed by a `make clean'.
Copyright and such
I reserve the copyright to xwatch. If you have useful additions, please
mail me with your requests or source diffs and let me make a new
distribution. Don't hack the sources and redistribute your own: I hate
encountering `my' programs with a version number that I don't even know
of. However, you are permitted to distribute xwatch, provided that you (a)
distribute it with the full sources, and (b) that you leave this
documentation and copyright notice intact.
Copyright policy:
MegaHard (who wants a Microsoft?)
PostcardWare (send me a postcard from abroad if you like it)
but really: GPL, see the file COPYING.
Karel Kubat
karel@icce.rug.nl
--
Karel Kubat (karel@icce.rug.nl, karel@bambix.icce.rug.nl).
>From the duffynitions collection:
Vaseline: Meat tenderizer.
--
Send comp.os.linux.announce submissions to: linux-announce@news.ornl.gov
PLEASE remember a short description of the software.