Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

solar /tmp and swap

Posted on 2002-07-01
2
Medium Priority
?
781 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 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

886 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