[email protected] writes:

>>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. 
>
>
> I'm assuming that "flt" is a named pipe; doesn't it work when
> you use /var/adm/flt?
>
> I just tested this and it does seems to work.  But syslog will close it 
> when nothing is reading from the pipe.

Yes it does... but like you said... it leaves a problem for the
script.  My coding skills are quite slim.  I see a command like 

  `tail -f named-pipe'

Will keep reading so any ouput from system logger is displayed... but
a regular kind of command like:

   cat named-pipe

cat will close after the first line is read.

Similar for something like  awk '/REGEX/{print}' named-pipe > some.log

awk will close after the first line of input.

I guess I need to write a script that behaves like `tail -f' and I'm
sure I can in perl, but is that really necessary?

Isn't there some way to get a standard filtering script to get all
lines the system logger puts out, without trickery inside the script
to keep it from closing after the first line.

I guess the linux way of using a pipe `|' in the actual syslog.conf is
one way to get it done... but that does not work on opensol.
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to