s4 dns_server Bind9: Log opertion durations

Enterprise / Samba - Gary Lockyer [catalyst.net.nz] - 7 May 2019 05:03 EDT

Add duration debug logging to the samba bind9 dlz driver and the dnsserver_common routines. This should aid future diagnosis of performance issues, and could be used to monitor DNS performance.

The logs are currently Human readable text only, i.e. no JSON formatted output.

Log lines are of the form:

: DNS timing: result: [] \ duration: () zone: [] name: [] \ data: []

e.g.

dns_common_wildcard_lookup: DNS timing: result: [WERR_OK] \ duration: (111) zone: [] \ name: [DC=_ldap._tcp.Default-First-Site-Name._sites.ForestDnsZones,\ DC=chgdcpassword.samba.example.com,CN=MicrosoftDNS,DC=DomainDnsZones,\ DC=chgdcpassword,DC=samba,DC=example,DC=com] data: []

Enabled by setting log level to "dns:10"

durations are in microseconds.

3d42e257a61 s4 dns_server Bind9: Log opertion durations
source4/dns_server/dlz_bind9.c | 306 ++++++++++++++++++++++++++--------
source4/dns_server/dnsserver_common.c | 139 +++++++++++----
source4/dns_server/dnsserver_common.h | 29 ++++
3 files changed, 366 insertions(+), 108 deletions(-)

Upstream: gitweb.samba.org


  • Share