Skip to Content.
Sympa Menu

baslinux - Re: [BL] Swapon

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: qwms-avib AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Swapon
  • Date: Sun, 25 May 2003 08:15:44 +0000

russ loroville wrote:
>
> I have obtained a formula for an alias swap turn on.

I don't know why you want an alias for this, but let's
look at what it does:

> alias xtra='dd if=/dev/zero bs=1024k count=8 of=/swap;
> mkswap /swap 8192; sync;swapon /swap'

That means whenever you type 'xtra' the following
sequence of commands will be executed:

(1) dd if=/dev/zero bs=1024k count=8 of=/swap

All that does is put zeros (8192k of them) into a file
called swap (in the / directory)

(2) mkswap /swap 8192

That formats the file as a swap file (8mb).

(3) sync

That makes sure the file is fully updated.

(4) swapon /swap

That activates swap (using that file).

> It makes a swap but it is not used:

When you execute 'free', what are the values for
swap total, swap used and swap free? What do you
get when you execute 'dir /swap'?

Cheers,
Steven





Archive powered by MHonArc 2.6.24.

Top of Page