Subject: Re: What's in my swap
To: Joseph A. Dacuma <jadacuma@ched.gov.ph>
From: Geert Hendrickx <ghen@NetBSD.org>
List: current-users
Date: 08/02/2006 09:51:25
On Wed, Aug 02, 2006 at 11:23:39AM +0800, Joseph A. Dacuma wrote:
> > Try this
> > awk '( $3 == "swap" ) { print $1}' /etc/fstab|xargs cat |strings|more
> >
> >
> > -Ober
> >
> >
> Hi Ober!
> 
> I temporarily bumped my RAM four times more than the original size on my
> machine. Ran top saying the system is not swapping yet.
> 
> Memory: 113M Act, 964K Wired, 41M Exec, 18M File, 1096M Free
> Swap: 1500M Total, 1500M Free
> 
> I ran the command above as root and saw a long output. Does this mean
> that the space dedicated for swap is not flushed out after reboot and
> what was swapped before remains there until it is overwritten by another
> instance of "swapping/paging"?

Indeed.  What you see is what has ever been in swap but has not been
overwritten yet.  

What frightened me is that this command worked for my regular non-root user
as well, because it's in the "operator" group.  I have all console users in
the operator group so they can use the shutdown(8) command, mount floppy
and CD-ROM devices, ..., but this now seems to be a security issue.  

	Geert