[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#126750: klogd should optionally be started from init(8)



On Sun, 30 Dec 2001, Dominik Kubla wrote:
> On Sun, Dec 30, 2001 at 08:13:36PM -0200, Henrique de Moraes Holschuh wrote:
> > I want the LOGGING daemons (i.e. only syslog and klogd), which ALREADY run
> > as root, to be restarted should they die. Due to OOM killer, due to
> > segfaults. Whatever.
> 
> It could be argued that those need not be run as root. All they need
> are the necessary capabilities:

Indeed. In which case just using init to keep them alive, and leaving the
OOM killer alone might be best. The syscall aproach could still be used I
suppose, but it gets a bit more complicated.

> daemons. If they fail, they fail. The system still works. But if they

Well, the system still works, but logging stops. And sometimes that log
information might have been very useful.

> are not killed by OOM because of an excemption the system might kill
> the nfs daemon or the sendmail process.  So where do you draw the line?

Good question. I would not bother with anything else other than ssh and
logging (and the kernel threads, i suppose). And all that just to make them
harder (not impossible) to get killed by the OOM killer.

BTW, I consider tweaking with the OOM killer a very partial solution, and
not a very good idea.  Something that would restart a process the admin told
it to (i.e. init, or something like it) is a better solution, as it does not
touch the kernel, and it will restart services that got ill.

> Keep in mind that if the system is so resource starved that the OOM
> mechanism kicks in, the failing processes might not be able to log
> anything meaningful anyway.

Yes, I know this quite well. I've been through an OOM killer rampage once or
twice with an older 2.4.x kernel.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



Reply to: