Posts: 90
Threads: 16
Joined: Nov 2009
Reputation:
0
Hi.I have 2 CPU's with 4 cores each and Centos x64.When all my servers are full , using command "htop" i get 60-80% CPU usage, but on average it shows ~ 30 %.
How can i verify the real CPU usage on linux and maybie some tool to measure CPU temperature and fan speed ?
PS:It's not a desktop edition of Centos ...
Posts: 504
Threads: 9
Joined: Oct 2009
Reputation:
3
cpu usage is pretty much buggy.
Mostly I rely on the load: With 4 cores and a load above 4 you probably getting trouble running gameservers
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
12-16-2010, 07:06 PM
(This post was last modified: 12-16-2010, 07:08 PM by BehaartesEtwas.)
there is no reliable way to measure the cpu load. srcds switches more often (or at least as often) between running and sleeping states as the cpu load is measured. that cannot work (and changing this would lead to a significant overhead). maybe you should look at the situation from the other end. what do you want to achieve? the cpu usage itself is usually nothing that really concerns :-) if you want just some hint you can always look at the load average (uptime command) which is defined as the average number of processes in "runnable" state (meaning either running or waiting until a cpu is free). if that gets larger than your numer of cpu/cores it clearly indicates an overload situation. but it still does not mean everything is fine if you are below it (for short periods of time you can still have an overload situation producing lags for a fraction of a second).
EDIT: @Terror: its not a bug, its a feature :-D no seriously, I cannot think of a reliable way to measure the cpu load in a way that it really helps us.
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
I would say, when you gameservers start lagging, you have too many of them ;-)
ps: measuring cpu temperatures etc. is a totally different thing. it depends on your mainboard of course. one possible way is lm_sensors, which can read out many "environmental" values. I am using munin to collect all the data and display it in nice graphs on a web page. munin can use lm_sensors to also collect cpu temperatures etc.