Solved

solar /tmp and swap

Posted on 2002-07-01
2
766 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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 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.:
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.

747 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

10 Experts available now in Live!

Get 1:1 Help Now