[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: logfile directive and timestamps (was: redirect / disable logging)

--On Monday, March 14, 2005 11:45 PM +0100 Hallvard B Furuseth <h.b.furuseth@usit.uio.no> wrote:

This reminds me:

Quanah Gibson-Mount writes to openldap-software@OpenLDAP.org:
I run my servers on loglevel 256, on Solaris 8, and even on systems
that answer 400,000+ queries a day, they have no problem keeping up
with the logging.

On the other hand, 550000 operations an hour at loglevel 256 got a bit too much for our system.

I'd like a slapd.conf option to:

- log directly to a file in order to avoid the overhead with
  communication with the syslog daemon,

- allow buffered output to the file instead of line by line output,

- stat() the file regularly to see if it has been removed or renamed,
  and if so close it and open a new logfile with the same name,

  (Problem: this may be needed when nothing else is happening for a
  period so slapd is passive.  Could either do setitimer() to get
  regular SIGALRMs on which to check, and let it turn itself off
  temporarily when it finds that nothing else is happening,
  or take the easy way out and require whoever renames the logfile
  to also make slapd notice - e.g. by connecting and disconnecting.)

- either write a timestamp in front of each log line,

  or write a timestamp to the logfile each second (or a configurable
  frequency) when slapd is active.


Interesting idea, but the write overhead is going to be a hit no matter how you handle it. At least on linux, you can use asynchronous logging. In some testing I did, I found that there was no difference between loglevel 0 and loglevel 256 when asynchronous syslog was used.


-- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html