Solved

Calculating Swap space

Posted on 2007-11-29
6
1,889 Views
Last Modified: 2013-12-27
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
bash-2.03#

Thanks,
Ashok
0
Comment
Question by:rdashokraj
  • 3
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
blu earned 75 total points
ID: 20373160
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.
0
 
LVL 3

Assisted Solution

by:thigger_uk
thigger_uk earned 50 total points
ID: 20373187
Looks like you have 7546208kbytes of swap total (=7369Mb) of which you've used 31568kbytes (30.8Mb)


See http://wwwcgi.rdg.ac.uk:8081/cgi-bin/cgiwrap/wsi14/poplog/man/1M/swap (or 'man swap') for further info.
0
 

Author Comment

by:rdashokraj
ID: 20373480
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?

Thanks.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 3

Assisted Solution

by:thigger_uk
thigger_uk earned 50 total points
ID: 20374003
Blocks are 512 bytes
0
 

Author Comment

by:rdashokraj
ID: 20375218
so it should be calculated as 8194640 * 512 / (1024*1024) = 4001.29 MB, which approx 4GB.

Yes it got it. Thanks for the hint.
0
 

Author Closing Comment

by:rdashokraj
ID: 31411643
Thanking you all.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nodeip 9 86
Using gawk to read and manipulate multiple texts from a file 1 67
Image not there 4 57
Linux "time" command output redirection 16 185
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question