[PATCH] Add load average support to makehistory
Russ Allbery
rra at stanford.edu
Fri Jun 19 19:05:49 UTC 2009
Julien ÉLIE <julien at trigofacile.com> writes:
> Hi Ondřej,
>
>> as reported/proposed in RedHat bugzilla
>> https://bugzilla.redhat.com/show_bug.cgi?id=276061 by Jonathan Kamens,
>> it would be good to add support for load average into makehistory.
>>
>> Consider using that patch (I just sorted the options to match alphabet)
>> or adding/depending on some inn.conf variable which would allow reducing
>> of loadaverage for makehistory.
I'm not sure that I understand why this is a reasonable solution.
makehistory is a maintenance program that isn't ever run automatically.
If the administrator, while running it manually, would like it not to
dominate the system, isn't that what the nice command is for?
> + case 'L':
> + LoadAverage = atoi(optarg);
> + break;
>
> + if (LoadAverage) {
> + double loadavg;
> + while (getloadavg(&loadavg, 1) > 0 && (int)loadavg >= LoadAverage) {
> + sleep(1);
> + }
> + }
This seems like sort of a hacky way to approximate the same thing that
nice would do in a much better and finer-grained way. But maybe I'm
missing something?
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers
mailing list