LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 04: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, 05:59 AM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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, 08: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, 01: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 03:08 AM.
 
Old 03-17-2008, 02: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, 12: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



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 06:47 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
Getting CPU usage Nerox Programming 5 12-16-2004 02: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 04:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM

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

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

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
Open Source Consulting | Domain Registration