Web Hosting Talk







View Full Version : Calculating Serverload


HostSentry
05-14-2007, 10:35 PM
I am curious about how the WHM server load calculations are made, and if they can be retrieved through a server side script.

I have made scripts in the past that have calculated CPU usage of individual accounts, Memory usage ect. So I assume server load is calculated using possibly the average of running processes over a given period of time (or something along those lines).

I would like to be retrieve server load information to give to my clients, so I am interested to know if anyone knows how the server load is calculated. I also assume memory and cpu usage play a part in determining it.

If anyone has any information regarding how server load is calculated I would love to know about it.

Thank you in advance to anyone who has any information.

It would be very nice to offer my clients statistics about the server they are signing up for.

http://forums.cpanel.net/images/misc/progress.gif

scribby
05-14-2007, 11:14 PM
I believe that CPanel gets its load stats from /proc/avgload

HostSentry
05-14-2007, 11:19 PM
I believe that CPanel gets its load stats from /proc/avgload

That seems to be absolutely true. To edit that it is /proc/loadavg , not /proc/avgload

Does anyone know how those numbers are actually calculated?

Thanks scribby :agree:

HostSentry
05-15-2007, 12:26 AM
Well once googling loadvg I found my answer.

http://www.hawaga.org.uk/ben/tech/loadavg.html

SagoMax
05-16-2007, 03:23 PM
For a more complete answer, please see Wikipedia article for "load (computing)"

http :// en dot wikipedia dot org/wiki/Load_%28computing%29