Hack CPU Utilization


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Hack CPU Utilization
# 8  
Old 11-16-2009
On the other hand, if you want to limit CPU usage by a percentage and are using a recent enough Solaris release, you can use per project or per zone CPU capping.

CPU caps (Project rm.cpu-caps) - XWiki

No idea about Linux or netBSD.
# 9  
Old 11-16-2009
CPU UTILIZATION

Hi friends,
Thanks for your replies. By the way mine is a single processor environment and i need this program to do some stress testing. My task should consume CPU as per the specification ie the amount the task should utilize is given as a parameter eg:utilizeCpu(90) should utilize 90% of the CPU. I dont know whether this is feasible. I am a newbie to linux please let me know if there is any way to sort out this problem ????

Thanks,
Chandru.
# 10  
Old 11-16-2009
Why do you need that ?
Is this homework ?
Why don't you answer the questions asked in post #4 ?
In any case, you cannot guarantee a process will use 90% of a CPU or 90% of all CPUs. That depends on CPU availability/ what other processes and the kernel are doing.
# 11  
Old 11-17-2009
MY NEED

Hi,
The function should take the CPU utilization to the desired percentage and stay there. It should be based on the amount of CPU being used by the processes currently running. now if i give 90% cumulatively all the process taken together along with my process should take 90% of the CPU. Need not prempt any processes running at that time. I could not understand some concepts in post #4 what you mean by "Instantaneously a process is running either 100% or 0%" could you be more clear on that? Thanks for your reply.
# 12  
Old 11-17-2009
Why do you need that ? (You only describe what you need, not why)
Is this homework ? (You failed to answer that one)
What concepts in the questions asked in post #4 are you failing to understand ?
You cannot reliably limit the CPU used to 90% without preempting running processes.
By 100% or 0%, I mean CPU load is computed by sampling. At a given time, a CPU is either idle (0%) or not (100%). Intermediary values are only the result of averaging these values.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies

2. UNIX for Advanced & Expert Users

CPU utilization

Hi, any commande on AIX 6.1 that shows me total CPU utilization ? I saw curt in documentation but there should be a trace file before. Thank you. (1 Reply)
Discussion started by: big123456
1 Replies

3. Shell Programming and Scripting

CPU Utilization

I know how to check the CPU utilization and memory space like: vmstat top free What i want ot check on my linux system is... how much CPU are available on my system and do i need to put extra CPU. Also need to check the hardware configuration and the space related to the same ... (3 Replies)
Discussion started by: j_panky
3 Replies

4. AIX

CPU Utilization

Hi All, Can some one help me in finding % CPU Utilization ? From VMSTAT command, How we can find % utilization ? Thanks (3 Replies)
Discussion started by: VBudatha
3 Replies

5. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

6. Shell Programming and Scripting

CPU Utilization

Hi to All, Would you please help me. I would like to know, In Unix How to know CPU utilization for every process. Thanks in Advance. Thanks, Divyang (3 Replies)
Discussion started by: div_Neev
3 Replies

7. Shell Programming and Scripting

CPU Utilization

Dear friends, I am doing a report daily for all most 30 more serves... i need to check out CPU utlization bu (top command, 100 - (ideal value)) and Memory utilization too could some one help me how can i get it directly, if scripts also no problem.. i will very thankful if some one... (3 Replies)
Discussion started by: bullz26
3 Replies

8. UNIX for Dummies Questions & Answers

% CPU utilization

Hi, iam new to AIX and had a basic question. I was asked to give a chart of CPU utilization in percentage for every hour. where can i look for information and which column should i look at? I would be very thankful if somebody could respond. Thanks! karthik (1 Reply)
Discussion started by: karthikosu
1 Replies

9. UNIX for Advanced & Expert Users

CPU Utilization

On user complains about the performance of web application, as a part application support, we use following commands to see the CPU utilization in the UNIX using ‘sar' command. Some times it goes below 20 and even reaches 0. HLW$~> sar -u 10 60 SunOS HLW 5.8 Generic_117350-14 sun4u ... (2 Replies)
Discussion started by: thinakarmani
2 Replies

10. UNIX for Dummies Questions & Answers

CPU Utilization

What command do you use to verify if the CPU utilization. Example. If the CPU is at 98%? Thanks (4 Replies)
Discussion started by: kimosilk
4 Replies
Login or Register to Ask a Question