LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-25-2008, 09:08 AM   #1
pudhiyavan
Member
 
Registered: Oct 2003
Location: Linux world
Distribution: redhat,mandy,centos,debian,ubuntu
Posts: 209

Rep: Reputation: 30
Question top command shows 249% usage


hi when i run top command it shows me



PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12690 root 19 0 526m 125m 19m S 227 6.2 8677:24 java
10224 root 18 0 957m 209m 19m S 167 10.5 6825:37 java
13240 root 24 0 391m 92m 16m S 0 4.6 22:25.25 java


why is it showing 227 / 167, how to fine tune it?
 
Old 02-25-2008, 10:36 AM   #2
timnp
Member
 
Registered: Feb 2008
Location: London
Distribution: FC8, FC9, Centos 4, Centos 5, Knoppix
Posts: 52

Rep: Reputation: 16
I think if you have more than one processor or core and the process is multithreaded then it can go over 100%.

Ie, if you have a quad-core machine and your process is consuming the entirity of two cores then it will show as using 200% of your CPU. If the process is using all of all the cores then it will show as 400%.

As to how to make it use less, it really depends on your app, what is it?
 
Old 02-25-2008, 12:32 PM   #3
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
top

Hiya,

When you run top, press '1'...Check on top, you'll see more info on # of cpu's and their utilization.

Hope this helps,
 
Old 02-26-2008, 01:51 AM   #4
pudhiyavan
Member
 
Registered: Oct 2003
Location: Linux world
Distribution: redhat,mandy,centos,debian,ubuntu
Posts: 209

Original Poster
Rep: Reputation: 30
Great, thanx for the information you both have provided.

its a dual core machine, when i press 1 it shows me as follows,

Cpu0 : 57.5% us, 40.9% sy, 0.0% ni, 0.7% id, 0.0% wa, 0.0% hi, 1.0% si
Cpu1 : 57.0% us, 41.7% sy, 0.0% ni, 0.7% id, 0.0% wa, 0.0% hi, 0.7% si
Cpu2 : 59.5% us, 39.1% sy, 0.0% ni, 0.7% id, 0.0% wa, 0.0% hi, 0.7% si
Cpu3 : 55.9% us, 42.8% sy, 0.0% ni, 0.7% id, 0.0% wa, 0.0% hi, 0.7% si


how to tweak around with the java application utilises more than 57%, i was expecting around 30 to 40 % of usage.
 
Old 02-26-2008, 03:35 AM   #5
timnp
Member
 
Registered: Feb 2008
Location: London
Distribution: FC8, FC9, Centos 4, Centos 5, Knoppix
Posts: 52

Rep: Reputation: 16
What is the java application in question? Is it something you have written or is it something someone else has written?

If it isn't time sensitive and it is interfering with your other applications then you could always set its nice level so that it runs at a lower priority.

That said, unless you actually need your CPUs for something else you might as well leave it. Its probably not the best outlook but I dont like to see my fast CPUs being unused, the nearer they are to full utilisation then I know i'm getting my monies worth
 
Old 02-26-2008, 04:53 AM   #6
pudhiyavan
Member
 
Registered: Oct 2003
Location: Linux world
Distribution: redhat,mandy,centos,debian,ubuntu
Posts: 209

Original Poster
Rep: Reputation: 30
java application has been written by someone else, and i am using it with 1.5.03 version,how do i use this nice in linux as well as solaris?
 
Old 02-26-2008, 07:04 AM   #7
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
nice

From the man page:

"If no arguments are given, `nice' prints the current scheduling
priority, which it inherited. Otherwise, `nice' runs the given COMMAND
with its scheduling priority adjusted. If no ADJUSTMENT is given, the
priority of the command is incremented by 10. You must have
appropriate privileges to specify a negative adjustment. The priority
can be adjusted by `nice' over the range of -20 (the highest priority)
to 19 (the lowest)."

An example would be:

$ nice -n 10 nice
10

This would lower the priority of the 'nice' command ;-).

Hope this helps.
 
Old 02-27-2008, 12:29 AM   #8
pudhiyavan
Member
 
Registered: Oct 2003
Location: Linux world
Distribution: redhat,mandy,centos,debian,ubuntu
Posts: 209

Original Poster
Rep: Reputation: 30
thank you, its really valuable post..
 
  


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
top shows 150% cpu load crashmeister Linux - General 3 02-02-2008 08:18 AM
running top shows 2 users gibson79 Slackware 8 03-08-2007 09:19 AM
gnome system monitor shows different resource usage than top BCarey Linux - Software 0 02-13-2007 10:14 PM
Other than top command which cmd is used to find the cpu usage and disk space sathish80 Linux - Newbie 2 11-15-2006 12:43 AM
Firefox gets stuck... top shows 98-99% memory usage amitsharma_26 Linux - General 26 12-28-2005 03:01 PM


All times are GMT -5. The time now is 04:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration