Lars Nooden wrote on Sun, Jan 31, 2010 at 09:04:19PM +0200: > Ingo Schwarze wrote:
>> I'm neither excited about any of the solutions proposed in this >> thread - perhaps except that nick@'s disknice looks attractive, but i >> have no idea whether and how that could be done - nor am i happy >> with the current situation, so i consider tedu@'s question >> unanswered. > A stronger note for non-server systems in the post-install checklist, > afterboot(8), would be one option. I looked at afterboot(8), but can't think of anything to put there. It would be bad advice to disable the daily/weekly/monthly jobs on all non-server systems. I mean, when the machine is switched off, they do no harm. When the machine is occasionally running during the night, they will at least run from time to time, which usually won't do any harm either and might even be useful. The afterboot(8) manual already encourages people to review and customize the root crontab - so if somebody has good reasons to not run daily(8) at 1:30 AM, the advice to change it is already there. Advice to run /bin/sh /etc/daily manually really doesn't fit into the afterboot(8) manual. You would do that from time to time, not after the first boot. afterboot(8) already suggests to review daily(8). And daily(8), in the very first sentence of the DESCRIPTION, tells you it's run by cron(8). So it's already obvious you need to check the crontab(5) for the scheduled time and run it in some other way if you want it but the machine is switched off at that time. If we had a good way to run daily(8) automatically on machines that are switched off when unused, we probably would not only document it, but we could enable it per default. But since nobody came up with a convincing solution so far, and i can't think of any, either, i cannot even document it. Some people might wish to do it at boot or during teatime, but that doesn't fit everyone and hardly needs documenting... > There are some code examples there so a one-liner with 'find' > and 'at' could be suggested for use in rc.local or wherever > else appropriate for desktop or laptop users. Huh? Sorry, no idea what you are talking about. > KK's suggestion of making the weekly script modular so that specific > routines can be rerun individually is useful in a lot of situations. Really? I don't see any use for it and dislike the additional complexity. By default, weekly(8) does two things: * makewhatis(8) If you want only that, well, call makewhatis(8) and be done with it. * locate.updatedb(8) Typically, this takes much longer than makewhatis(8), so even if you just want to update the locate database, skipping the makewhatis(8) call is not that important. Simply run weekly(8) as it is. You proposed using the modularity to postpone expensive maintenance when the system is under load. That is error-prone in both directions. On a machine doing 24/7 number-crunching, you probably want the system maintenance to take precendence over the production jobs - delay maintenance when there is load, and it will never get done. On a notebook carried to a conference, there is no load indicator for: I am in the middle of a talk and need CPU and disk IO for a demo starting 30 seconds from now.