Home » Category » Unix & Linux

Unix & Linux: swap reported as different sizes.

200| Thu, 01 May 2008 00:08:00 GMT| your_name| Comments (1)
My swap space is reported as 2 gig by free and 1 gig by df, why the
difference? Which is correct?

[root]# free
total used free shared buffers cached
Mem: 2058504 95868 1962636 0 10768 46344
-/+ buffers/cache: 38756 2019748
Swap: 2048184 0 2048184
[root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md2 5.8G 1.5G 4.0G 28% /
/dev/md0 99M 9.1M 85M 10% /boot
/dev/md3 26G 33M 24G 1% /home
none 1006M 0 1006M 0% /dev/shm
/dev/md1 3.9G 103M 3.6G 3% /var
[root]#

Keywords & Tags: swap, reported, different, sizes, unix, linux

URL: http://programming.itags.org/unix-linux-programming/98119/
 
«« Prev - Next »» 1 helpful answers below.
Le Tue, 07 Jun 2005 18:16:24 +0000, Your name a crit_:

> My swap space is reported as 2 gig by free and 1 gig by df, why the
> difference? Which is correct?


free is correct, you may use free -m to get the data in mega.

> [root]# free
> total used free shared buffers cached
> Mem: 2058504 95868 1962636 0 10768 46344
> -/+ buffers/cache: 38756 2019748
> Swap: 2048184 0 2048184


There, you don't list swap mem alloc but what part of mem was allocated
to the tmpfs (shmfs)

> [root]# df -h
> Filesystem Size Used Avail Use% Mounted on
> none 1006M 0 1006M 0% /dev/shm


It is *not* the swap !

lokiharfagr | Thu, 01 May 2008 00:09:00 GMT |

Unix & Linux Hot Answers

Unix & Linux New questions

Unix & Linux Related Categories