Hi Declan.
> This may be heresy, but I am irritated by the amount of time
> linux spends shutting down. I am running SuSE 6.1, and I
> generally boot up, work, and close off, so it may happen a
> number of times a day. Linux (Heresy again) sits there thinking
> it is the central hub of a multitasking universe; these
> delusions of grandeur are all very well, and comforting to an op
> system, but I wonder what I could trim out of a closedown
> sequence something like the following, which is packed with
> pauses.
> Going down for reboot NOW !!!
> Sending all processes the TERM signal
> Sending all processes the KILL signal
> Shitting Down (each daemon is individually closed off, most of
> which are quite idle anyhow; somewhere between 6 and 12 of these
> on the average system I suppose)
That's the key to what you want - you should go through your daemons
and make sure ONLY the ones you actually need are started up in the
first place, as the shutdown scripts generally don't try to shut down
daemons that aren't running.
Try the following questionnaire for hints:
1. Do you use your system as a web server? If not, you don't need
to start up apache or httpd or anything like that.
2. Do you use your system to distribute usenet news? If not, you
don't need innd or any of its relations.
3. Do you use your system as a network routing manager? If not,
you don't need routed or the like.
4. Do you really need rusersd or rwhod running?
5. Does your system export NFS mounts? If not, you probably don't
need the NFS mount server daemons.
Basically, go through your daemons and ask yourself which you really
need, then kill the rest.
> Sending all processes the TERM signal again
> Sending all processes the KILL signal again
> Then it runs a script /init.d/halt.local
> Unmounts all drives and /proc
> THEN it actually shuts down.
> I know the drives have to be dismounted. How much of the rest is
> really necessary?
The pause between sending the TERM signal and sending the KILL signal
IS necessary - but, looking at the above, your scripts do that twice
for some reason. It only needs to be done once.
> When I screw up and crash the thing, the only thing to suffer is
> drive integrity, and fsck wags its finger at me again. No
> program complains at all.
>From experience, if you lose the pause between TERM and KILL, you will
OFTEN get file corruption even if the drives are unmounted properly.
In fact, the default pause of 5 seconds is sometimes not long enough,
although I've never had problems once I've upped it to 7 seconds.
> The waiting states are surely unnecessary - it doesn't have to
> shut down a remote station on Mars, just itself.
Most of them are there because of the fact that Linux is a true
multitasking system. Whether they're all needed, I don't know, but I
do know that some of them are necessary.
Best wishes from Riley.
+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html