[SunHELP] Re: Swap Space shown Not As Defined
Robert Novak
rnovak at indyramp.com
Sat Jan 19 17:36:23 CST 2002
On Fri, 18 Jan 2002, Dale Ghent displayed bad math in writing::
> On Fri, 18 Jan 2002 ymui at royalsunalliance.ca wrote:
>
> | The system has 4 GB memory and 36 GB hard disk.
> | But 'format' does give the correct information though !
>
> To see the actual size of your swap devices, use the command 'swap -l' and
> look at the 'blocks' column. The number you see is in 512KB blocks, so
> double that number and you will get you swap partition size in MB.
Actually if you double that number, you'll see the number of 256KB blocks.
To find out the number of megabytes, you cut it in half.
For example, from a Solaris 8 machine here (Ultra 1):
% swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s3 32,3 16 1572848 1572848
/dev/dsk/c0t1d0s0 32,8 16 263856 263856
/dev/dsk/c0t1d0s1 32,9 16 263856 263856
Here I have a pair of 128MB slices on the second disk, and a 768MB swap
slice on the first disk. It comes to a total of 1GB of swap space on disk.
% /usr/platform/sun4u/sbin/prtdiag |grep -i mem
Memory size: 512 Megabytes
% df -k /tmp
Filesystem kbytes used avail capacity Mounted on
swap 1349232 16 1349216 1% /tmp
This shows that I have a total of 1.5GB of virtual memory, less whatever
I'm using. The "kbytes" column shows what's left of virtual memory
*before* /tmp usage is taken out, and "avail" shows what's left in /tmp.
In this case, I'm using about 218MB ((1572864-1349232)/1024).
% top |grep Memory
Memory: 512M real, 359M free, 75M swap in use, 1320M swap free
Top shows a similar result... (512-359)+75 = 153+75 = 228MB.
Hope this helps.
--Rob
Robert Novak, Indyramp Consulting * rnovak at indyramp.com * indyramp.com/~rnovak
"And it's been a long December and there's reason to believe
Maybe this year will be better than the last...." -- counting crows
More information about the SunHELP
mailing list