Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference between "swap free" in top and "available" in swa

Status
Not open for further replies.

630111

MIS
Oct 30, 2001
127
US
I run top with no command line options and I get

Memory: 2048M real, 31M free, 446M swap in use, 558M swap free

I run swap -s and I get

total: 1124232k bytes allocated + 55296k reserved = 1179528k used, 1440296k available

Why the difference in the "in use"/"used" and "free/available" in the swap statistics?

Thanks!
630111
 
Hi,

The answer is the following:
BYTES ALLOCATED-The total amount of swap in 1024-byte blocs that is currently allocated
RESERVED-The total amount of swap space in 1024-byte blocs not currently allocated, but claimed by memory for possible future use
USED=ALLOCATED+RESERVED
AVAILABLE-the swap currently available for future reservation and allocation

Cheers,
Slava SCSA
 
Thanks for your answer, spavlov. However, I am still wondering why in top is says 446mb in use and swap -s says I have 1179528k used. Shouldn't the numbers be the same? Top says I have 558mb swap free and swap -s says I have 1440296k available - shouldn't these be the same as well?

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top