Solved

solar /tmp and swap

Posted on 2002-07-01
2
769 Views
Last Modified: 2013-12-27
Hi,
   I have a solaris 8 with 2GB RAM and have allocate
2GB of swap swap on disk0:
can someone please explain the following outputs -thanks-

df -k /tmp shows:
Filesystem    kbytes    used   avail capacity Mounted on
swap          3519584     440 3519144     1%    /tmp

swap -s shows:
total: 158776k bytes allocated + 14208k reserved = 172984k used, 3521128k available



Q1.  How come /tmp show as 3519684KB allocated?  I thought the server has 2GB RAM and it has allocated 2GB swap allocated, shouldn't it total allocated is 4GB instead of 3.5GB?

Q2.  on swap -s, what are these two values mean?
158776k bytes allocated + 14208k reserved
where is 158776k coming from and 14208k coming from?


thanks in advance

0
Comment
Question by:siunix
2 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 7122863
Solaris mount /tmp on the swap partition of your disk.
This means in practice, that the swap area shares the same space with the /tmp filesystem. So if /tmp increases, swap decrises and vice versa.
The size of your initial swap partition can only be seen in format. The values printe by df and swap, added and/or subtracted properly, give you the size of your partition and/or swap area.

BTW, this behaviour (/tmp on swap) is the reason why Solaris always ever clears /tmp at boot time :-)
0
 
LVL 15

Expert Comment

by:samri
ID: 7123839
siunix,


ahoffman is right about that:

See a PAQ: http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=solaris&qid=10441857

I had the same confusion before.

cheers
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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.

777 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