Ciaran Johnston's [cj at nologic.org] 14 lines of wisdom included:
> If I type uptime, I get the load average printed onscreen, for 1, 5 and 15
> minutes. I can only assume that this is measured by taking a load
> "snapshot" at periodic intervals, and taking the average when uptime is
> called. If this is the case, is there any way of finding out the interval
> between snapshots? Or am I on the wrong track altogether?
The load average is calculated through the process scheduler.
The kernel uses "jiffies" or "ticks" as it's internal clock (roughly
1/100th of a second, but that's not accurate and can vary).
Basically a timer TIMER_BH interrupt is set, which goes off every N
jiffies or so and one of the side effects (wayyy down the line) is
to calculate the load. What the value of N is, I'm not sure and
can't find offhand, and would doubt if it's even constant.
This is from 2.2 kernels, 2.4 may have a completely different
Is there any particular reason you want the interval between load
RFC Networks tel: 01 8832063
www.rfc-networks.ie fax: 01 8832041
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!