Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running OpenLDAP's slapd on Fedora 14, and I see that in the directory for the database, there is a log.0000000001 file. I would like to be able to read this file, as I am interested in recent transactions that have occurred. How do I read this file?

share|improve this question

2 Answers 2

For the common Berkeley DB, db4-utils package including some tools to manipulate:

db_archive
db_checkpoint
db_deadlock
db_dump
db_dump185
db_load
db_printlog
db_recover
db_stat
db_upgrade
db_verify

But if you use db_printlog to read the Berkeley log files from OpenLDAP, you will get the below errors:

db_printlog: Program version 4.3 doesn't match environment version db_printlog: DB_ENV->open: DB_VERSION_MISMATCH: Database environment version mismatch

The reason is OpenLDAP shipped with internal copy tools of db-4.3:

slapd_db_archive
slapd_db_checkpoint
slapd_db_deadlock
slapd_db_dump
slapd_db_hotbackup
slapd_db_load
slapd_db_printlog
slapd_db_recover
slapd_db_stat
slapd_db_upgrade
slapd_db_verify

So, try this:

slapd_db_printlog -h /var/lib/ldap/ | less
share|improve this answer

Not sure how to read that file, but you can look a "recently" created or modified entries with
ldapsearch "(|(createTimestamp>=20110927221035Z)(modifyTimestamp>=20110927221035Z))" dn creatorsName createTimestamp modifiersName modifyTimestamp

OpenLDAP can use syslog facilities to log many things. Don't know if (or with what verbosity) Fedora 14 does this by default (or under your environment). (You probably checked for this already so likely not sufficient.)

A closer answer to your question as asked could be found at http://www.openldap.org/faq/data/cache/738.html before the links went stale. Though it all seems to lead to Oracle documentation, which is unsurprising.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.