Visit Our UNIX and Linux User Community

Total cpu usage in percent(%)

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Total cpu usage in percent(%)
# 1  
Old 11-26-2010
Total cpu usage in percent(%)

How to determine the total percentage cpu usage of a server having 4 cpu cores(quad core)?
# 2  
Old 11-26-2010
The supplied command sar it probably what you are after. If you are after the value since last boot, just fire it off without parameters. Depending on your installation, you may get hourly or 5 minute stats, but it is averaged at the end. This is usually controlled by the running of sa1, often by the cron table of user account adm.

The columns are usually %usr %sys %wio %idle, so it's up to you to decide if you want 100-%idle or if I/O wait should be considered.

If this answers what you need, great.

If you need average at the moment, you can supply a variety of parameters. You could have
sar 1 1

... which gets the information from the last 1 second. You can stretch this by increasing the first value. You can vary it by increaing the second value to show you more samples, e.g.
sar 3 5

... will report the usage over the last 3 seconds 5 times and then an average.

There are also reports generated by sa2, again usually by the cron table of adm. Read your manaul pages about sa2 for where this file is likely to be in your implementation if you have it enabled.

I hope that this helps.

This User Gave Thanks to rbatte1 For This Post:
# 3  
Old 12-09-2010
Did this deliver what you need, or can I help some more?
This User Gave Thanks to rbatte1 For This Post:
# 4  
Old 12-09-2010
Thanks...a did help me

Previous Thread | Next Thread
Test Your Knowledge in Computers #357
Difficulty: Medium
BusyBox includes an AWK implementation written by Linus Torvalds.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to calculate total and percent off field in file

Trying to use awk to print the lines in file that have either REF or SNV in $3, add a header line, sort by $4 in numerical order. The below code does that already, but where I am stuck is on the last part where the total lines are counted and printed under Total_Targets, under Targets_less_than is... (4 Replies)
Discussion started by: cmccabe
4 Replies

2. UNIX for Dummies Questions & Answers

Memory usage per user,percent usage,sytem time in ksh

Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies

3. 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

4. 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

5. 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

6. 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

7. Shell Programming and Scripting

Finding total Percentage CPU usage

Hi, How can I find total CPU usage in percentage? e.g. if my system has 8 CPUs and I want to list total usage for all of them, is it possible through a command? I have tried some of the commands like top, mpstat, sar. The output of those commands has to be manipulated to derive the percentage... (14 Replies)
Discussion started by: jal_capri
14 Replies

8. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

9. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

10. AIX

Hard disk usage is 100 Percent Busy for any command

hi, AIX 5.3 For any command(say tar command) I am getting 100% busy for my hdisk. But my CPU and Memory is not busy and have more idle also. Please advice for any performance analysing. Thanks in Advance, (3 Replies)
Discussion started by: npcrao
3 Replies

Featured Tech Videos