Solved

solar /tmp and swap

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses

626 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