[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Efficient way to count number of entries in a database?



Karsten Heymann wrote:
> is there a more efficient way to count how many entries a ldap database
> has than

You could try using contrib overlay slapo-noopsrch and then use noop
search request control. But if you have many entries you will run into
search timeout.

ldapsearch -E 1.3.6.1.4.1.4203.666.5.18

outputs base64 of BER encoding of response control value which is
described herein:

https://www.openldap.org/its/index.cgi?findid=6598

See also file Demo/pyasn1/noopsearch.py in python-ldap's source tar.gz.

Also my monitoring script does that:
https://www.stroeder.com/pylib/slapd_checkmk.py

How many entries do you have in your DB?

Ciao, Michael.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature