$ cat ldaptest
ldclt -h ldapserver.lab -p 389 \
-e "bindeach,bindonly" \
-a 1000 \
-n 10 \
-D "cn=testXXXXXXX,dc=test,dc=lab" \
-w foobar \
-e "randombinddn,randombinddnlow=0000001,randombinddnhigh=0015000"
$ ./ldaptest
ldclt version 4.23
ldclt[9895]: Starting at Fri Nov 3 11:49:24 2017
ldclt[9895]: Average rate: 1225.00/thr (1225.00/sec), total: 12250
ldclt[9895]: Average rate: 1322.80/thr (1322.80/sec), total: 13228
ldclt[9895]: T000: Cannot ldap_simple_bind_s (cn=test0004533,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T003: Cannot ldap_simple_bind_s (cn=test0004880,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T002: Cannot ldap_simple_bind_s (cn=test0000180,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T002: thread is dead.
ldclt[9895]: T008: Cannot ldap_simple_bind_s (cn=test0004142,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T000: thread is dead.
ldclt[9895]: T005: Cannot ldap_simple_bind_s (cn=test0000056,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T005: thread is dead.
ldclt[9895]: T008: thread is dead.
ldclt[9895]: T003: thread is dead.
ldclt[9895]: T001: Cannot ldap_simple_bind_s (cn=test0003193,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T001: thread is dead.
ldclt[9895]: T009: Cannot ldap_simple_bind_s (cn=test0003687,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T009: thread is dead.
ldclt[9895]: T006: Cannot ldap_simple_bind_s (cn=test0001082,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T006: thread is dead.
ldclt[9895]: T004: Cannot ldap_simple_bind_s (cn=test0004994,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T004: thread is dead.
ldclt[9895]: T007: Cannot ldap_simple_bind_s (cn=test0003764,dc=test,dc=lab, foobar), error=-1 (Can't contact LDAP server)
ldclt[9895]: T007: thread is dead.
ldclt[9895]: Average rate: 275.40/thr ( 275.40/sec), total: 2754
ldclt[9895]: Average rate: 0.00/thr ( 0.00/sec), total: 0
ldclt[9895]: All threads are dead - exit.
ldclt[9895]: T000: pendingNb=0
ldclt[9895]: T001: pendingNb=0
ldclt[9895]: T002: pendingNb=0
ldclt[9895]: T003: pendingNb=0
ldclt[9895]: T004: pendingNb=0
ldclt[9895]: T005: pendingNb=0
ldclt[9895]: T006: pendingNb=0
ldclt[9895]: T007: pendingNb=0
ldclt[9895]: T008: pendingNb=0
ldclt[9895]: T009: pendingNb=0
ldclt[9895]: Global total pending operations: 0
ldclt[9895]: Global average rate: 2823.20/thr (705.80/sec), total: 28232
ldclt[9895]: Global number times "no activity" reports: never
ldclt[9895]: Global number of dead threads: 10
ldclt[9895]: Global error -1 (Can't contact LDAP server) occurs 10 times
ldclt[9895]: Ending at Fri Nov 3 11:50:04 2017
ldclt[9895]: Exit status 4 - Cannot bind.