LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-14-2012, 03:43 AM   #1
yaojialuo
LQ Newbie
 
Registered: Oct 2012
Posts: 5

Rep: Reputation: Disabled
I still find column SWAP of `top` not zero when I `swapoff`


In the same time, I note this on top of `top`
Swap: 0k total, 0k used, 0k free, 45540k cached
can any one explain it or provide some useful links ? Thanks.
 
Old 10-14-2012, 04:13 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
The cahced column in top isn't part of the swap line (run the free command).

Also have a look here: http://www.linuxhowtos.org/System/Li...Management.htm
 
Old 10-14-2012, 07:41 AM   #3
yaojialuo
LQ Newbie
 
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
yeah , you remind me of the page cache.And how about the SWAP column ,it is not displayed unless it is toggled
* P: SWAP = Swapped size (kb)
I get like this and figures are not zero in SWAP column after swapoff
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP
11961 luo 20 0 282m 21m 2248 S 1.2 4.2 4:08.42 261m
12098 luo 20 0 279m 26m 2348 S 0.0 5.2 2:35.71 253m
25849 luo 20 0 169m 26m 1368 S 0.0 5.4 1:53.30 142m
 
Old 10-14-2012, 08:10 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
The SWAP column in top is useless/redundant information that has very little relationship to the amount of swap space used.

The SWAP column is just the VIRT column minus the RES column. A theory discussion based on the first virtual memory systems in the 1960s and 70s might explain that the swapped size is the virtual size minus the resident size. But memory management in real OSs is more complicated.

Last edited by johnsfine; 10-14-2012 at 08:14 AM.
 
1 members found this post helpful.
Old 10-14-2012, 08:35 AM   #5
yaojialuo
LQ Newbie
 
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Fair enough,it's helpful.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I swap the first and second column in a file Glenn D. Linux - Software 3 02-03-2011 04:07 AM
top virt column value BobGratton Linux - General 1 12-09-2009 06:55 AM
Using the PS and TOP commands to show the PRI column. CoffeeKing!!! Linux - Newbie 1 09-16-2008 02:20 AM
Swap column of text file kushalkoolwal Programming 4 09-05-2008 11:30 AM
column width for netstat,top,etc minm Linux - Newbie 4 12-06-2004 01:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:12 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
Open Source Consulting | Domain Registration