7. Monitoring Slapd

Slapd supports a monitoring interface you can use to find out many useful bits of information about what slapd is currently doing, how many connections it has, how many threads are working, etc. You can access the monitor feature by doing a base object search of the SLAPD_MONITOR_DN from include/ldapconfig.h with any kind of valid filter (e.g., "(objectclass=*)"). By default, this DN is set to "cn=monitor". You will get one entry returned to you, with the following attributes:

version: slapd <version> (<date>)

This attribute identifies the slapd server software by name, version, and build date, e.g., slapd 3.3 (Thu May 21 14:19:03 EDT 1996)
threads: <integer>
This attribute indicates the number of threads (operations) currently outstanding in slapd.
connection: <fd> : <opentime> : <opsinitiated> :
<opscompleted> : <binddn> : [ <rw> ]
This multi-valued attribute summarizes information for each open connection. The information given is <fd>, the file descriptor; <opentime>, the time the connection was opened in UTC format; <opsinitiated>, the number of operations initiated over the connection; <opscompleted>, the number of operations completed over the connection; <binddn>, the DN currently bound to the connection; and optionally <rw>, indicating whether the connection is currently blocked for read or write..
currentconnections: <integer>
The current number of connections.
totalconnections: <integer>
The total number of connections handled by slapd since it started.
dtablesize: <integer>
The size of slapd's file descriptor table.
writewaiters: <integer>
The number of threads blocked waiting to write data to a client.
readwaiters: <integer>
The number of threads blocked waiting to read data from a client.
opsinitiated: <integer>
The total number of operations initiated by slapd since it started.
opscompleted: <integer>
The total number of operations completed by slapd since it started.
entriessent: <integer>
The total number of entries sent to clients by slapd since it started.
bytessent: <integer>
The total number of bytes sent to clients by slapd since it started.
currenttime: <UTC time>
Slapd's idea of the current time.
starttime: <integer>
The time slapd was started.
nbackends: <integer>
The number of backends currently being served by slapd.
concurrency: <integer>
Under Solaris 2.x only, an indication of the current level of thread concurrency.
Note that slapd takes a snapshot of this information and returns it to you. No attempt is made to ensure that the information is consistent (i.e., if an operation thread is modifying one of these things when the monitor thread is reading it, strange results could be returned).

You should be able to use any LDAP client to retrieve this information. Here's how you might do it using the ldapsearch(1) client:

ldapsearch -s base -b cn=monitor 'objectclass=*'

[View Next Section] [View Previous Section] [Return to Table of Contents]

Send comments about this page to: ldap-support@umich.edu