Search with the cn=monitor base
You can search the cn=monitor base to
determine the directory server status, such as cache configuration
status, operation counts, connection type counts, and status of service.
To retrieve the directory server status, run the ldapsearch command
with the cn=monitor base. For example:
ldapsearch -h ldap_host -p port -s base -b cn=monitor objectclass=*
where, ldap_host is the host name or IP address of the LDAP host.
The cn=monitor search returns some of the following
attributes of the directory server:
CN=MONITOR- The search base for the command.
version=IBM Security Verify Directory (SSL), 10.0.1- The version of IBM® Security Verify Directory.
totalconnections- The total number of connections since the server was started.
currentconnections- The number of active connections.
maxconnections- The maximum number of active connections allowed.
writewaiters- The number of threads that send data back to the client.
readwaiters- The number of threads that read data from the client.
livethreads- The number of worker threads that are used by the server.
filter_cache_size- The maximum number of filters that are supported by the cache.
filter_cache_current- The number of filters currently in the cache.
filter_cache_hit- The number of filters that are retrieved from the cache rather than being resolved in DB2®.
filter_cache_miss- The number of filters that were not found in the cache that then needed to be resolved by DB2.
filter_cache_bypass_limit- Search filters that return more entries than this limit are not cached.
entry_cache_size- The maximum number of entries that are supported by the cache.
entry_cache_current- The number of entries currently in the cache.
entry_cache_hit- The number of entries that were retrieved from the cache.
entry_cache_miss- The number of entries that were not found in the cache that then needed to be retrieved from DB2.
acl_cache- A boolean value that indicates whether the ACL cache is active (TRUE) or inactive (FALSE).
acl_cache_size- The maximum number of entries in the ACL cache.
currenttime- The current time of the server. The current time is in the following format:
starttime- The time the server was started. The start time is in the following format:
en_currentregs- The current number of client registrations for event notification.
en_notificationssent- The total number of event notifications sent to clients since the server was started.
The following attributes are for operation counts:
bindsrequested- The number of bind operations that are requested since the server was started.
bindscompleted- The number of bind operations that are completed since the server was started.
unbindsrequested- The number of unbind operations that are requested since the server was started.
unbindscompleted- The number of unbind operations that are completed since the server was started.
addsrequested- The number of add operations that are requested since the server was started.
addscompleted- The number of add operations that are completed since the server was started.
deletesrequested- The number of delete operations that are requested since the server was started.
deletescompleted- The number of delete operations that are completed since the server was started.
modrdnsrequested- The number of modify RDN® operations that are requested since the server was started.
modrdnscompleted- The number of modify RDN operations that are completed since the server was started.
modifiesrequested- The number of modify operations that are requested since the server was started.
modifiescompleted- The number of modify operations that are completed since the server was started.
comparesrequested- The number of compare operations that are requested since the server was started.
comparescompleted- The number of compare operations that are completed since the server was started.
abandonsrequested- The number of abandon operations that are requested since the server was started.
abandonscompleted- The number of abandon operations that are completed since the server was started.
extopsrequested- The number of extended operations that are requested since the server was started.
extopscompleted- The number of extended operations that are completed since the server was started.
unknownopsrequested- The number of unknown operations that are requested since the server was started.
unknownopscompleted- The number of unknown operations that are completed since the
server was started. Unrecognized operations are rejected with a message
is sent to the client, which might include the
LDAP_UNWILLING_TO_PERFORMresult code. opsinitiated- The number of initiated requests since the server was started.
opscompleted- The number of completed requests since the server was started.
entriessent- The number of entries that are sent by the server since the server was started.
searchesrequested- The number of initiated searches since the server was started.
searchescompleted- The number of completed searches since the server was started.
The following attributes are associated with the server log counts:
slapderrorlog_messages- The number of server messages that are recorded since the server started or since a reset.
slapdclierrors_messages- The number of DB2 error messages that are recorded since the server was started or since a reset.
auditlog_messages- The number of audit messages that are recorded since the server was started or since a reset.
auditlog_failedop_messages- The number of failed operation messages that are recorded since the server was started or since a reset.
The following attributes are for connection type counts:
total_ssl_connections- The total number of SSL connections since the server was started.
total_tls_connections- The total number of TLS connections since the server was started.
The following attributes are for tracing:
trace_enabled- The current trace value for the server. If the server is set to collect trace data, the value is TRUE, or else the value is FALSE.
trace_message_level- The current ldap_debug value for the server.
The value is in hexadecimal form, for example:
0x0=0 0xffff=65535 trace_message_log- The current LDAP_DEBUG_FILE environment variable setting for the server.
The following attributes are for denial of service prevention:
available_workers- The number of worker threads available for work.
current_workqueue_size- The current depth of the work queue.
largest_workqueue_size- The largest size that the work queue reached.
idle_connections_closed- The number of idle connections closed by the Automatic Connection Cleaner.
auto_connection_cleaner_run- The number of times that the Automatic Connection Cleaner process run.
The following attribute is for alias dereference processing:
bypass_deref_aliases- The server runtime value that indicates whether alias processing can be bypassed. The value is TRUE if no alias object exists in the directory, and FALSE if at least one alias object exists in the directory.
The following attributes are for the attribute cache:
cached_attribute_total_size- The amount of memory that is used by the directory attribute cache, in KB. This number includes the additional more memory that is used to manage the cache and is not charged to the individual attribute caches. If the total is larger than the sum of the memory that is used by all the individual attribute caches.
cached_attribute_configured_size- The maximum amount of memory, in KB, for use by the directory attribute cache.
cached_attribute_hit- The number of times the attribute is used in a filter and is processed
by the attribute cache. The following value is generated in output:
cached_attribute_hit=attrname:##### cached_attribute_size- The amount of memory that is used for this attribute in the attribute
cache. The following value in KB is generated in output:
cached_attribute_size=attrname:###### cached_attribute_candidate_hit- A list of up to 10 most frequently used non-cached attributes
that are used in a filter that can be processed by the directory attribute
cache.
The following value is generated in output:
cached_attribute_candidate_hit=attrname:#####You can use this list to help you decide which attributes you want to cache. Typically, you want to put a limited number of attributes into the attribute cache because of memory constraints.
Examples
You can use the following examples to calculate throughput and workload on the server from the output that is returned by the ldapsearch command.
- Throughput example
- You can calculate the throughput of the server by monitoring the
directory server statistic called
opscompleted. This statistics value indicates the number of operations that are completed since the LDAP server started. - Workload example
- You can determine the server workload from the output values from
the ldapsearch command with the
cn=monitorbase. For example, you can calculate the number of add operations that were completed in a certain amount of time.