On Thursday 23 May 2002 09:56 pm, Paul D. Boyle reputedly wrote:

> Under Unix (Linux) all processes automatically open three I/O streams,
> stdin, stdout, stderr, these are often closed in a daemon process.

So, you need alternatives to these services.

I make great use of the syslogger daemon.  I had to become aware of the 
klogger, or kernel logger daemon because it would generate useful information 
for me.  This led to needing an awareness of the logrotate function which led 
to needing an awareness of cron from a system point of view.  I "tail -f" the 
/var/log/messages file for long periods of time and found that logrotate 
changes the file handles so that the "tail -f" goes dead so to speak.  I've 
hacked a script that lets me quickly manage the tail function (script 
attached). I eventually learned how to manage the /etc/syslog.conf and syslog 
calls to define new log files associated with new facilities.  
Another capability that I think Brent Verner brought to my attention, and 
that I have not investigated yet, is the FIFO abilities of the Linux 
syslogger.  More at "man syslogd".

My daemons use AF_INET sockets for interprocess communication.  I tried 
several flavors of IPC (SystemV, AF_UNIX sockets).  And there are more IPC 
methods I did not try.  I've seen code that used disk files for IPC.  The 
Stevens book, "UNIX Network Programming, Volume 2, Second Edition: 
Interprocess Communications, Prentice Hall, 1999" was my primary resource. I 
use Python to write shell to daemon "communicators". 

My intent here is to dump a bunch of ideas to the list that you can pick 
through.  If there is further interest, I can provide code detail and system 
configuration detail as requested.

-- 
Mike Mueller
www.ss7box.com

Attachment: Tail
Description: application/shellscript

Reply via email to