-->

Thursday, March 21, 2013

calculate load of individual machines on a cluster


Use :

$ uptime


Output:

20:57:50 up 196 days,  1:36,  4 users,  load average: 4.00, 4.00, 4.42


The load averages reported are system load averages for the last 1, 5 and 15 minutes respectively.

Note that a  load average of 1 means there's enough work being done by the system to keep 1 CPU busy 100% of the time. (So either 1 process taking 100% or 2 processes taking each 50% etc.) A load average of 2 would likewise be enough to consume 100% of 2 CPU's. Etc.

Combine it with pssh to simultaneously check the load on multiple machines :

$ pssh -h ~/bin/spiders.pssh -o ./cluster.log "uptime"

No comments:

Post a Comment