Article View: comp.archives
Article #5073DNS performance metering
From: Bryan Beecher
Date: Fri, 24 May 1991 06:36
Date: Fri, 24 May 1991 06:36
54 lines
2966 bytes
2966 bytes
Archive-name: internet/named/umich-bind/1991-05-13
Archive: terminator.cc.umich.edu:/unix/dns/bind4.8.3.tar.Z [141.211.164.8]
Original-posting-by: Bryan Beecher <bryan@notorious.rs.itd.umich.edu>
Reposted-by: emv@msen.com (Edward Vielmetti, MSEN)
> I'm a great fan of programs that log what they're doing, how they're
> doing, and so on, because logging helps me keep a finger on the pulse
> of my systems, and are invaluable when you're trying to debug a
> problem. It has been a small source of irritation to me that bind does
> almost no logging of its overall performance.
It really is useful to be able to keep an eye on what named is up to and
who is using it. With this in mind, I added a single syslog() to ns_req.c
that records each incoming query. A shell script then munges this log file
up and mails me a report each day.
The report tells me how many queries we got, who they came from, what
names they were looking up, and what record types were looked up. Sometimes
I'll pipe it into sort to produce a top-10 sort of thing, but most of
the time it's easy enough to skim through the whole thing quickly.
The syslog() can be added easy enough (it goes right after the finish:
label in ns_req.c).
------------------------------------------------------------------------
hp->arcount = 0;
hp->rcode = NOTIMP;
}
finish:
#ifdef LOGIT
syslog(LOG_INFO, "XX /%s/%s/%s", inet_ntoa(from->sin_addr),
dname, p_type(type));
#endif
#ifdef STATS
switch(hp->rcode) {
------------------------------------------------------------------------
The shell script is on terminator.cc.umich.edu in /unix/dns. You'll also
need a DiG-like program called 'query' which is also in /unix/dns. If anyone
would like the script, please feel free to pick up a copy.
Also, some of Don Lewis' patches are really good to have. For instance,
his LAME_DELEGATION patch flags cases where a nameserver is listed in a
NS record, but in reality it isn't configured as a nameserver for that
domain. I run this, and it flags about 15-25 screwed up domains a day!
Bryan Beecher
UMICH.EDU hostmaster
-- comp.archives file verification
terminator.cc.umich.edu
-rw-r--r-- 1 dns ftp 638021 May 20 09:37 /unix/dns/bind4.8.3.tar.Z
found umich-bind ok
terminator.cc.umich.edu:/unix/dns/bind4.8.3.tar.Z
Technical Details
Message-ID:
<1991May24.063631.3910@ox.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!rphroy!ox.com!msen.com!emvShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!rphroy!ox.com!msen.com!emv From: bryan@notorious.rs.itd.umich.edu (Bryan Beecher) Newsgroups: comp.archives Subject: DNS performance metering Message-ID: <1991May24.063631.3910@ox.com> Date: 24 May 91 06:36:31 GMT Sender: emv@msen.com (Edward Vielmetti, MSEN) Reply-To: Bryan Beecher <bryan@notorious.rs.itd.umich.edu> Followup-To: comp.archives Organization: (none) Lines: 54 Approved: emv@msen.com (Edward Vielmetti, MSEN)