A little short on swap space ?

In some cases its handy to quickly be able to adjust your swap.
Here is a little trick i mostly use to do so.

First you can check your physical memory total :

grep MemTotal /proc/meminfo

To check your swap space total :

grep SwapTotal /proc/meminfo

So if you find yourself short in swap space , lets say for an Oracle installation.
You can safely expand your swap space like this

$>su - root
( You have to be root to be able to do this)

$>dd if=/dev/zero of=tmpswap bs=1k count=900000
( 900000 being 900 Megabytes )

$>chmod 600 tempswap

$>mkswap tempswap

$>swapon tempswap

Whenever you want to remove this extra swap space, use these commands :

$>su - root

$>swapoff tempswap

$>rm tempswap

Comments are closed.

Algemeen (9)
GlassFish (49)
Java (58)
Managed Services (10)
Oracle (120)
Private Cloud Hosting (2)
SOA/BPEL/ESB (11)
Software development (92)
Strategie (7)
WSO2 (2)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

  • 071 - 82 000 82
  • Rijndijk 137 | 2394 AG Hazerswoude-Rijndijk
Oracle SOA specialized partner
Java
GlassFish
WSO2
DEMO
i-bridge
Rabobank
Greencat
Jan de Rijk
Reuma Revalidatie Rotterdam
Robeco
VU Medisch Centrum
CHS
LUMC
TomTom
TKP
NCCW
Erasmus MC
UMCG
VIR
ANWB
BVA Auctions
D-Reizen
STEDIN