Calculating Swap space

Hi Folks,

Can anyone let me know what is the actual swap space (in MB) shown in the below output. I'm bit confused in this.

bash-2.03# swap -l
swapfile                     dev          swaplo     blocks      free
/dev/dsk/c0t0d0s1   118,9             16        8194640  8194640
bash-2.03# swap -s
total: 26128k bytes allocated + 5440k reserved = 31568k used, 7514640k available
bash-2.03# uname -a SunOS meridian 5.8 Generic_117350-41 sun4u sparc SUNW,Ultra-Enterprise

Who is Participating?
Brian UtterbackConnect With a Mentor Principle Software EngineerCommented:
From the swap -l, you have a bit under 4GB of disk swap specified.
From the swap -s, you have 31MB used, and 7GB available of
total swap. Remember, the swap -s includes disk swap AND ram swap.
So, I would guess that this is a system with about 4 GB of memory and
4GB of disk swap.
thigger_ukConnect With a Mentor Commented:
Looks like you have 7546208kbytes of swap total (=7369Mb) of which you've used 31568kbytes (30.8Mb)

See (or 'man swap') for further info.
rdashokrajAuthor Commented:
Hi Blu,
Please tell me using 'swap -l' command how would i calculate the swap space as the values are given in blocks. How much each block denotes?

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

thigger_ukConnect With a Mentor Commented:
Blocks are 512 bytes
rdashokrajAuthor Commented:
so it should be calculated as 8194640 * 512 / (1024*1024) = 4001.29 MB, which approx 4GB.

Yes it got it. Thanks for the hint.
rdashokrajAuthor Commented:
Thanking you all.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.