Authors: Jim Schnitter and Lionel Bartlett
New Version: 4.1.6 - March 25, 2009
Example of usage:
Report on ALL (-m all) LDAP operation response times 1 sec (-t 1) or over and display stats only (-s):
elapse415d.pl -s -t 1 -m all LDAPT2.LOG > LDAPT2-OPS-1SEC_or_Over.TXT
This tool allows an administrator to calculate the time of each LDAP operation in a dstrace or iMonitor log file. It's very useful in tracking down LDAP performance problems, especially slow searches. It's been tested on SLES9, SLES10, SLED10 and Windows with ActiveState's Perl.
Usage: elapse.pl -t <time> -m <mode> <logfile>
|-x|| CSV output|
(Must be used with -c, e.g. -x -c)
|-c||Only report completed LDAP requests|
|-t|| seconds print operations that take this time or longer|
(optional - defaults to 0)
|-i|| IP Address Filter, comma separated or wildcards|
|-m|| mode one of bind,search,modify,add,delete,modrdn or all|
(optional - defaults to all)
(Option order is significant)
- Find every search that takes 3 seconds or longer
$ elapse.pl -t 3 -m search trace.htm
- List the elapsed time for every modify
$ elapse.pl -m modify trace.htm
Obtaining a dstrace/ndstrace for use with elapse requires the following settings:
To ensure best results with this script gather only the minimum LDAP data required for elapse. Unfortunately there are still some defects in this script, which results from the many variations in messages when too much unrelated data ends up in the trace.
Between versions 4.1 - 4.15c:
Message to customers:
Please leave feedback and an email address if you can't get this script to work. I'll get back to you promptly. Ideally I need a copy of the dstrace so I can reproduce the issue, unless it's simply a cause of command line parameters or sequence.
When creating indexes a decision is taken to create it based on Value or Substring. The update to this utility will help you decide which index type is required.
There are many factors which affect LDAP performance, not least of which is server load. Slow LDAP response does not mean there is a problem; the root cause could simply be over-loading. However this utility will use the output from DSTRACE with LDAP trace data to report on which attributes are used in searches. If the search contains only wildcard the attribute is ignored. If it contains text and a wildcard it is regarded as a substring search and if it only contains text, then it is a value search.