Problem
My /usr/adm/syslog file gets updated every hour with this information from named (note that the lines below are broken up for readability):
Feb 7 03:40:54 eeyore named[478]: USAGE 949923654 949696854 CPU=0.23u/0.38s
CHILDCPU=0u/0s
Feb 7 03:40:54 eeyore named[478]: NSTATS 949923654 949696854 A=340 PTR=8
AAAA=2 ANY=3
Feb 7 03:40:54 eeyore named[478]: XSTATS 949923654 949696854 RR=88 RNXD=28
RFwdR=71 RDupR=0 RFail=0 RFErr=0 RErr=0 RAXFR=0 RLame=4 ROpts=0 SSysQ=29
SAns=45 SFwdQ=230 SDupQ=2268 SErr=0 RQ=353 RIQ=0 RFwdQ=230 RDupQ=78 RTCP=0
SFwdR=71 SFail=71 SFErr=0 SNaAns=17 SNXD=25What does it mean, and do I need to do anything with this information?
Solution
The hourly statistics presented by named are written to syslog to help a system administrator better understand the nameserver activity and load.
The first line indicates the overall CPU usage to handle the
named activity. In this case, all the values are a fraction of
a second, which is probably of minimal impact to the server. The
large numbers after "USAGE" indicate how long the server has been
running (subtract the second number from the first to get the
uptime in seconds).The NSTATS message on the second line is a summary of the query
types your server has received and the counts for each. In this
example, we have handled 340 requests for A records, 8 requests
for PTR records, 2 requests for AAAA records (used to store a
128-bit IPv6 address), and 3 "any" requests.The third and final line of the syslog output lists more specific information about the queries, zone transfers, errors, and so on:
RR: Responses to queries made from this server.
RNXD: Number of "no such domain" responses.
RFwdR: Replies that satisfied the original query. (Note
that DNS allows for communication between
nameservers that have little or nothing to do with
the original request.)
RDupR: Received a duplicate answer, such as when more
than one nameserver replies.
RFail: SERVFAIL message. This is not the same as a
server timeout error. Here, the remote server
failed because of a configuration error, memory
shortage, expired zone data, and so on.
RFErr: FORMERR message. The original query had a format
error.
RErr: Remote server errors other than RFail and RFErr.
RAXFR: Number of zone transfers initiated. For servers
that are not also slave (secondary) servers, this
count will be 0.
RLame: Number of queries to this server for a zone we are
not authoritative for.
ROpts: Received packet that included IP options (source
route information, timestamp, security data, and
so on).
SSysQ: Query sent to a nameserver other than a root
nameserver.
SAns: Count of responses sent to a remote server.
SFwdQ: Number of queries sent to a remote server after
checking our local zone data and cached data.
SDupQ: Query sent to more than one nameserver.
SErr: sendto() failed. That is, our send of data to a
remote nameserver we are currently connected to has
failed.
RQ: Received this many queries from remote servers.
RIQ: Received an inverse query. Inverse queries,
to map an address to a name, are now handled by PTR
records, so this number will generally be 0.
RFwdQ: Answers forwarded from another nameserver when
data was not in our zone records or cache.
RDupQ: Number of duplicate queries received.
RTCP: Received a query over TCP (instead of UDP).
SFwdR: Forwarded a response from another nameserver to
the client. (Client queried our nameserver for
another domain's information.)
SFail: Sent them a SERVFAIL (see RFail, above).
SFErr: Sent them a FORMERR (see RFErr, above).
SNaAns: Sent a non-authoritative answer.
SNXD: "No such domain" answer sent to remote server. See also
DNS and BIND, Albitz & Liu, Third Edition, O'Reilly & Associates.