Marketplace:

 
Active-Venture.com: Cheap hosting for ecommerce and small business
Buy cheap domain registration with free domain search and forwarding services
Cheap domain registration: Register domain name and domain search services at affordable price

 

   

Swap

next up previous contents index

If running out of swap you can add 257MB more. First have a look at what you have available:

  # free
               total       used       free     shared    buffers     cached
  Mem:        256216     252208       4008     118100      56996      46944
  -/+ buffers/cache:     148268     107948
  Swap:       224900      51268     173632


Next create a file without holes and a multiple of 4K in size:

  # dd if=/dev/zero of=/extra-swap bs=1024 count=262144
  262144+0 records in
  262144+0 records out


Now mark it as a swap file by writing a signature to its beginning which contains some administrative information and is used by the kernel:

  # mkswap /extra-swap 
  Setting up swapspace version 1, size = 268431360 bytes


Now tell the kernel about the new swap file:

  # swapon /extra-swap


Now check it is there!

  # free
               total       used       free     shared    buffers     cached
  Mem:        256216     252448       3768     118100      56996      46944
  -/+ buffers/cache:     148508     107708
  Swap:       487036      51268     435768


To remove the swap file from usage:

  # swapoff /extra-swap


You can add to /etc/fstab:

  /extra-swap        none        swap        sw     0     0


Then on boot when swapon -a is run the new swap will be added to swap space.


Copyright (c) 1995-2004

 

      

Marketplace:
Facts: " UNIX is an operating system, OS/2 is half an operating system, Windows is a shell, and DOS is a boot partition virus.   "  

Sunday 5 February 2012 19:38:59 1328470739