Hi Daniel,
I was thinking about your question and at first I was sure that the man
page was right, the only thing is that you didn't think about how is the
better way to calculate the current load. If you think about it, when
you get a high load on your system the first sign of it will be in the 1
minute average, the others two averages will take some time to increase
showing this high load.
But later I thinked about it, when you say "current load", you mean the
instantaneous load (in a academic way), and that's not what cron is
looking here. I know it's the best we can get for current load but it's
really the 1 minute average load, so maybe it would be better to change
the manpage to something like "If the 1 minute average load is greater...".
Sorry my english too, since i'm not native also, hope you all can
understand my point,
Regards,
Vinicius
Daniel Ouellet escreveu:
Hi,
I couldn't find witch of the three possible value the -l option of the
cron refer to in the man page and look at the code in
/src/usr.sbin/cron/atrun.c that use the getloadavg(&la, 1) to get that
value, the first of 3 if I am not mistaken. I had to look at the man
page for getloadavg to know that as well.
So, am I correct to think that the load average in cronjob ONLY use
the 1 minute average, always?
It 1 minute average is always assume by default every time load
average is used system wide?
May be if I may suggest to to have the man page changed from
-l load_avg
If the current load average is greater....
to
-l load_avg
If the current (1 minute) load average is greater....
That's fine if that's just me that didn't get it. I just thought that
it would be nice not to have to dig to find what I think it the right
answer assuming I find it correctly.?
I can send a diff if that's not stupid to do, but I really had to dig
this one up to know. Google and the man page didn't provide the answer
to me right away anyway, but the code did. (;>
I was hoping to have the possibility to use the 15 minutes average
here in cronjob. Not the end of the world and I can live without it.
But I didn't get the answer from the man page however in term of what
the load average was. I guess most likely it's always assume to be the
case system wide?
Could also be my English as if I was native, may be the "current load
average" always refer to the smallest of the three possible values
that are all current moving load average anyway.
Just a thought.
Thanks
Daniel