Sponsored Content
Top Forums Shell Programming and Scripting Finding total Percentage CPU usage Post 302417639 by ygemici on Friday 30th of April 2010 07:31:40 AM
Old 04-30-2010
MySQL

Top command output..

Code:
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
           total    8.9%    0.0%    4.3%   0.1%     0.8%   19.3%   66.3%
           cpu00    6.6%    0.0%    4.4%   0.5%     2.4%   20.8%   65.0%
           cpu01    4.0%    0.0%    2.3%   0.0%     0.6%   30.4%   62.4%
           cpu02   13.4%    0.0%    0.7%   0.0%     0.0%   16.7%   68.9%
           cpu03    2.1%    0.0%    1.2%   0.0%     0.0%   17.1%   79.2%
           cpu04    6.4%    0.0%    6.1%   0.0%     0.3%   19.3%   67.6%
           cpu05   16.5%    0.0%    4.5%   0.0%     0.0%   32.8%   45.9%
           cpu06    7.1%    0.0%    6.3%   0.0%     0.6%   19.9%   65.9%
           cpu07   12.7%    0.0%   12.0%   0.0%     0.2%   24.7%   50.1%
           cpu08    9.8%    0.0%    9.5%   1.0%     1.1%   13.1%   65.1%
           cpu09    8.8%    0.0%    5.7%   0.5%     6.4%   17.3%   61.0%
           cpu10   16.9%    0.0%    3.0%   0.0%     0.1%    7.1%   72.6%
           cpu11    7.7%    0.0%    3.6%   0.0%     0.2%   15.0%   73.2%
           cpu12    4.4%    0.0%    2.8%   0.0%     0.1%   15.9%   76.6%
           cpu13    9.0%    0.0%    3.0%   0.0%     0.0%   47.5%   40.2%
           cpu14    3.5%    0.0%    0.7%   0.0%     0.3%    0.8%   94.4%
           cpu15   83.5%    0.0%   16.4%   0.0%     0.0%    0.0%    0.0%



And when press the C .. (Collapsed SMP CPU stats)
the output

Code:
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
           total   14.2%    0.0%    5.3%   0.1%     0.9%   20.6%   58.7%

Dou you want like this?

Last edited by ygemici; 04-30-2010 at 08:33 AM.. Reason: editing for Redhat 3
 

10 More Discussions You Might Find Interesting

1. HP-UX

How to determine cpu&memory percentage usage per user

Using HP-UX v11 Need to monitor cpu and memory usage, total for system and separately for each user in command-line mode. Found out next ways to monitor total cpu usage under hp-ux: 1) vmstat, also shows free memory 2) sar -M ps -eo user,pcpu - does not work, means 'user-defined format'... (4 Replies)
Discussion started by: hp-ux-user
4 Replies

2. UNIX for Advanced & Expert Users

Finding CPU usage by a Unix Process

Hi, I am designing a load balancer for an application. I am trying to find out the CPU usage by a specifc Unix process (PID is known). I guess I can use ps command to find that. can somebody help me in finding what exact command I should use to find? It is on AIX 5.3. Regards Asutosh (2 Replies)
Discussion started by: asutoshch
2 Replies

3. Shell Programming and Scripting

Help with bash script - Need to get CPU usage as a percentage

I'm writing a bash script to log some selections from a sensors output (core temp, mb temp, etc.) and I would also like to have the current cpu usage as a percentage. I have no idea how to go about getting it in a form that a bash script can use. For example, I would simply look in the output of... (3 Replies)
Discussion started by: graysky
3 Replies

4. UNIX for Dummies Questions & Answers

HOWTO - Total memory and CPU usage ... without top?

Hi all, Is it possible to get total memory usage and free memory usage without top? By Googling I found for total memory usage, use vmstat, for CPU, use mpstat, for disk I/O use iostat, is this correct? Will using sar gives the same result as ALL of these three (3) commands? What about if I... (2 Replies)
Discussion started by: newbie_01
2 Replies

5. UNIX for Dummies Questions & Answers

Total cpu usage in percent(%)

How to determine the total percentage cpu usage of a server having 4 cpu cores(quad core)? (3 Replies)
Discussion started by: proactiveaditya
3 Replies

6. UNIX for Dummies Questions & Answers

Is total CPU usage for sar %user+%system+%iowait?

Hi all Can anyone advise/confirm whether total CPU usage when running sar is %user+%system+%iowait or is it %user+%system only? I want to confirm whether I am having a CPU-bound problem or not. This is a single-CPU VMware machine. $ sar 5 20 Linux 2.6.18-238.5.1.el5... (7 Replies)
Discussion started by: newbie_01
7 Replies

7. Linux

How to calculate total CPU usage from SAR report?

Hi, I want to calculate the total cpu usage from the sar report. Say for example, Linux 2.6.24-21-generic (blade10) 09/10/2012 04:54:36 PM CPU %user %nice %system %iowait %steal %idle 04:54:37 PM all 0.00 0.00 0.00 0.00 ... (1 Reply)
Discussion started by: rohitmd
1 Replies

8. UNIX for Advanced & Expert Users

Finding out total memory usage

Hi, I have a server box with 16GB ram in it, within the server box there are 3 VMs running with a total allocation of 9GB. if I add up all the numbers under memory info using vmstat I get 15.8GB so I can say it adds up to 16Gb... Is there a way to see from the command line how much memory... (2 Replies)
Discussion started by: speedhunt3r
2 Replies

9. Solaris

Total CPU usage on a server

hi, i am using solaris server. I want to find the total CPU usage on a server. Top command will give that result, but here that command is not working. So anyone can help me to find the total CPU usage. (2 Replies)
Discussion started by: Arasu123
2 Replies

10. Solaris

Capture PRSTAT based on CPU usage percentage

Hi, Recently i have write a simple script to capture CPU high usage based on prstat but i found out that it did capture correctly. I need to capture the rows that contains CPU usage more than 3%. Below line which i thought will capture CPU usage based CPU column in prstat(9th parameter) which is... (3 Replies)
Discussion started by: tharmendran
3 Replies
All times are GMT -4. The time now is 07:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy