Linux DNS server running status

Source: Internet
Author: User
Article Title: explores the running status of the Linux System DNS server. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In Linux, it also provides a popular BIND server, which is the most commonly used server software for building DNS servers. There are many articles about BIND installation. Now let's talk about the maintenance topic. How can we understand the running status of the DNS server? Is it busy and load-intensive? All this is important for system administrators.
 
To learn about the running status of the DNS server, you can view the log files generated by the DNS server during running.
 
BIND 8 provides some means to control the log system. However, the logs generated by the default status are enough to understand the current running status of the DNS server.
 
By default, BIND generates logs through syslog and stores them in the/var/log/message file.
 
 Note: The following four files are involved:
 
/Var/log/message.1
 
/Var/log/message.2
 
/Var/log/message.3
 
/Var/log/message.4
 
In fact, logs are stored in five files to prevent files from being too large. When the message file is large enough, it becomes message.1, and the original message.1 becomes message.2 ......, The content of message.4 disappears.
 
Because the log information in this file is generated by syslog, it is not all about BIND log information. Run the following command to select all BIND logs:
 
More/var/log/message grep named>/tmp/named. log
 
  Note: The BIND server process name is named.
 
In this way, BIND-related log information in/var/log/message will be written into the/tmp/named. log file. There are two main types of logs: LOG_NOTICE and LOG_INFO.
 
  1. LOG_NOTICE-level logs
 
1. Each time the BIND server named is started, the following LOG_NOTICE-level log information is generated:
 
Nov 28 10:37:45 www named [10134]: starting. named 8.2.2-P3
 
Where:
 
Nov 28 10:37:45 indicates the server startup time
 
Www display the name of the machine where the DNS server is located
 
Named [10134]: displays the DNS server process name and process ID.
 
Starting. the DNS server is being started.
 
Named 8.2.2-p3 displays the BIND Software Version
 
2. When an HUP signal is sent to the DNS server to restart the DNS server, the following LOG_NOTICE-level log information is generated:
 
Nov 28 10:37:45 www named [10134]: reloading nameserver
 
Where:
 
Nov 28 10:37:45 indicates the restart time of the server
 
Www display the name of the machine where the DNS server is located
 
Named [10134]: displays the DNS server process name and process ID.
 
Reloading. indicates that the DNS server is being restarted.
 
Nameserver displays the name of the server being restarted
 
  2. LOG_INFO-level logs
 
When the DNS server is running, a set of LOG_INFO-level logs are generated every one hour to report the running status of the DNS server:
 
Dec 26 10:23:52 www named [1033]: Cleaned cache of 26 RRset
 
Dec 26 10:23:52 www named [1033]: USAGE 977797432 976760631 CPU = 6.55u/6.24 s child cpu = 0u/0 s
 
Dec 26 10:23:52 www named [1033]: NSTATS 977797432 976760631 0 = 2 A = 13192
 
CNAME = 321 PTR = 11204 MX = 1173 TXT = 4 AAAA = 32 ANY = 4956
 
Dec 26 10:23:52 www named [1033]: XSTATS 977797432 976760631 RR = 7629 RNXD = 1368
 
RFwdR = 4836 RDupR = 51 RFail = 159 RFErr = 0 RErr = 12 RAXFR = 0 RLame = 175 ROpts = 0
 
SSysQ = 2082 SAns = 26234 SFwdQ = 4520 SDupQ = 1263 SErr = 0 RQ = 30889 RIQ = 4 RFwdQ = 0
 
RDupQ = 259 RTCP = 2 SFwdR = 4836 SFail = 6 SFErr = 0 snans = 21753 SNXD = 10276
 
Next we will explain it one by one:
 
1. Dec 26 10:23:52 www named [1033]: Cleaned cache of 26 RRset
 
This is the first line of each set of log information, indicating that the Cache is being cleared.
 
Where:
 
Dec 26 10:23:52 indicates the log generation time
 
Www display the name of the machine where the DNS server is located
 
Named [1033]: displays the DNS server process name and process ID.
 
Cleaned cache of 26 RRset indicates that the cache is being cleared
 
2. Dec 26 10:23:52 www named [1033]: USAGE 977797432 976760631 CPU = 6.55u
 
/6.24 s child cpu = 0u/0 s
 
This row is the USAGE line used to count the CPU time occupied by the DNS server.
 
Where:
 
Dec 26 10:23:52 indicates the log generation time
 
Www display the name of the machine where the DNS server is located
 
Named [1033]: displays the DNS server process name and process ID.
 
USAGE row mark
 
The value of 977797432 976760631 977797432-976760631 is the total number of seconds that the DNS server runs.
 
CPU = 6.55u/6.24 s indicates that the DNS server uses the user State for 6.55 seconds, and the system state for 6.24 seconds (u indicates the user,
 
S stands for system ),
 
The child cpu represents the CPU usage of the DNS server sub-process.

[1] [2] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.