arlogd - a remote logger


  arlogd-server [-h] [-s] [-t] [--version] [-c config] [start|stop|state]
  arlogd-client [-h] [-s] [-t] [--version] [-c config] [start|stop|state]


Arlogd provides remote logging ; a daemon on the client host transfers data to a daemon on the server host (loghost).


Start the (loghost or client) daemon with :

  arlogd-server start
  arlogd-client start

The exit status is 0 if a daemon is started (or was already running) ; 1 otherwise.


Stop a daemon with :

  arlogd-server stop
  arlogd-client stop

The exit status is 0 if a daemon was stopped (or wasn't running) ; 1 otherwise.


To query the running daemon's state, use argument state :

  arlogd-server state
  arlogd-client state

The daemon reports :

The exit status is 0.


Without an argument, arlogd-server and arlogd-client just shows the daemon's status.


The exit status is 0 if the daemon is running ; 1 otherwise.

The default location for a config-file is arlogd.conf or /etc/arlogd/conf.

If/when $loghost is unavailable, the client will :

You can send commands to a running daemon ; see ARLOGD-SERVER and ARLOGD-CLIENT below.

See below :

how to use arlogd

To use remote logging for some logfile, just replace the logfile by a symlink to a fifo :

  # remote logging for /var/log/httpd/vhost/access.log
  % mkdir -p /var/log/fifos/httpd/vhost/
  % mkfifo   /var/log/fifos/httpd/vhost/access.log
  % cd /var/log/apache
  % mv access.log TEMP
  % ln -s /var/log/fifos/httpd/vhost/access.log .
  % cat TEMP > access.log

Things to check or do :



Show help and default config ; then exit.


Be silent ; use logs instead of stdout ; used in init.d/ scripts.


Just check the config.


Just print the version and exit.

-c file

Use config file.


A configuration file must be specified with -c config-file or be present as


In the config-file, lines starting with # are skipped ; as are empty lines ; lines with leading and/or trailing white space are stripped. Each line contains a name/value pair, separated by white space.

The list below shows the default value for each name. $name indicates the configured value of entry name.

Config entries you should configure

Config entries you may want to set

Config entries that are probably sane


Program arlogd-server opens two service ports (default 2207 and 2208).

On port 2207 the daemon accepts data connections from hosts in allow_host. The daemon expects lines like

  file-path log-line

The log-line is appended to file $log_dir/file-path, or $log_dir/prefix/file-path, if the a prefix is set for the allowed host.

If the log-line starts with / or contains .. as a path-component, the log-line is appended to file $log_dir/BAD.log.

On port 2208 the daemon accepts command connections from localhost.

To issue a command, on $loghost (for now) use netcat :

  echo command | nc -v localhost 2208

arlogd-server command-list


A client-daemon watches named pipes in directory $fifos.

arlogd-client command-list



Installation of arlogd requires very little :


Installation is simple :

fetch the software

subversion check-out :

  svn co arlogd

rsync :


package :

On a server (loghost) :

  make -f

On a client :

  make -f

Arlogd is added as a service, but the service is not turned on or started. To turn on the service use

  chkconfig arlogd-server on
  chkconfig arlogd-client on

To configure, edit /etc/arlogd/conf.

On the server (loghost), configure entry allow_host (default localhost).

  allow_host localhost

On a client, configure entry loghost (default localhost).


On a server (loghost) :

  /etc/init.d/arlogd-server start

On a client :

  /etc/init.d/arlogd-client start

try it

watch the logs

On the loghost and the client watch the log :

  tail -F /var/log/arlogd.log
make a fifo

On the client, make a fifo :

  mkfifo /var/log/fifos/test

Within a minute, arlogd-client will start watching this fifo ; see the log.

write something

Write something to the fifo :

  echo something > /var/log/fifos/test

On the loghost, something should immediately appear in file

a fifo in a subdirectory

You can also try to create a fifo in a subdirectory ; and write to it immediately :

  mkdir -p /var/log/fifos/foo/bar
  mkfifo /var/log/fifos/foo/bar/test
  echo something else > /var/log/fifos/foo/bar/test

Expect echo to block ; be patient ; echo is waiting for a reader.

As soon as arlogd-client finds fifo foo/bar :

loghost : talk to the daemon

On the loghost, you can talk to the daemon if you have netcat nc(1).

  echo PING | nc localhost 2208

This should reply PONG.


How it all works


Commands arlogd-server and arlogd-client set an exit-code. They may write to stdout. Using -s (for silent) makes them silent.

The exit-code is 0 if

A running daemon may write to $logfile and syslog.


The default install does this :



© 2014-2016 Henk P. Penning, Faculty of Science, Utrecht University
42415515133 version arlogd-0.1.8 - Sun Jul 10 07:34:59 2016 UTC - dev revision 188

Valid XHTML 1.0 Strict   Valid CSS!