Solved

Calculating Swap space

Posted on 2007-11-29
6
1,894 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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 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.:
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.

615 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