It looks like you're new here. If you want to get involved, click one of these buttons!
All of the Linux utilities I know of work with 1, 5 and 15 minute load averages, but I am working on something that could benefit from having a shorter load average, or even reading the load number rather than an average. Is this possible?
Comments
You are looking for something to monitor the load in real time?
LiquidHost - https://liquid-solutions.biz
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksYes
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksDoesent top monitor in real time?
LiquidHost - https://liquid-solutions.biz
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksNo, top gives averages over 1, 5 and 15 minutes.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksMight 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?
LiquidHost - https://liquid-solutions.biz
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksuptime 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.
Daniel.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksNo, that's only CPU usage, which is just one component of the load.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksThe 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.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksNo easier way at all?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankswhat do you expect from average?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksuptime returns the average over 1, 5 and 15 minutes, i guess @jhadley also wants the average over e.g. 10 seconds or so.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWhat other component of the load? :o
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankssorry 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
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksThe 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" " -f2to 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.Unless otherwise specified, opinions posted are my own, not those of any person or company I work for
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksIt 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.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@NickW is correct. Sorry for the confusion.
Unless otherwise specified, opinions posted are my own, not those of any person or company I work for
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankshow about vpsinfo?
Streaming lagu sunda powered by RamNode
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks