> : hi,
> : i have a few machines under my care, i want to have them all log
> : on a machine A. i know i can put
> : in syslog.conf at each of the client box. but i would like to seperate
> : their logs on machine A, don't want all the clients logs ending in the
> : same syslog file in machine A. any pointers or hints will be great.
> : Thanks a million in advance.
> - The only possibility I found was to grep the names of the machines on a
> daily basis and redirect the results to a machine logfile.
> --
> Christopher
I use a script:
#!/bin/sh
PATH=/bin:/usr/bin
# Splits SYSLOG by host, run via cron
awk '
{ host=substr($4,4) # Unix Host
file="/var/adm/SYSLOG." host # Log file
print >> file
Quote:}'</var/adm/SYSLOG
>/var/adm/SYSLOG
This is on an SGI, so you can modify for your configuration.
Also, note that this is subject to a race condition, in that records can
be added to the SYSLOG while the script is run - In practice, it has not
been much of a problem