[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 481
  • Last Modified:

Top command usage

top - 14:24:12 up 531 days,  2:32,  2 users,  load average: 4.39, 3.36, 3.32
Tasks: 213 total,   1 running, 212 sleeping,   0 stopped,   0 zombie
Cpu(s):  8.7% us,  0.7% sy,  0.0% ni, 90.5% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:  74881380k total, 16380344k used, 58501036k free,  2356972k buffers
Swap: 35350980k total,        0k used, 35350980k free, 11343208k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4731 webadmin    16   0 2302m 1.9g 6016 S 150.9  2.6   4496:17 java
 4485 admin1   16   0 11416 1776 1128 S  0.3  0.0   0:00.63 sshd
 7902 admin1   16   0  2696 1056  748 R  0.3  0.0   0:06.86 top
    1 webadmin      16   0  1688  552  472 S  0.0  0.0   0:09.59 init

Below questions are for the Java process shown in above top command output

1)
In the above top command output, it shows cpu usage in percentage which is greater then 100, i want to see it in relative to below 100 percentage, like i see in solaris server, but in linux it shows in more then 100 percentage which hard to image correctly.


2) If you see RES value for java process ---> 1.9gig, i given to my java heap only 1280mb  max heap, but in RES it shows 1.9gig ? How to get actuall memory used by the java process.

0
wasman
Asked:
wasman
2 Solutions
 
advegaCommented:
why don't you use pmap instead top-

Usage: pmap PID
Based on your top output, it shoulg go like this:

# pmap 4731

Hope this helps!!
0
 
underskyCommented:
top shows processes into each core, one core = 100%

so if you have 2 core system, max cpu usage is 200%

if you want see each CPU usage, press 1 / or I
0
 
mohansahuCommented:
Hi,

Go through the below link for detailed in Top command

http://www.thegeekstuff.com/2010/01/15-practical-unix-linux-top-command-examples/

MS
0
 
wasmanAuthor Commented:
Thank you for helping me....i will come up with more questions on this in next ticket.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now