Re: Get number of CPU

John Hughes <[email protected]> Tue, 26 May 2009 15:09:00 +0200
Newsgroups gmane.linux.cluster.ssic.user
Message-ID <[email protected]>
Sergi Barroso wrote:
> Hi all,
>
> I'm trying to make an script to run into master node, this script will 
> run any number of blender to render scenes into cluster, but I want to 
> know the number of cpu from proc, it's possible?
>
> Thanks
>
>   
 From the shell:

$ cluster -V
Node 1:
	State:  UP
	Previous state:  COMINGUP
	Reason for last transition:  API
	Last transition ID:  2
	Last transition time:  Mon May 25 10:55:32.026568 2009
	First transition ID:  1
	First transition time:  Mon May 25 10:55:09.094054 2009
	Number of CPUs:  2
	Number of CPUs online:  2
Node 3:
	State:  DOWN
	Previous state:  UCLEANUP
	Reason for last transition:  API
	Last transition ID:  10
	Last transition time:  Tue May 26 07:36:14.306205 2009
	First transition ID:  3
	First transition time:  Mon May 25 10:55:52.270490 2009
	Number of CPUs:  0
	Number of CPUs online:  0
Node 4:
	State:  UP
	Previous state:  COMINGUP
	Reason for last transition:  API
	Last transition ID:  14
	Last transition time:  Tue May 26 10:11:45.380674 2009
	First transition ID:  13
	First transition time:  Tue May 26 10:11:37.254557 2009
	Number of CPUs:  2
	Number of CPUs online:  2
[...]

 From a program look at the functions in libcluster, notably 
clusternode_info.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com