Loadavg...
Jan-Benedict Glaw
jbglaw at lug-owl.de
Thu Jul 27 01:07:41 CEST 2000
On Wed, Jul 26, 2000 at 10:24:30PM +0000, Thomas Findeisen wrote:
[Wie kommt man zu /proc/loadavg? ]
> - wie errechnet sich der loadavg (also vor allem die Einflüsse der
> Peripherie auf diesen Wert)
> - kann man in ungefähr beispielweise ein loadavg von 4.1 einer 410%en
> Auslastung des Systems gleichstellen (gut hoert sich komisch an, würde
> aber in ungefähr dem gleichkommen... auch wenn xosview mir im Moment 8.9
> anzeigt...hat ich lang nicht mehr... naja, vmware,brenner und corel
> etc., die cpuAnzeige von xosview ist im übrigen auch nicht ganz sauber,
> er springt immer mal kurzzeitig auf 103%,107%,108% und dann wieder
> zurück auf 99%/100%...egal, nur so nebenbei)
So pi mal Daumen hast Du bei load=10 den Zustand, daß Du 10 Programme
in einer Endlosschleife hast (also 10 Programme existieren, die
kontinuierlich Rechenzeit wollen und *nicht* im sleep-Zustand sind,
lies: auf irgendwelchen I/O warten).
> - gibt es eine gute man/howto/url/doku zu diesem Thema
/usr/src/linux/kernel/timer.c:
static inline void calc_load(unsigned long ticks)
{
unsigned long active_tasks; /* fixed-point */
static int count = LOAD_FREQ;
count -= ticks;
if (count < 0) {
count += LOAD_FREQ;
active_tasks = count_active_tasks();
CALC_LOAD(avenrun[0], EXP_1, active_tasks);
CALC_LOAD(avenrun[1], EXP_5, active_tasks);
CALC_LOAD(avenrun[2], EXP_15, active_tasks);
}
}
...also durchschnillich aktive tasks in den letzten 1/5/15 min...
MfG, JBkernel/timer.c:
static inline void calc_load(unsigned long ticks)
{
unsigned long active_tasks; /* fixed-point */
static int count = LOAD_FREQ;
count -= ticks;
if (count < 0) {
count += LOAD_FREQ;
active_tasks = count_active_tasks();
CALC_LOAD(avenrun[0], EXP_1, active_tasks);
CALC_LOAD(avenrun[1], EXP_5, active_tasks);
CALC_LOAD(avenrun[2], EXP_15, active_tasks);
}
}
...also durchschnillich aktive tasks in den letzten 1/5/15 min...
MfG, JBG
--
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
/* Jan-Benedict Glaw <jbglaw at lug-owl.de> -- +49-177-5601720 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
"insmod vi.o and there we go..." (Alexander Viro on linux-kernel)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20000727/3d29f5d5/attachment.sig>
More information about the Linux
mailing list