Este conteúdo não está disponível no idioma selecionado.
Chapter 7. Logging statistics per search operation
During some search operations, especially with filters such as (cn=user*)
, the time the server spends for receiving the tasks and then sending the result back (etime
) can be very long.
Expanding the access log with information related to indexes used during search operation helps to diagnose why etime
value is resource expensive.
Use the nsslapd-statlog-level
attribute to enable collecting statistics, such as a number of index lookups (database read operations) and overall duration of index lookups for each search operation, with minimal impact on the server.
Prerequisites
- You enabled access logging.
Procedure
Enable search operation metrics:
dsconf -D "cn=Directory Manager" instance_name config replace nsslapd-statlog-level=1
# dsconf -D "cn=Directory Manager" instance_name config replace nsslapd-statlog-level=1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the instance:
dsctl instance_name restart
# dsctl instance_name restart
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Perform a search operation:
ldapsearch -D "cn=Directory Manager" -H ldap://server.example.com -b "dc=example,dc=com" -s sub -x "cn=user*"
# ldapsearch -D "cn=Directory Manager" -H ldap://server.example.com -b "dc=example,dc=com" -s sub -x "cn=user*"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow View the access log file and find the search statistics records:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow