LDCLT(1)

πŸ“¦
version 3.3.1 Β· 3 versions
  • 3.3.1 Β· arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.0.15 Β· ubuntu jammy
  • 2.3.1 Β· debian bookworm
, in arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ LDCLT β€” the load test program for LDAP ✨

okay bestie, buckle up πŸ’– this is ldclt, a whole General Commands Manual situation, and it is the LDAP load-testing queen. she stresses your LDAP server on purpose. for science. πŸ‘‘


🌸 SYNOPSIS 🌸

ldclt [-qQvV] [-E <max errors>] [-b <base DN>] [-h <host>] [-p <port>]
[-t <timeout>] [-D <bind DN>] [-w <passwd>] [-o <SASL option>] [-e
<execParams>] [-a <max pending>] [-n <nb threads>] [-i <nb times>] [-N
<nb samples>] [-I <err number>] [-T <total>] [-r <low> -R <high>] [-f
<filter>] [-s <scope>] [-S <consumer>] [-P<supplier port>] [-W
<waitsec>] [-Z <certfile>]

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: this tool is a LDAP client, and her entire personality is validating how reliable the product is under a huge variety of stress conditions. like she will throw hands at your directory server until something cracks, and that's the point. no cap. πŸ”₯


πŸ’… OPTIONS πŸ’…

these are the valid options, and yes we're going through every single one, don't even try to skip:

  • -a β€” asynchronous mode, with max pending operations. it's giving multitasking main character energy.
  • -b β€” give the base DN to use. default is "dc=example,dc=com".
  • -D β€” bind DN. go peek at -w for the other half of this duo 🫢
  • -E β€” max errors allowed. default 1000.
  • -f β€” filter for searches.
  • -h β€” host to connect to. default "localhost".
  • -H β€” LDAP URL to connect to. example: ldap://localhost:389. heads up, this one takes precedence over -h and -p. she's the boss here πŸ‘‘
  • -i β€” number of times inactivity is allowed. default 3 (that's 30 seconds).
  • -I β€” ignore errors (cf. -E). default none.
  • -n β€” number of threads. default 10.
  • -N β€” number of samples (10 seconds each). default infinite.
  • -o β€” SASL option.
  • -p β€” server port. default 389.
  • -P β€” supplier port (to check replication). default 16000.
  • -q β€” quiet mode. see option -I.
  • -Q β€” super quiet mode. 🀫
  • -r β€” range's low value.
  • -R β€” range's high value.
  • -s β€” scope. may be base, subtree or one. default subtree.
  • -S β€” consumer to check.
  • -t β€” LDAP operations timeout. default 30 seconds.
  • -T β€” total number of operations per thread. default infinite.
  • -v β€” verbose.
  • -V β€” very verbose. πŸ—£οΈ
  • -w β€” bind passwd. see -D.
  • -W β€” wait between two operations. default 0 seconds.
  • -Z β€” certfile. turn on SSL and use certfile as the certificate DB πŸ”
  • -e β€” execution parameters, and bestie there are a LOT of them:
    • add β€” ldap_add() entries.
    • append β€” entries to the genldif file.
    • ascii β€” use ascii 7-bits strings.
    • attreplace=name:mask β€” replace attribute of existing entry.
    • attrlist=name:name:name β€” specify list of attribs to retrieve
    • attrsonly=0|1 β€” ldap_search() parameter. set 0 to read values.
    • bindeach β€” ldap_bind() for each operation.
    • bindonly β€” only bind/unbind, no other operation is performed.
    • close β€” will close() the fd, rather than ldap_unbind().
    • cltcertname=name β€” name of the SSL client certificate
    • commoncounter β€” all threads share the same counter.
    • counteach β€” count each operation not only successful ones.
    • delete β€” ldap_delete() entries.
    • dontsleeponserverdown β€” will loop very fast if server down.
    • emailPerson β€” objectclass=emailPerson (-e add only).
    • esearch β€” exact search.
    • genldif=filename β€” generates a ldif file
    • imagesdir=path β€” specify where are the images.
    • incr β€” incremental values.
    • inetOrgPerson β€” objectclass=inetOrgPerson (-e add only).
    • keydbfile=file β€” filename of the key database
    • keydbpin=password β€” password for accessing the key database
    • noglobalstats β€” don't print periodical global statistics
    • noloop β€” does not loop the incremental numbers.
    • object=filename β€” build object from input file
    • person β€” objectclass=person (-e add only).
    • random β€” random filters, etc...
    • randomattrlist=name:name:name β€” random select attrib in the list
    • randombase β€” random base DN.
    • randombaselow=value β€” low value for random generator.
    • randombasehigh=value β€” high value for random generator.
    • randombinddn β€” random bind DN.
    • randombinddnfromfile=fine β€” retrieve bind DN & passwd from file
    • randombinddnlow=value β€” low value for random generator.
    • randombinddnhigh=value β€” high value for random generator.
    • rdn=attrname:value β€” alternate for -f.
    • referral=on|off|rebind β€” change referral behaviour.
    • scalab01 β€” activates scalab01 scenario.
    • scalab01_cnxduration β€” maximum connection duration.
    • scalab01_maxcnxnb β€” modem pool size.
    • scalab01_wait β€” sleep() between 2 attempts to connect.
    • smoothshutdown β€” main thread waits till the worker threads exit.
    • string β€” create random strings rather than random numbers.
    • v2 β€” ldap v2.
    • withnewparent β€” rename with newparent specified as argument.
    • randomauthid β€” random SASL Authid.
    • randomauthidlow=value β€” low value for random SASL Authid.
    • randomauthidhigh=value β€” high value for random SASL Authid.

πŸŽ€ EXAMPLES πŸŽ€

okay so say you wanna populate a database with 1000 user objects. first, create a file called template.ldif that contains:

objectClass: top
objectclass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: posixAccount
objectClass: shadowAccount
sn: user[A]
cn: user[A]
givenName: user[A]
description: description[A]
userPassword: password[A]
mail: user[A]@example.com
uidNumber: 1[A]
gidNumber: 1[A]
shadowMin: 0
shadowMax: 99999
shadowInactive: 30
shadowWarning: 7
homeDirectory: /home/uid[A]

now you can load it into the database using:

ldclt -h localhost -p 389 -D "cn=Directory Manager" -w password -b "ou=people,dc=example,dc=com" -I 68 -e add,commoncounter -e "object=/tmp/template.ldif,rdn=uid:user[A=INCRNNOLOOP(0;999;4)]"

and then, using these created users, you can test binding to the accounts with:

ldclt -h localhost -p 389 -e bindeach,bindonly -D uid=user0XXX,dc=example,dc=com -w password0XXX -e randombinddn,randombinddnlow=0,randombinddnhigh=0999 -e esearch -f "(&(objectClass=posixAccount)(uid=user*)(uidNumber=*)(gidNumber=*))"

like. look at her go. she ate. πŸ’…βœ¨


🫢 AUTHOR 🫢

ldclt was written by the 389 Project. iconic behavior honestly.


😭 REPORTING BUGS 😭

found a bug? report it to https://github.com/389ds/389-ds-base/issues/new β€” they wanna hear it fr fr.


Copyright Β© 2001 Sun Microsystems, Inc. Used by permission. Copyright Β© 2018 Red Hat, Inc.

This manual page was written by Michele Baldessari <michele@pupazzo.org>, for the Debian project (but may be used by others).

This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution.

lowkey important bestie: it's free software, go read the LICENSE file before you redistribute, okay? 🧚

and that's the whole vibe check πŸ’– this page lives in the General Commands Manual section, it's from the 389-ds-base world, and it's dated March 31, 2017. periodt. πŸŒˆπŸ’œ

πŸ“¦ where this page comes from