HI,
I also had to monitor those values so I wrote a little script... (code is here below)
The values are displayed in the message display of the control script and are updated every second.
On the first line you read:
The first three fields are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
They are the same as the load average numbers given by nion display. The fourth field consists of two numbers separated by a slash (/).
The first of these is the number of currently executing kernel scheduling entities (processes, threads); this will be less than or equal to the number of CPUs.
The value after the slash is the number of kernel scheduling entities that currently exist on the system.
The fifth field is the PID of the process that was most recently created on the system.
On the second lilne you read the CPU usage in percent average over the last second. This one varies from the one displayed on the nion, probably because they are evaluated
differently.
--
Raphaël.
try:
cpu = open('/proc/stat', 'r').readline().strip()
while True:
loadavg = open('/proc/loadavg', 'r').readline().strip()
event.wait(1000)
cpu1 = open('/proc/stat', 'r').readline().strip()
c = cpu.split()
c1 = cpu1.split()
u = float(c1[1]) - float(c[1])
s = float(c1[3]) - float(c[3])
i = float(c1[4]) - float(c[4])
p = ((u + s) / (u + s + i)) * 100.0
message.string_set("%s\n%02.2f%%" % (loadavg, p))
cpu = cpu1
except:
message.string_set("Does not work in emulate mode!")
--
Raphaël Bollen
Ampco Belgium.