|Oracle® Fusion Middleware Man Page Reference for Oracle Directory Server Enterprise Edition
11g Release 1 (220.127.116.11.0)
Part Number E28967-01
|PDF · Mobi · ePub|
measure search performance for an LDAP directory
install-path/dsrk/bin/searchrate [options] -b baseDN -f filter
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.
searchrate command supports the following options:
Retrieve only the specified attribute.
Repeat this option to specify multiple attributes.
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.
Use the specified base DN for the target entry.
Default is the root DSE,
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.
Use the specified bind DN to authenticate to the directory.
If the bind DN is not specified, the
searchrate command attempts anonymous authentication.
Display the bind DN and filter for searches that failed to retrieve an entry.
Display the number of attempted searches that failed to retrieve an entry.
Use the specified RFC 2254 conformant filter for all searches.
Connect to the directory on the specified host.
Enclose IPv6 addresses in brackets (
) as described in RFC 2732.
Default is to connect to the local host on the loopback address,
Use the file specified to generate target entry base DNs at random.
Display results each specified number of seconds.
Default is to display results every 5 seconds.
Keep connections open and only bind once, measuring only the time required to perform the search operation.
Default is to measure the duration the connection is active as the search sequence.
Keep connections open, measuring only the time required to perform the bind and search operations.
Default is to measure the duration the connection is active as the search sequence.
Set the search time-out at the specified number of seconds for synchronous searches.
Default is 10 seconds.
Perform no more than the specified number of searches per thread.
Default is for each thread to continue iterating until the command is interrupted.
Connect to the directory on the specified port.
Default is to connect to the default simple authentication port for LDAP,
Run in quiet mode, not displaying results.
Default is to display results every 5 seconds, which you can adjust using the
Use the specified maximum to determine the range for random numbers replacing
%d formatting specifications when searching random target entries.
When you use this option twice, the first occurrence generates random numbers in the range [0,maxRand1–1] for the first
%d, the second [1,maxRand2] for the second
Use the specified seed, an
unsigned int, for random number generation.
Default seed is
Use the specified scope when searching.
The following values are supported for scope:
Examine only the entry specified by the argument to the
Examine only to the entry specified by the argument to the
-b option and its immediate children.
(Default) Examine the subtree whose root is the entry specified by the argument to the
Use the specified number of the threads to connect to the server.
Default is to use one thread.
Display verbose output.
Read the bind password from the specified file.
Use the specified bind password to authenticate to the directory.
Prompt for the bind password so it does not appear on the command line or in a file.
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
%s placeholders in the base DN and filters. These placeholders are then replaced according to the following rules:
Replace this placeholder with random integer values depending on the maxRand parameter to 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].
Replace this placeholder with random strings from the file specified using the
Replacement values for this placeholder are randomly selected lines of the file specified.
-i options are matched to the
%s placeholders, respectively, in the order they are used.
Random Target Substitution
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
%s, per invocation of the
Specify at least as many uses of the
%d placeholders used.
%%s to specify literal strings
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:
dn: uid=test0,ou=test,dc=example,dc=com userPassword: auth00 dn: uid=test1,ou=test,dc=example,dc=com userPassword: auth11 dn: uid=test2,ou=test,dc=example,dc=com userPassword: auth22 … dn: uid=test10,ou=test,dc=example,dc=com userPassword: auth1010 … dn: uid=test99,ou=test,dc=example,dc=com userPassword: auth9999
Examples in this section use the following conventions:
searchrate command is found in a directory present in the
PATH used for the examples.
The directory server is located on a system named
The directory has been configured to support anonymous access for search and read. Therefore, you do not have to specify bind information.
The directory server listens on port 389, the default for non-SSL connections.
searchrate: Sample Output
The following command performs searches until it has displayed five results messages. Notice that each line concerns only the elapsed interval.
$ searchrate -h host -b dc=example,dc=com -f "(uid=bjensen)" -C 5 Avg r=1349.00/thr (269.80/sec), total= 1349 Avg r=1312.00/thr (262.40/sec), total= 1312 Avg r=1334.00/thr (266.80/sec), total= 1334 Avg r=1346.00/thr (269.20/sec), total= 1346 Avg r=1340.00/thr (268.00/sec), total= 1340 All threads exited
Notice also that a result message provides the following items of information:
The average search rate per thread of execution
The average search rate per second
The total number of search operations performed during the interval the results message concerns
searchrate: Search Rate Alone
The following command keeping the connection open and binds only once:
$ searchrate -h host -b dc=example,dc=com -f "(uid=bjensen)" -C 5 -K Avg r=2706.00/thr (541.20/sec), total= 2706 Avg r=2706.00/thr (541.20/sec), total= 2706 Avg r=2739.00/thr (547.80/sec), total= 2739 Avg r=2717.00/thr (543.40/sec), total= 2717 Avg r=2731.00/thr (546.20/sec), total= 2731 All threads exited
searchrate: Using a Filter File
The following commands substitute filters from a file to perform searches:
$ cat filters =Jen* =Jensen>=Jensen <=Jensen ~=Jensen $ searchrate -h host -b dc=example,dc=com -f "(sn%s)" -i filters -C 5 -K Avg r= 59.00/thr ( 11.80/sec), total= 59 Avg r= 64.00/thr ( 12.80/sec), total= 64 Avg r= 63.00/thr ( 12.60/sec), total= 63 Avg r= 64.00/thr ( 12.80/sec), total= 64 Avg r= 61.00/thr ( 12.20/sec), total= 61 All threads exited
searchrate command returns the following exit status codes.
An error occurred.
attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
Zip distribution only