Top command usage

Posted on 2011-04-25
Last Modified: 2012-05-11
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

 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

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.

Question by:wasman
    LVL 2

    Expert Comment

    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!!
    LVL 4

    Accepted Solution

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

    Assisted Solution


    Go through the below link for detailed in Top command


    Author Closing Comment

    Thank you for helping me....i will come up with more questions on this in next ticket.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now