Solved

Calculating Swap space

Posted on 2007-11-29
6
1,886 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 3

Assisted Solution

by:thigger_uk
thigger_uk earned 50 total points
Comment Utility
Blocks are 512 bytes
0
 

Author Comment

by:rdashokraj
Comment Utility
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
Comment Utility
Thanking you all.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now