Gentoo Archives: gentoo-server

From: Eric Brown <airuike@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [OBORONA-SPAM] [gentoo-server] initng and runscript
Date: Wed, 21 Dec 2005 01:13:54
Message-Id: d5b293290512201712x5743969bof4876b9a50531080@mail.gmail.com
In Reply to: Re: [OBORONA-SPAM] [gentoo-server] initng and runscript by Andrea Carpani
1 It's not just init scripts that are designed poorly, it's applications
2 that fail to daemonize and dont' return non-zero. (like apache-1.3,
3 ntp-date, snort, etc.. most servers).
4
5 I think the new baselayout has some adjustable sleep/checks on by
6 default, but I haven't tries it yet. I suppose that would work by
7 having the init script sleep for a short time, then check to see if a
8 certain process is running (a dirty hack that's frowned updon by
9 some)...
10
11 Anyway, I really think this is something worth looking into, either as
12 a separate package that implements some kind of monitoring functions
13 in init scripts, or as a basic set of monitoring functions that are
14 included in baselayout for developers to optionally use. While there
15 are options like daemontools and rmon? I don't think they provide a
16 very robust solution to this problem.
17
18 Here's an idea:
19
20 Have users emerge a program that can do some basic things:
21
22 1) check config scripts of running services for variables like:
23 CHECK_COMMAND
24 SLEEP_TIME
25 INIT_SLEEP
26 IF_DOWN_DO_THIS
27
28 (those variables could optionally be implemented per package, or
29 explicitly disabled, they would have sane defaults in a central .conf
30 file for this enhancement package)
31
32 2) is a cron job/daemon that automatically checks all running apps in
33 the current runlevel, can report problems (send emails, log stuff,
34 etc), can send heartbeat, etc..
35
36 3) is well documented in the gentoo handbook since it's probably a
37 vital component
38
39
40 To me this kind of thing is probably simple, unixish, and robust
41 enough for most of our needs...
42
43 Any thoughs?
44
45 On 12/16/05, Andrea Carpani <ml@×××××××.net> wrote:
46 > Il giorno gio, 15-12-2005 alle 13:27 +0200, Alex Efros ha scritto:
47 >
48 > > If you're looking for _reliable_ alternative for runscript style init scripts,
49 > > then you should look into 'runit' package. Runit is improved version of DJB's
50 > > 'daemontools' package. I use it many years without any problems.
51 > >
52 > > Check websites of daemontools and runit for all gore details why it's only
53 > > _reliable_ way to control services.
54 >
55 > Thanks I'll try it.
56 >
57 > --
58 > Andrea Carpani <ml@×××××××.net>
59 >
60 > --
61 > gentoo-server@g.o mailing list
62 >
63 >
64
65 --
66 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] initng and runscript Kalin KOZHUHAROV <kalin@××××××××.net>