Skip Headers
Oracle® Fusion Middleware Man Page Reference for Oracle Directory Server Enterprise Edition
11g Release 1 (11.1.1.7.0)

Part Number E28967-01
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

modrate

measure modification performance for an LDAP directory

Synopsis

install-path/dsrk/bin/modrate 
 [options] -b baseDN -M attribute:length:regexp

Description

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

The command uses LDAP v3, and cannot be used to authenticate to an LDAP v2 directory not supporting LDAP v3.

Options

The modrate command supports the following options:

-a

Run in asynchronous mode, not waiting for results before requesting subsequent modifications. The maximum number of threads the modrate 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.

-b targetDN

Use the specified DN for the target entry.

Refer to Random Target Syntax and Random Target Substitution for details.

-C messages

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= 272.00/thr ( 54.40/sec), total=   816

This shows output for three threads requesting modifications for five seconds. The average modify rate per thread is 54.40 per thread per second for the interval measured. The total shown for all threads is 816.

Default is to continue iterating until the command is interrupted.

-D bindDN

Use the specified bind DN to authenticate to the directory.

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

-E

Display the bind DN of entries for which modifications did not complete successfully.

-e

Display the number of attempted modifications that did not complete successfully.

-h hostname

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, 127.0.0.1.

-i filename

Use the file specified to generate target entry base DNs at random.

Refer to Random Target Syntax and Random Target Substitution for details.

-j seconds

Display results each specified number of seconds.

Default is to display results every 5 seconds.

-K

Keep connections open and only bind once, measuring only the time required to perform the modify operation.

Default is to measure the duration the connection is active as the modification sequence.

-k

Keep connections open, measuring only the time required to perform the bind and modify operations.

Default is to measure the duration the connection is active as the modification sequence.

-M attribute:length:regexp

Generate random values for modifications on the specified attribute, having the specified integer length in characters. Generate the values from the specified regular expression, regexp, which has the form (c*(c-c)*)* where c represents an ASCII character.

For example, the regexp parameter could be [A-Z][a-z][0-9], or simply aString

If the attribute specified does not exist on the target entry, it is added, subject to schema checking.

-m maxIter

Perform no more than the specified number of modifications per thread.

Default is for each thread to continue iterating until the command is interrupted.

-O maxHops

Traverse no more than the specified number of hops when following referrals.

Default is 5.

-p port

Connect to the directory on the specified port.

Default is to connect to the default simple authentication port for LDAP, 389.

-q

Run in quiet mode, not displaying results.

Default is to display results every 5 seconds, which you can adjust using the -j option.

-R

Do not follow referrals.

Default is to follow referrals.

-r maxRand

Use the specified maximum to determine the range for random numbers replacing %d formatting specifications when modifying 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 %d.

Refer to Random Target Syntax and Random Target Substitution for details.

-S randSeed

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

Default seed is 0.

-t threads

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

Default is to use one thread.

-v

Display verbose output.

-W filename

Read the bind password from the specified file.

-w password

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 modrate command repeatedly requests modification operations of a directory server. Threads may be configured to keep open connections or perform LDAP bind 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 modrate command uses simple authentication, not secure binding.

The modrate command cannot set a time limit for operations.

By default, the modrate 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. 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 target entries. Replacement values for the %d placeholder range over [0,maxRand1—1] for the first use of the -r option, and over [1,maxRand2] for the second.

%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.

Random Target Substitution

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

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

$ modrate -D uid=hmiller,ou=people,dc=example,dc=com -w hillock  \
-b "uid=test%d,ou=test,dc=example,dc=com"  -C 3 -r 100  -M 'description:7:astring'

If you read Example.ldif, you see that hmiller's password is hillock.

In order for the modrate command to work effectively, your directory should contain entries corresponding to the following LDIF excerpt:

dn: uid=test0,ou=test,dc=example,dc=com

dn: uid=test1,ou=test,dc=example,dc=com

dn: uid=test2,ou=test,dc=example,dc=com

dn: uid=test10,ou=test,dc=example,dc=com

dn: uid=test99,ou=test,dc=example,dc=com

Examples

Examples in this section use the following conventions:

Example 1   modrate: Sample Output

The following command performs modifications until it has displayed five results messages. Notice that each line concerns only the elapsed interval.

$ modrate -h host -D uid=hmiller,ou=people,dc=example,dc=com -w hmiller \
-C 5 -b "uid=test%d,ou=test,dc=example,dc=com" -r 100 -M "description:7:aString"
Enter bind password:
Avg r=  74.00/thr ( 14.80/sec), total=    74
Avg r= 118.00/thr ( 23.60/sec), total=   118
Avg r=  68.00/thr ( 13.60/sec), total=    68
Avg r=  39.00/thr (  7.80/sec), total=    39
Avg r=  71.00/thr ( 14.20/sec), total=    71
All threads exited

If you read Example.ldif, you see that hmiller's password is hillock.

Notice also that a result message provides the following items of information:

  • The average rate of modification per thread of execution

  • The average rate of modification per second

  • The total number of modification operations performed during the interval the results message concerns

Example 2   modrate: Modification Rate Alone

The following command keeping the connection open and binds only once:

$ modrate -h host -D uid=hmiller,ou=people,dc=example,dc=com -w hmiller \
-C 5 -b "uid=test%d,ou=test,dc=example,dc=com" -r 100 -M "description:7:aString" -K
Enter bind password:
Avg r= 272.00/thr ( 54.40/sec), total=   272
Avg r= 183.00/thr ( 36.60/sec), total=   183
Avg r= 180.00/thr ( 36.00/sec), total=   180
Avg r= 257.00/thr ( 51.40/sec), total=   257
Avg r= 226.00/thr ( 45.20/sec), total=   226
All threads exited

If you read Example.ldif, you see that hmiller's password is hillock.

Exit Status

The modrate command returns the following exit status codes.

0

Successful completion.

non-zero

An error occurred.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE

Availability

Zip distribution only

Stability Level

Evolving


See Also

authrate(1), makeldif(1), searchrate(1)