searchrate(1)

NAME

searchrate – measure search performance
for an LDAP directory

Synopsis

install-path/dsrk6/bin/searchrate
[options] -bbaseDN-ffilter

Description

The searchrate command measures the rate at
which an LDAP directory can perform random, user-defined searches. As with
all measures of performance, results depend on many factors, including what
options you pass to the searchrate command, and also how
the directory service itself is tuned.

Options

The searchrate command supports the following options:

-Aattribute

Retrieve only the specified attribute.

Repeat this option to specify multiple attributes.

-a

Run in asynchronous
mode, not waiting for results before requesting subsequent searches. The maximum
number of threads the searchrate command can use is limited
by the number of file descriptors the operating system allows the process
to use. The time is measured starts when the request is sent and finishes
when the result is received.

Display the specified number of results messages before exiting.
Results messages appear by default as output on standard out, similar to the
following.

Avg r=2731.00/thr (1092.40/sec), total= 5462

This shows output for two threads searching for five seconds. The average
search rate per thread is 2731 searches per thread for the interval measured,
for 1092.40 searches per second on average. The total shown for both threads
is 5462.

Default is to continue iterating until the command is interrupted.

-DbindDN

Use the specified bind DN to authenticate to the directory.

If the bind DN is not specified, the searchrate command
attempts anonymous authentication.

-E

Display the bind
DN and filter for searches that failed to retrieve an entry.

-e

Display the number
of attempted searches that failed to retrieve an entry.

Use the specified seed, an unsigned int,
for random number generation.

Default seed is 0.

-sscope

Use the specified scope when searching.

The following values are supported for scope:

base

Examine
only the entry specified by the argument to the -b option.

one

Examine only
to the entry specified by the argument to the -b option and
its immediate children.

sub

(Default)
Examine the subtree whose root is the entry specified by the argument to the -b option.

-tthreads

Use the specified number of the threads to connect to the
server.

Default is to use one thread.

-v

Display verbose
output.

-Wfilename

Read the bind password from the specified file.

-wpassword

Use the specified bind password to authenticate to the directory.

-w –

Prompt
for the bind password so it does not appear on the command line or in a file.

Extended Description

The searchrate command repeatedly requests search
operations of a directory server. Threads may be configured to keep open connections
or perform LDAP binds with each operation. The command-line options let you
specify the bind credentials.

The command uses LDAP v3, and cannot be used to authenticate to an LDAP
v2 directory not supporting LDAP v3. Furthermore, the searchrate command uses simple authentication, not secure binding.

By default, the searchrate command continues its
task indefinitely, displaying results periodically, and displaying any errors
encountered as well without interrupting operation.

Random Target Syntax

Include randomly generated numbers by specifying %d
and %s placeholders in the base DN and filters. These placeholders
are then replaced according to the following rules:

%d

Replace this
placeholder with random integer values depending on the maxRand parameter to the -r option.

The -r option may be used at most two times to generate
random base DNs or filters. Replacement values for the %d
placeholder range over [0,maxRand1–1].

%s

Replace this
placeholder with random strings from the file specified using the -i option.

Replacement values for this placeholder are randomly selected lines
of the file specified.

Multiple -r and -i options
are matched to the %d and %s placeholders,
respectively, in the order they are used.

Random Target Substitution

The searchrate command requires that you apply the
following rules for substitutions, displaying an error message when the used
incorrectly:

Use only one type of placeholder, either %d
or %s, per invocation of the searchrate
command.

Specify at least as many uses of the -r as %d placeholders used.

Use %%d and %%s to specify
literal strings %d and %s, respectively.

In order to use this random mechanism, you must populate your directory
accordingly. For example, you can measure the search rate using the following
command:

$ searchrate -b "ou=test,dc=example,dc=com" -f "uid=test%d" -r 100

In order for the searchrate command to find entries,
your directory must contain entries corresponding to the following LDIF excerpt: