BIND9.7. When several named processes are running, how to judge which process is providing the service?

StackOverflow https://stackoverflow.com/questions/14522516

  •  05-03-2022
  •  | 
  •  

質問

For example, I execute "sudo named" several times, so there are several named processes running. When I use "pidof named", I get several pids.

I want to calculate the CPU usage rate of the BIND process,so I need to get some parameters from "/proc/pid/stat", so I need the pid of the named process which is really providing the domain resolution service.

What's the difference between the named process which is providing the service and the others? Could you give me a detailed explanation?

thanks very much~

(It's my first time to use stackoverflow , to use English to ask quetions , please ignore those syntax errors.)

役に立ちましたか?

解決

There should be just one named running, the scripts that manage the service ensure that. You shouldn't start it like that, you should use what your distribution uses to start it, probably something along the lines of service bind start (that is probably a RedHat-ism), or /etc/rc.d/bind start (for bog-standard SysVinit).

I was responsible for DNS for quite some time here. Some tips:

  • DNS is a very critical service, configure and monitor with extreme care. Do read up on setting up and managing this, don't go ahead until you are absolutely clear.
  • Get somebody as a backup for the case that you aren't available, and make sure they understand the previous point.
  • DNS isn't CPU intensive (OK, with signed domains and that newfangled stuff that might have changed), it is memory intensive (and network intensive, or at least sensitive to delays). Our main DNS server was running for months at a time, and clocked up some half hour of CPU time during that kind of period IIRC.
  • Separate your master server (responsible for the domain(s) from the servers queried by clients (caching servers). There have been vulnerabilities where malformed questions or "answers" to questions that hadn't been asked soiled the database
  • The master server will have all the domain information in RAM, make sure you have got enough of it
  • Make sure all machines under your jurisdiction use the same caching server. It makes no sense for more than one, that destroys the idea of cache.
  • The caching servers collect immense amounts of data over time. This data rarely is performance critical, so configure them with plenty of swap space to accommodate overflows.

他のヒント

Bind issues as many named processes as many CPUs you have:

man named: -n #cpus Create #cpus worker threads to take advantage of multiple CPUs. If not specified, named will try to determine the number of CPUs present and create one thread per CPU. If it is unable to determine the number of CPUs, a single worker thread will be created.

External source:

https://unix.stackexchange.com/questions/140986/multiple-named-processes-for-bind9-in-debian

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top