From LedHed's Wiki
Jump to: navigation, search
Line 1: Line 1:
 
== Disable Swap ==
 
== Disable Swap ==
See [[Linux_General#Disable.2FEnable_Swap]]
+
See: [[Linux_General#Disable.2FEnable_Swap|Linux General: Disable/Enable Swap]]
 +
 
 +
Doing the above will only turn off Swap until you reboot.
 +
To make this permanent do the following:
 +
 
 +
''NOTE: Make a back up of all files before changing them!!!''
 +
 
 +
1) Disable the swap partition in /etc/fstab
 +
cp /etc/fstab /etc/fstab.bak
 +
#/dev/harddisk2      swap  swap  defaults 0 0
 +
 
 +
2) Disable the 'swapon' command in /etc/rc.d/rc.sysinit
 +
cp /etc/rc.d/rc.sysinit /etc/rc.d/rc.sysinit.bak
 +
# echo “Turning on swap”
 +
# /sbin/swapon –a
 +
 
 +
After doing this the 'Advances Status Page' will be broken, to fix it do this:
 +
cp /home/httpd/cgi-bin/advstatus.cgi /home/httpd/cgi-bin/advstatus.cgi.bak
 +
Replace this line:
 +
{$mperc = int((($mused/$mtotal)*100));}
 +
 
 +
With these lines:
 +
if ($mtotal > 0 )
 +
    {$mperc = int((($mused/$mtotal)*100));}
 +
else
 +
    {$mperc = 0;}
 +
 
  
 
[[Category:Smoothwall]]
 
[[Category:Smoothwall]]

Revision as of 22:02, 19 May 2008

Disable Swap

See: Linux General: Disable/Enable Swap

Doing the above will only turn off Swap until you reboot. To make this permanent do the following:

NOTE: Make a back up of all files before changing them!!!

1) Disable the swap partition in /etc/fstab

cp /etc/fstab /etc/fstab.bak
#/dev/harddisk2      swap   swap   defaults 0 0

2) Disable the 'swapon' command in /etc/rc.d/rc.sysinit

cp /etc/rc.d/rc.sysinit /etc/rc.d/rc.sysinit.bak
# echo “Turning on swap”
# /sbin/swapon –a

After doing this the 'Advances Status Page' will be broken, to fix it do this:

cp /home/httpd/cgi-bin/advstatus.cgi /home/httpd/cgi-bin/advstatus.cgi.bak

Replace this line:

{$mperc = int((($mused/$mtotal)*100));}

With these lines:

if ($mtotal > 0 )
    {$mperc = int((($mused/$mtotal)*100));}
else
    {$mperc = 0;}