Changi NNTP Server 1.0

[ Bottom of Page | Previous Page | Next Page | Table of Contents ]

Installing a Syslog Daemon

A syslog daemon logs whatever is going on into a log file, for debugging. It's an attractive way to keep track of running programs because it will log several programs' and threads' activities, all together. For example, you can watch how Changi, Chanx and Chanco work together to pick off a bug in one of them.

This is a lightweight outline of the way to make a syslog daemon work with the Changi server. The daemon is syslog.zip which was ported by Jochen Friedrich, available from ftp-os2.nmsu.edu/os2/unix, leo.org and elsewhere as something like:

syslog.zip       116901 Jan 31  1995  System event logger for OS/2 TCP/IP

The Syslog Daemon

Install it as it says, putting syslogd.exe, READ.ME and logger.exe into \tcpip\bin. Make a datafile, syslog.cnf in the directory specified by the ETC environment variable, \tcpip\etc or \mptn\etc. Into syslog.cnf put the following 2 lines. Here, C:\syslog.msg is the debug text file that you want the syslog daemon to generate for you:

*.debug C:\syslog.msg
*.debug CON

Now, note carefully. The thing separating *.debug and C:\syslog.msg (and *.debug and CON) is not a space, it is a tab.

The second line is optional. It logs onto the screen (CONsole) for you to watch.

You can make the syslog.msg anything you like. Here it's put into C:\.

To run it, start syslogd.exe and run Chanx, Changi, Expire or whatever with the -d options, except do not use -do when using syslog. Start the syslog daemon, straightforward, with

syslogd
and run Chanx or whatever. You must close the daemon before you can read syslog.msg. Alternatively, you can read it as it's being generated with a port of the editor less.

You can start the syslog daemon upon boot by inserting into a .cmd file:

DETACH syslogd
to run it in the background, or
START syslogd
to run it while you watch, to see it start OK.

Example

Here's Ian Timms' setup. In his TCPEXIT.CMD:

  setlocal
  e:
  cd \tcpip\etc
  start /min e:\tcpip\bin\syslogd.exe
  echo    ..... SYSLOGD Daemon Started
  endlocal
In his E:\TCPIP\ETC\SYSLOG.CNF:
  *.debug  CON
  *.debug  e:\tcpip\etc\syslog.log
and that's all she wrote!

The Logger

Logger.exe inserts comments into the syslog.msg file, which can become large and unwieldy:
logger: [-i] [-f file] [-p pri] [-t tag] [ message ... ]

-i              : include PID
-f file         : send file to syslogd
-p pri          : set priority
-t tag          : set tag of syslog entry
message         : message to be sent to syslogd

The line:
   logger -i -p alert -t TestitIan CHANGI_CH TERMINATED OK.
would produce something like
  Nov  6 03:17:41 localhost TestitIan[506]: CHANGI_CH TERMINATED OK.
The -f file option sends a whole file to the syslog daemon. When things like conditional errorlevels (if errorlevel 10 then logger...) are invoked, logger shows its value.


[ Top of Page | Previous Page | Next Page | Table of Contents ]


URL: changi/manual/syslogd.html
Created: 5 December 1996
Revised: 5 December 1996
Author: Joe Kovacs <jakovacs@sentex.net> with the kind help of Martin Knaupf and Ian Timms