Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 02-27-2006, 11:50 PM   #1 (permalink)
 
Newb Techie

Join Date: Feb 2006

Posts: 1

anush

Default code for cpu utilization

hi friends
am doing a project on grid computing based search engine.for this i need to detemine the cpu utilization of the gridlets connected.i have been trying the code for determining the cpu utilization.as per some of the information collected i found that it will be best in vc++.can u please help me out in coding for the cpu utilization.evne if u think it can be better done in some other do let me know.
anush is offline  
Old 02-28-2006, 09:59 AM   #2 (permalink)
 
Ultra Techie

Join Date: Oct 2003

Posts: 544

fitzjj

Default

I dont really know how to pull out the cpu utilization in a windows machine, but then you wouldnt be using one for grid computing would you???!! a UNIX/linux machine would probably be easier since the 'top' command gives the overall useage and gives a breakdown of the useage for each process running. This could be determined by a shell script that manipulates top, or just pull apart the source code for 'top' to get what you want.

I'm guessing you need the cpu utilization to determine which machine to ship the next batch of processing to. In which case do you need a graphical interface to the cpu utilization? probably not - just code it in C or if you need to C++, forget any visual aspect to it unless explicitly required.

Just some other thoughts:
> When allocating processing make sure you use an average cpu utilization measured over a period of time rather than the cpu utilization at an instant since an intantaneous check might see one CPU at 100% and another at 20%, this would result in the processing being shipped to the 20% CPU whose process might run over a longer period than the 100% CPU who processes very short jobs at sparse intervals and could actually be the best option.

> You might also want to take note of network bandwidth. Even if a CPU not being used too efficiently if it has very little network bandwidth available then it may be quicker to ship the job elsewhere.

hopefully some of that is useful even if it doesnt really anwer your question!
fitzjj is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On