I believe you can create a named pipe (using mkfifo) somewhere in the filesystem (I'd suggest somewhere persistent, not /tmp or /var/run, etc...). I've seen it created as /var/log/logpipe or similar. Then simply name the file in syslog.conf without the '|' symbol.

However, note that if there is nothing reading from the pipe when syslogd starts (or when it receives a HUP) then it will ignore it, so you need to make sure something is reading the pipe before syslog starts. SMF is probably the best way to do this - you can insert a dependancy for the svc:/system/system-log service to make sure your pipe reader starts first.

Also, if there is nothing reading from the pipe when syslogd tries to write to it, it will close it and ignore it until the next restart/refresh. However, the smf "restart on" property of the dependancy can refresh system-log if your reader dies and is restarted.


Hope that helps,
Brian


Harry Putnam wrote:
Can anyone tell me how to make the system logger write to a fifo?

I've tried this in /etc/syslog.conf

   *.debug              |/var/adm/flt

Where `flt' is a fifo and the two elements are separated by tabs. After a sighup to systemlogger I'm not seeing any data with `cat flt'

Made sure data is been sent by system-log but nothing appears at the
fifo.

Doing something like (in two different xterms):

xterm 1
cat flt
xterm 2
cat messages > flt

And I see the data so I know the fifo is working.

_______________________________________________
opensolaris-discuss mailing list
[email protected]

--
Brian Ruthven
Solaris Revenue Product Engineering
Sun Microsystems UK
Sparc House, Guillemont Park, Camberley, GU17 9QG

_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to