Solved

Calculating Swap space

Posted on 2007-11-29
6
1,893 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

734 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