NAME | Synopsis | Description | Options | Extended Description | Examples | Exit Status | Attributes | See Also
install-path/dsrk6/bin/modrate [options] -b baseDN -M attribute:length:regexp
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.
The modrate command supports the following options:
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.
Use the specified DN for the target entry.
Refer to Random Target Syntax and Random Target Substitution for details.
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.
Use the specified bind DN to authenticate to the directory.
If the bind DN is not specified, the modrate command attempts anonymous authentication.
Display the bind DN of entries for which modifications did not complete successfully.
Display the number of attempted modifications that did not complete successfully.
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.
Use the file specified to generate target entry base DNs at random.
Refer to Random Target Syntax and Random Target Substitution for details.
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 modify operation.
Default is to measure the duration the connection is active as the modification sequence.
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.
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.
Perform no more than the specified number of modifications per thread.
Default is for each thread to continue iterating until the command is interrupted.
Traverse no more than the specified number of hops when following referrals.
Default is 5.
Connect to the directory on the specified port.
Default is to connect to the default simple authentication port for LDAP, 389.
Run in quiet mode, not displaying results.
Default is to display results every 5 seconds, which you can adjust using the -j option.
Do not follow referrals.
Default is to follow referrals.
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.
Use the specified seed, an unsigned int, for random number generation.
Default seed is 0.
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.
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.
Include randomly generated numbers by specifying %d and %s placeholders in the base DN. 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.
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.
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.
The modrate 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 modrate command.
Specify at least as many uses of the -r as %d placeholders used in the base DN.
Use %%d and %%s to specify literal strings %d and %s, respectively.
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=test%d,ou=test,dc=example,dc=com" -w "auth%d%d" -r 100 |
In order for the modrate command to bind effectively, 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:
The modrate command is found in a directory present in the PATH used for the examples.
The directory server is located on a system named host.
The directory server listens on port 389, the default for non-SSL connections.
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 - \ -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
The following command keeping the connection open and binds only once:
$ modrate -h host -D uid=hmiller,ou=people,dc=example,dc=com -w - \ -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.
The modrate command returns the following exit status codes.
Successful completion.
An error occurred.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE |
ATTRIBUTE VALUE |
---|---|
Availability |
Zip distribution only |
Stability Level |
Evolving |
NAME | Synopsis | Description | Options | Extended Description | Examples | Exit Status | Attributes | See Also