Query related to swap information shown by top command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Query related to swap information shown by top command
# 1  
Old 07-06-2010
Query related to swap information shown by top command

Hi

I have checked the output of top command in which there is a difference shown between the swap of top command for a process with total swap memory usage of the top command.

Swap usage of process is higher than the total swap memory usage.


Code:
top - 18:28:21 up  7:13,  5 users,  load average: 1.39, 1.26, 0.94
Tasks:  75 total,   2 running,  73 sleeping,   0 stopped,   0 zombie
Cpu(s): 19.3% us,  2.7% sy,  0.0% ni, 77.2% id,  0.3% wa,  0.0% hi,  0.4% si
Mem:   6108356k total,  6084616k used,    23740k free,   153268k buffers
Swap:  6297440k total,     4940k used,  6292500k free,  3561344k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+   UID SWAP DATA COMMAND
18799 root      25   0 3379m 1.4g  23m S 70.2 24.6   9:40.74    0 1.9g 3.3g java
14217 mysql     16   0  890m 681m 5632 S 17.6 11.4  69:32.54  100 208m 883m mysqld

In the above snap shot => Swap: 6297440k total, 4940k used
from this i can conclude that swap memory usage = 4940k

But

For Java process swap = 1.9g

whats the difference between the above two swaps. Can any one please tell me???????

Thanks
Gagan

Last edited by vbe; 07-06-2010 at 10:18 AM..
# 2  
Old 07-06-2010
Depends on the architecture...
What OS?
# 3  
Old 07-06-2010
hey vbe

thanks for you reply. I am using suse 9.0 but could you let me know the difference between swap memory n swap of java process

Gagan
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Swap space related issues, how to recognise the newly attached disk

hi!:) i got a problem....:wall::wall: i got several disks in my diskarray. I attached new disk to allocate it to the swap space. The problem is : how to recognise the newly attached disk? I've one more requirement -:wall:- i want to run dns service on another port number.how can i do... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

2. Shell Programming and Scripting

Swap usage by top and free command doesn't match

Its rather confusing, the output of top command is below: The "swap" field of top is described by the manpage as: "The swapped out portion of a task's total virtual memory image." But the output of free command suggests something else and it does tally with the output of swapon... (3 Replies)
Discussion started by: proactiveaditya
3 Replies

3. UNIX for Dummies Questions & Answers

[Query] Confusion of the Swap when using 'free -m' command

Hi All, I have just installed my first Linux server ( Ubuntu 11.10 ). I am sure I didn't allocate /swap , and double check by 'df -h', yes really no /swap but when I use 'free -m' , returned a "Swap" line as below. total used free shared buffers cached Mem: ... (3 Replies)
Discussion started by: joaming
3 Replies

4. UNIX for Dummies Questions & Answers

A query related to 'ls' command

I am executing the ls command to show the contents of a folder, it shows some number in front of word total as highlighted in blue color below quotes. Can anyone please share that what it is? (2 Replies)
Discussion started by: Zaib
2 Replies

5. Solaris

Programatically read 'size' shown in top?

How can the 'size' of a process, that is shown by 'top', be read programatically? I'm fixing a memory leak in a large (20,000 lines) program. (The main.cpp is itself 7400 lines!). (3 Replies)
Discussion started by: douglaskbell
3 Replies

6. Shell Programming and Scripting

How to get the information about cpu idle from top command?

I am using Ubuntu 9.04. I want to write a shell script to get the information about cpu idle from top command at the real time when i call it, compare cpu idle with 20 (20%), if cpu idle > 20 exit 1, vice versa exit 0. Anybody can help me to resolve it ? Thanks alot. (7 Replies)
Discussion started by: huyquocnguyen
7 Replies

7. Shell Programming and Scripting

query related to if

wht does below statement mean? if wht does dis -d option do?? TIA. (1 Reply)
Discussion started by: sainathdeg
1 Replies

8. Shell Programming and Scripting

Query related to scp command

Hi Friends, I need to execute a scp command to transfer some files from source to target server. Unfortunately the ftp is not working in my case. This scp command needs to be executed via Unix script. I need to know the complete scp command which includes the user-id and password of the... (2 Replies)
Discussion started by: sureshg_sampat
2 Replies

9. UNIX for Dummies Questions & Answers

Swap space used greater than allocated using top

Hi there, When I run top on my machine it says I have 497M swap space in use, and 380M swap space free, but I have only allocated 512M swap space to the machine!!!! Does anyone know how swap used is calculated in the top command? Thanks... (1 Reply)
Discussion started by: chorgan
1 Replies
Login or Register to Ask a Question