LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-21-2007, 10:37 AM   #1
mokku
Member
 
Registered: Feb 2007
Posts: 197

Rep: Reputation: 30
top command question


Hi,

I am using the top command and getting the following value in the bottom. I am trying to see the memory usage for this proces.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
23175 javackk 23 0 1281m 302m 25m S 9.9 2.6 397:35.40 /usr/java/jdk1.5.0_

What is VIRT and RES represening? It means 1281M memory is allocated for this process and using only 302 M? Please correct me.
 
Old 11-21-2007, 10:55 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
"man top" gives a description of all the fields. I don't totally understand linux memory management, so I won't presume to explain it.
 
Old 11-21-2007, 10:59 AM   #3
mokku
Member
 
Registered: Feb 2007
Posts: 197

Original Poster
Rep: Reputation: 30
I read it, but I am not unserstanding it. That's why I want the explanation,.
 
Old 11-21-2007, 12:04 PM   #4
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Here is what man says (I'm not sure what you don't understand):

Code:
VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task.  It includes all code, data and shared libraries plus pages that have been swapped out.  (Note: you can define the STATSIZE=1 environment variable and the VIRT will be calculated from the /proc/#/state VmSize field.)

VIRT = SWAP + RES.

RES -- Resident size
The non-swapped physical memory a task has used.

RES = CODE + DATA.
Resident size is the size of the binary code that is run that is controlling the program PLUS the amount of data that the program is using which is NOT swapped to disk. It is basically the amount of physical memory used.

The virtual image is the total of all the memory used by the task, both physical AND swap.

HTH

Forrest
 
  


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 command Volcano Programming 18 10-15-2008 11:02 PM
Top command mtnpaul Linux - Software 2 04-17-2008 05:25 AM
Top Command swamprat Linux - Software 3 09-23-2007 03:08 AM
command top getting error bluenectar Linux - General 2 08-19-2005 10:37 PM
"top" command memory question chanys Linux - General 4 03-14-2003 09:01 PM


All times are GMT -5. The time now is 08:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration