mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Maxim Thomas
23 hours ago 863bd78b3f5855164e1e11e7898bec18184fb9af
Docs: add missing tools references (#657)
2 files modified
5 files added
334 ■■■■■ changed files
opendj-doc-generated-ref/pom.xml 38 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_addrate-examples.adoc 102 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_authrate-examples.adoc 46 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_description-rate-tools.adoc 43 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_modrate-examples.adoc 44 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_searchrate-examples.adoc 43 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/reference/admin-tools-ref.adoc 18 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/pom.xml
@@ -13,7 +13,7 @@
  ~ information: "Portions Copyright [year] [name of copyright owner]".
  ~
  ~ Copyright 2016 ForgeRock AS.
  ~ Portions Copyright 2024-2025 3A Systems LLC.
  ~ Portions Copyright 2024-2026 3A Systems LLC.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
@@ -184,6 +184,23 @@
                            </extendedClasspath>
                            <outputDir>${project.build.directory}/asciidoc/source/man-pages</outputDir>
                            <tools>
                                <tool>
                                    <name>addrate</name>
                                    <application>com.forgerock.opendj.ldap.tools.AddRate</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-80-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_addrate-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>
                                <tool>
                                    <name>authrate</name>
                                    <application>com.forgerock.opendj.ldap.tools.AuthRate</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_authrate-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>
                                <tool>
                                    <name>base64</name>
@@ -284,6 +301,25 @@
                                        <trailingSectionPath>_makeldif-see-also.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>
                                <tool>
                                    <name>modrate</name>
                                    <application>com.forgerock.opendj.ldap.tools.ModRate</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_modrate-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>
                                <tool>
                                    <name>searchrate</name>
                                    <application>com.forgerock.opendj.ldap.tools.SearchRate</application>
                                    <trailingSectionPaths>
                                        <trailingSectionPath>_exit-codes-0-89.adoc</trailingSectionPath>
                                        <trailingSectionPath>_searchrate-examples.adoc</trailingSectionPath>
                                    </trailingSectionPaths>
                                </tool>
                            </tools>
                        </configuration>
                    </execution>
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_addrate-examples.adoc
New file
@@ -0,0 +1,102 @@
////
  The contents of this file are subject to the terms of the Common Development and
  Distribution License (the License). You may not use this file except in compliance with the
  License.
  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
  specific language governing permission and limitations under the License.
  When distributing Covered Software, include this CDDL Header Notice in each file and include
  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
  Header, with the fields enclosed by brackets [] replaced by your own identifying
  information: "Portions Copyright [year] [name of copyright owner]".
  Copyright 2015-2016 ForgeRock AS.
  Portions Copyright 2026 3A Systems LLC.
////
== Examples
The following examples use this template file, `addrate.template`:
[source]
----
define suffix=dc=example,dc=com
define maildomain=example.com
branch: [suffix]
branch: ou=People,[suffix]
subordinateTemplate: person
template: person
rdnAttr: uid
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
givenName: <first>
sn: <last>
cn: {givenName} {sn}
initials: {givenName:1}<random:chars:ABCDEFGHIJKLMNOPQRSTUVWXYZ:1>{sn:1}
employeeNumber: <sequential:0>
uid: user.{employeeNumber}
mail: {uid}@[maildomain]
userPassword: password
telephoneNumber: <random:telephone>
homePhone: <random:telephone>
pager: <random:telephone>
mobile: <random:telephone>
street: <random:numeric:5> <file:streets> Street
l: <file:cities>
st: <file:states>
postalCode: <random:numeric:5>
postalAddress: {cn}${street}${l}, {st}  {postalCode}
description: This is the description for {cn}.
----
The following example adds entries, and then randomly deletes them
when more than 10,000 entries have been added:
[source]
----
$ addrate -p 1389 -D "cn=Directory Manager" -w password \
-f -c 10 -C random -s 10000 addrate.template
-----------------------------------------------------------------------
    Throughput                            Response Time
  (ops/second)                           (milliseconds)
recent  average  recent  average  99.9%  99.99%  99.999%  err/sec  Add%
-----------------------------------------------------------------------
466.7    467.2  20.738   20.738  187.00  201.00   201.00      0.0  100.00
588.9    528.1  17.015   18.661  166.00  201.00   201.00      0.0  100.00
1584.9    880.3   6.076   11.109  150.00  196.00   201.00      0.0  79.87
1577.8   1054.5   6.138    9.252  132.00  192.00   201.00      0.0  50.00
1853.0   1214.4   5.188    8.010  124.00  187.00   201.00      0.0  49.99
^CPurge phase...
2482.7   1426.2   3.790    6.783  114.00  187.00   201.00      0.0  9.77
----
The following example also adds entries, and then deletes them
in the order they were added after they are 10 seconds old:
[source]
----
$ addrate -p 1389 -D "cn=Directory Manager" -w password \
-f -c 10 -C fifo -a 10 addrate.template
-----------------------------------------------------------------------
    Throughput                            Response Time
  (ops/second)                           (milliseconds)
recent  average  recent  average  99.9%  99.99%  99.999%  err/sec  Add%
-----------------------------------------------------------------------
2065.6   2068.1   4.646    4.646  30.00   51.00    58.00      0.0  100.00
1479.7   1773.3   6.567    5.449  46.00   59.00    67.00      0.0  99.23
1443.4   1663.3   6.730    5.820  56.00  112.00   120.00      0.0  50.01
1462.6   1613.0   6.635    6.005  56.00  102.00   120.00      0.0  50.08
1452.2   1580.8   6.678    6.129  62.00  110.00   120.00      0.0  49.97
^CPurge phase...
1344.5   1541.4   7.170    6.280  69.00  176.00  1900.00      0.0  17.30
1703.3   1564.6   5.449    6.151  68.00  176.00  3000.00      0.0  0.00
----
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_authrate-examples.adoc
New file
@@ -0,0 +1,46 @@
////
  The contents of this file are subject to the terms of the Common Development and
  Distribution License (the License). You may not use this file except in compliance with the
  License.
  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
  specific language governing permission and limitations under the License.
  When distributing Covered Software, include this CDDL Header Notice in each file and include
  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
  Header, with the fields enclosed by brackets [] replaced by your own identifying
  information: "Portions Copyright [year] [name of copyright owner]".
  Copyright 2015-2016 ForgeRock AS.
  Portions Copyright 2026 3A Systems LLC.
////
== Examples
The following example demonstrates measuring simple bind performance:
[source]
----
$ authrate -p 1389 -g "rand(names.txt)" \
 -D "uid=%s,ou=people,dc=example,dc=com" -w password -c 10 -f
-----------------------------------------------------------------
     Throughput                            Response Time
   (ops/second)                           (milliseconds)
recent  average  recent  average  99.9%  99.99%  99.999%  err/sec
-----------------------------------------------------------------
9796.9   9816.6   1.029    1.029  12.413  161.451  161.835      0.0
14201.1  12028.1   0.704    0.835  9.508  161.456  167.573      0.0
14450.0  12835.9   0.692    0.782  8.989  161.835  174.518      0.0
12934.3  12860.6   0.773    0.779  9.253  161.339  174.426      0.0
14154.5  13121.0   0.706    0.764  9.025  161.451  177.101      0.0
^C
----
The `names.txt` contains
all the user IDs for the sample suffix.
All user password values have been set to <literal>password</literal>
for this example.
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_description-rate-tools.adoc
New file
@@ -0,0 +1,43 @@
////
  The contents of this file are subject to the terms of the Common Development and
  Distribution License (the License). You may not use this file except in compliance with the
  License.
  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
  specific language governing permission and limitations under the License.
  When distributing Covered Software, include this CDDL Header Notice in each file and include
  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
  Header, with the fields enclosed by brackets [] replaced by your own identifying
  information: "Portions Copyright [year] [name of copyright owner]".
  Copyright 2015-2016 ForgeRock AS.
  Portions Copyright 2026 3A Systems LLC.
////
When you do not use the `-f` option to keep connections open and rebind on the connections, the tool can exhaust its available ports, causing the tool to crash. You can work around this problem on test systems by changing TCP settings on the system.
For example, on Linux systems, set the following parameters in the `/etc/sysctl.conf` file:
[source]
----
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
----
The parameter `net.ipv4.tcp_fin_timeout` sets the length of time in seconds to wait for a final FIN packet before forcing a close of the socket. The default is 60 (seconds).
The parameter `net.ipv4.tcp_tw_recycle` enables fast recycling of TIME_WAIT sockets. The default is 0 (false). Enabling this can cause Network Address Translation (NAT) issues.
The parameter `net.ipv4.tcp_tw_reuse` enables reuse of TIME_WAIT sockets for new connections. The default is 0 (false).
These settings are recommended only for testing, and __not for production systems__.
After making the changes to `/etc/sysctl.conf` , reload the configuration with the sysctl command:
[source]
----
sysctl -p
----
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_modrate-examples.adoc
New file
@@ -0,0 +1,44 @@
////
  The contents of this file are subject to the terms of the Common Development and
  Distribution License (the License). You may not use this file except in compliance with the
  License.
  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
  specific language governing permission and limitations under the License.
  When distributing Covered Software, include this CDDL Header Notice in each file and include
  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
  Header, with the fields enclosed by brackets [] replaced by your own identifying
  information: "Portions Copyright [year] [name of copyright owner]".
  Copyright 2015-2016 ForgeRock AS.
  Portions Copyright 2026 3A Systems LLC.
////
== Examples
The following example uses the `modrate` command to write random 16-character description values to user entries:
[source, console]
----
$ grep ^uid: /path/to/Example.ldif | sed -e "s/uid: //" > names.txt
$ modrate -p 1389 -D "cn=Directory Manager" -w password  -A -F -c 4 -t 4 \
 -b "uid=%s,ou=people,dc=example,dc=com" -g "rand(names.txt)" \
 -g "randstr(16)" 'description:%2$s'
--------------------------------------------------------------------------
     Throughput                            Response Time
   (ops/second)                           (milliseconds)
recent  average  recent  average  99.9%  99.99%  99.999%  err/sec  req/res
--------------------------------------------------------------------------
1085.9   1088.5  993.849  993.849  2135.220  2510.361  2510.361  0.0  2.3
2086.7   1648.8  1963.980  1683.038  3015.025  3078.628  3215.050  0.0  1.0
3097.3   2092.6  1332.930  1524.278  2940.131  3024.811  3215.050  0.0  1.0
3848.3   2501.4  1045.000  1352.583  2902.235  3015.863  3215.050  0.0  1.0
3641.2   2717.4  1106.157  1290.003  2901.379  3015.597  3215.050  0.0  1.0
3759.4   2883.0  1065.732  1243.534  2900.400  3015.501  3215.050  0.0  1.0
^C
----
opendj-doc-generated-ref/src/main/asciidoc/man-pages/_searchrate-examples.adoc
New file
@@ -0,0 +1,43 @@
////
  The contents of this file are subject to the terms of the Common Development and
  Distribution License (the License). You may not use this file except in compliance with the
  License.
  You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
  specific language governing permission and limitations under the License.
  When distributing Covered Software, include this CDDL Header Notice in each file and include
  the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
  Header, with the fields enclosed by brackets [] replaced by your own identifying
  information: "Portions Copyright [year] [name of copyright owner]".
  Copyright 2015-2016 ForgeRock AS.
  Portions Copyright 2026 3A Systems LLC.
////
== Examples
The following example demonstrates measuring search performance:
[source, console]
----
$ grep ^uid: /path/to/Example.ldif | sed -e "s/uid: //" > names.txt
$ searchrate -p 1389 -b dc=example,dc=com -A -F -c 4 -t 4 \
 -g "rand(names.txt)" "(uid=%s)"
-------------------------------------------------------------------------------
     Throughput                            Response Time
   (ops/second)                           (milliseconds)
recent  average  recent  average  99.9%  99.99%  99.999%  err/sec  Entries/Srch
-------------------------------------------------------------------------------
1475.9   1475.9   0.423    0.423  6.938  126.236 126.236      0.0           1.0
2596.5   2038.4   0.254    0.315  6.866  12.980  126.236      0.0           1.0
3210.7   2428.2   0.205    0.267  5.733  11.710  126.236      0.0           1.0
3080.5   2591.0   0.215    0.252  5.733  10.541  126.236      0.0           1.0
3236.9   2720.1   0.203    0.240  5.258  10.514  126.236      0.0           1.0
3181.1   2796.8   0.207    0.234  5.258  10.384  126.236      0.0           1.0
3202.5   2854.8   0.206    0.229  4.825  10.384  126.236      0.0           1.0
----
opendj-doc-generated-ref/src/main/asciidoc/reference/admin-tools-ref.adoc
@@ -12,7 +12,7 @@
  information: "Portions copyright [year] [name of copyright owner]".
  Copyright 2017 ForgeRock AS.
  Portions Copyright 2024 3A Systems LLC.
  Portions Copyright 2024-2026 3A Systems LLC.
////
:figure-caption!:
@@ -27,6 +27,14 @@
:leveloffset: 1"
include::../partials/man-addrate.adoc[]
'''
include::../partials/man-authrate.adoc[]
'''
include::../partials/man-backendstat.adoc[]
'''
@@ -123,6 +131,10 @@
'''
include::../partials/man-modrate.adoc[]
'''
include::../partials/man-rebuild-index.adoc[]
'''
@@ -131,6 +143,10 @@
'''
include::../partials/man-searchrate.adoc[]
'''
include::../partials/man-setup.adoc[]
'''