📄 readme
字号:
NINIT -- NAMED INIT PROGRAM May 13, 1991WHAT NINIT DOES===============ninit starts named in nofork mode and waits for it to exit. When itexits, ninit restarts a new named. In addition, every 5 minutes,ninit wakes up and sends a SIGIOT to named. This causes named to dumpstatistical information to /usr/tmp/named.stats. Every 60 seconds,ninit tries to do a name resolution using the local named. If itfails to get an answer back in some short amount of time, it kills theexisting named and starts a new one.We are running this on the MIT nameservers and our mailhub. We findthat ninit is extremely useful in catching named's that die mysteriously,or which get hung for some unknown reason. It's especially useful on ourmailhub, since our mail queue will explode if we lose name resolutioneven for a short time. MODIFICATIONS TO NAMED======================In order to use ninit, you will need to modify your named so that itunderstands the -n flag, which tells it not to fork upon startup. Thepatch to do that can be found in ns_main.c.patch. If you don't have source code to your named, you can also solve theproblem by adding the #define FORKING_NAMED. This solves the problemby starting the named with the -d option, which tells named not tofork, but which also tells it to start a debugging log in/usr/tmp/named.run. As soon as the the named is finishedinitializing, ninit will send a SIGUSR1 signal to tell it to turn offdebugging. (It can't send the signal before that because the signalhandlers aren't established before that point.) The down side of thisis that named will be writing debugging information while it isinitializing itself. I would suggest modifying named if you have the source. If you don'tFORKING_NAMED will work --- it's an ugly solution, though.HOW TO INSTALL NINIT====================1) Edit ninit.c and check the configuration options near thebeginning of the file. You will almost certainly need to changeTEST_HOST. You may or may not need to change the configurationvariables.2) Compile ninit and place the executable in /etc.3) Pick a port for the "nstats" service and install it in /etc/services.Modify the named_stats script to use the port number you've picked as the $default_nstats_port.5) Add the following line /etc/inetd.confnstats stream tcp nowait unswitched daemon /bin/cat cat /usr/tmp/named.stats6) Modify /etc/rc so that it starts /etc/ninit instead of /etc/namedupon reboot.7) As root, run /etc/ninit. It will kill off the existing named andrun a new named under its control.If you like, you may wish to edit /etc/syslog.conf to direct the ninitlogging information to a logfile, or to some centeral logging host, orwherever you choose.You will also need to modify named_stats so that it checks whateverhosts you desire.BUGS==== None known. (Yet!) If you find any problems, please let me know: Theodore Ts'o tytso@mit.edu.I hope you find ninit useful!Theodore Ts'oMay 13, 1991.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -