Re: Does 'top' work any more on Solaris ???

From: David Kirkby (nospam_at_nowhere.com)
Date: 11/11/04


Date: Thu, 11 Nov 2004 13:05:52 +0000

Dave Uhring wrote:
> On Wed, 10 Nov 2004 22:27:44 +0000, David Kirkby wrote:
>
>
>>Memory: 4096M real, 2651M free, 517M swap in use, 3627M swap free
>>
>>I don't know if its true that 517MB of swap is in use. It would seem odd
>>when there is plenty of RAM in the system, but perhaps it is true.
>
>
> How much junk do you have in /tmp?
>

sparrow /export/home/drkirkby % du -ks /tmp
259784 /tmp

Em, nearly 260MB, which is quite a bit, but not anywhere near the amount
of 'swap in use', which top now shows as 540MB.

df, incdently shows this as 253 MB.

sparrow /export/home/drkirkby % df -h | egrep 'File|swap'
Filesystem size used avail capacity Mounted on
swap 3.5G 40K 3.5G 1% /var/run
swap 3.8G 253M 3.5G 7% /tmp

After I removed some of the junk in /tmp, making the usage only 400kB,
'top' still shows 287MB of swap in use, which is still quite a bit, but
nowhere near the 517 MB it was showing before.

swap -l now (after removing a lot from /tmp)
sparrow /tmp % swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s3 32,3 16 2101328 2101328

so it would seem I have one swap partion of about 1GB. Yet 'top' now says:

Memory: 4096M real, 3313M free, 287M swap in use, 3857M swap free

so I can't see how I have 3857M free, if I only hae one swap partion of
around 1GB.

I must admit, I don't fully understand /tmp. I thought it was a fast
file system that worked in memory. Yet I know processes get swapped out
to disk when there is insufficient RAM. So quite the connection between
swap (being disk) and me thinking /tmo is RAM, I don't know. How I can
have 3857MB Clearly I am a bit confused on this matter, and would
appreciate some explanation.