Brian Ruthven - Solaris Network Sustaining - Sun UK <brian.ruth...@sun.com> writes:
> 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. Haa... ok, that was my error... my linux background.. showing... on linux syslog you need the pipe there. > 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. Thanks, all good info... but one thing... How do you keep the reader running? I mean a script using the fifo for input like `script myfifo' quits as soon as the first line of syslog output comes thru.. Whereas something like `tail -f myfifo' keeps reading. What I'm after is attaching a perl script to the fifo that is capable of searching and sorting on any regex or any 2 regex actually, that you feed the script on startup. But unlike linux... where the pipe symbol goes into /etc/syslog.conf on opensolaris my script just quits on the first line of output. Maybe I can just add some trickiness to the script to make it act like tail -f... but is that really necessary? Am I missing something obvious here that would make any script continue to read from the fifo? man syslog.conf has no hits on either `fifo' or `pipe' so I'm guessing there is no help there... I haven't pored through every line but nothing jumps out as helpful. _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org