Solved

solar /tmp and swap

Posted on 2002-07-01
2
771 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

756 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