New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
You are looking for something to monitor the load in real time?
Yes
Doesent top monitor in real time?
No, top gives averages over 1, 5 and 15 minutes.
Might be, I am not sure. However isn't this the load at the current time: http://i.imgur.com/XmqId.png
And the load average at the top for 1, 5, 15 mins?
uptime calls getloadavg (avg, 3);
However, that function can only maximum return 3 (being 1,5 and 15). You could probably make your own formula to get the CPU usage, IO usage and memory usage and output a result yourself however.
No, that's only CPU usage, which is just one component of the load.
The only potentially useful thing I found. http://stackoverflow.com/questions/8879370/reading-a-shorter-than-1-minute-load-average-on-a-linux-system
The other suggestion was hacking at the kernel.
No easier way at all?
what do you expect from average?
uptime returns the average over 1, 5 and 15 minutes, i guess @jhadley also wants the average over e.g. 10 seconds or so.
What other component of the load?
sorry that comment should be in number 3, below jhadley's "yes" comment.. i forgot hitting post comment button hahaha
@jhadley well maybe /proc/uptime can help you out. also take a look on this site
The load average is a rolling average of the the number of processes in the run queue divided by the number of processing cores. The first column of vmstat's output is the run queue length. So you could use
vmstat|tail -1|cut -d" " -f2
to get a point-in-time snapshot of the run queue, then divide it by the number of cores. If you're consistently getting a number higher than the number of cores you have, that would probably indicate a problem.It is not divided by the number of processing cores/threads, which is why this number should be taken into account whenever looking at a load average.
@NickW is correct. Sorry for the confusion.
how about vpsinfo?