LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-17-2008, 05:17 AM   #1
rehan999
Member
 
Registered: Aug 2007
Posts: 134

Rep: Reputation: 15
Unhappy cpu usage


Good Morning

I have a machine with 2X3.2 GHz Dual Core processors which is installed with Redhat enterprise Linux 4.3 vesion.

Can any one please tell me how to check which processor is taking the cpu usage.

I mean to say as it has 2 procerssor , how the cpu usage is divided in between the 2 procerssors.

please tell me the commands which i should use?

Waiting for your reply.

Thanks
 
Old 03-17-2008, 06:59 AM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,191

Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
If you have a GUI, you can use ksysguard. Drop the CPU usage for CPU0 and CPU1 in the window and you see the performance of the two CPU's.

jlinkels
 
Old 03-17-2008, 09:54 AM   #3
tomrosenfeld
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Rep: Reputation: 0
You can use 'top'. You just need to add the last CPU used column and you probably want to show all CPUs.

Just run 'top' and then enter the following keys: "1" "f" "j" <Enter>

See 'man top' for more details.
 
Old 03-17-2008, 02:47 PM   #4
prad77
Member
 
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15
Hello ,

The mpstat command display activities for each available processor, processor 0 being the first one. Global average activities among all processors are also reported.

# mpstat -P ALL.

Also, the CPU utilisation can be checked with 'sar' command.

Fedora Development

Last edited by prad77; 04-17-2008 at 04:08 AM.
 
Old 03-17-2008, 03:12 PM   #5
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
Like prad77 said, SAR will also give you the info you are after.
I use top for real time (what are my CPS's doing right now.
And Sar for historical (how did my CPU's perform over the past day).

Sar by default reports in 10 minute increments. This is a snapshot taken every 10 minutes (not the 10 minute average).

If you type sar | more
it should show your stats for the current day.
You should also have files in /var/log/sa

the sa07 .... are binaries which you can run sar against to get specifc stats (sar has lots of possibilities).

The sar07 is an ascii file generated at the end of each day. sar07 would be the data for march 7th. It is like doing sar -EVERYTHING.
If you man sar you will get the jest of all the options available.

I only keep 10 days worth of this data, but you can keep more if you prefer.

Sustained high CPU average can be bad, but be sure to also keep an eye on load average. It is a better indicator of system load.
CPU avg of 90% for an hour with a load average of >2 is fine.

CPU avg of 90% with a load average of 15 would be a bad thing. This is indicative of 15 processes waiting in line for service by one of the CPU's. Anything less than 2 is usually okay (Rule of thumb).
 
Old 03-18-2008, 01:57 AM   #6
rehan999
Member
 
Registered: Aug 2007
Posts: 134

Original Poster
Rep: Reputation: 15
Thumbs up

Thank you very much for all your replies...

All the above commands helped me a lot...

Thanks and regards
Rehan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU usage meniscus Linux - Newbie 2 12-01-2006 07:47 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 09:43 PM
Getting CPU usage Nerox Programming 5 12-16-2004 03:33 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 05:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 06:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration