LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   swap partition made but not working, what do i do? (https://www.linuxquestions.org/questions/slackware-14/swap-partition-made-but-not-working-what-do-i-do-690973/)

SirPetrovich 12-16-2008 09:38 AM

swap partition made but not working, what do i do?
 
kde 3.5.9 on slack 12.1.

i made a swap partition when i setup my system but now i notice in the task manager that only my RAM is being used, and next to it is written "No swap space available". how can i begin about diagnosing this problem? it seems massive :( is the swap space declared incorrectly or something along those lines?

SkinnerC 12-16-2008 09:40 AM

I believe the commands are "makeswap hd<whatever>" then "swapon" But double check with the Gurus.

Hern_28 12-16-2008 09:53 AM

fstab.
 
After you finish the with the previous post might want to add the swap drive to fstab so the system uses it when it boots.

bgeddy 12-16-2008 10:09 AM

Have a look at
Code:

man mkswap
for information on making and activating a swap file. To see swap file useage you may use
Code:

free
from the cli.

mike47 12-16-2008 10:23 AM

swap partition made but not working ..
 
Hello,

You may want to first cat the fstab file and verify there is an entry for swap. ( # cat /etc/fstab )

if there isn't a line for swap, add this line to fstab:

/dev/hdxx none swap

prepare your partition as a swap file

# mkswap /dev/hdxx

(use tabs not spaces above)

: notes
: /dev/hdxx is your swap partition
: none is the mount point
: swap is file system type
: man mkswap for more info on preparing swap file

after doing this reboot your linux system
- or -
type
# swapon -a
to turn on the swap device

Mike

Reasa 01-12-2009 10:32 AM

Hey, very informing, but i have the same problem. I did the commands Mike said but no use. Could it be because i dont have swap support by kernel? /proc/filesystems doesnt show up 'swap'.

Mem: 381892k total, 314304k used, 67588k free, 37012k buffers
Swap: 752424k total, 0k used, 752424k free, 198316k cached

bash-3.1$ free
total used free shared buffers cached
Mem: 381892 315236 66656 0 37364 199028
-/+ buffers/cache: 78844 303048
Swap: 752424 0 752424

GazL 01-12-2009 11:08 AM

You didn't include the '#' when you typed the commands Mike listed did you? If so, do them again without the '#' as what he listed should have worked.

Reasa 01-12-2009 11:23 AM

I did (i mean i did them as root). Also modified fstab file and rebooted.

bgeddy 01-12-2009 11:24 AM

Quote:

Mem: 381892k total, 314304k used, 67588k free, 37012k buffers
Swap: 752424k total, 0k used, 752424k free, 198316k cached
This shows that you do in fact have a swap file of about 734 MB. None of it is being used at the moment as the kernel mustn't need it.

Reasa 01-12-2009 11:25 AM

I loaded xmms gimp kword gqview mplayer opera and still 0k... O.o

GazL 01-12-2009 11:50 AM

Quote:

Originally Posted by Reasa (Post 3405914)
I did (i mean i did them as root). Also modified fstab file and rebooted.

I expected as much, just thought it was worth ruling out as I didn't know anything about your experience level with linux.

It's surprising how efficient linux can be with its memory, unlike vista. Quite how Microsoft get it to use so much memory to do nothing is beyond me.

When I had my 1.5GB Ram system, I never saw linux use any swap at all. This 128MB box on the other hand struggles a little bit. ;)

Reasa 01-12-2009 02:02 PM

Ok now its using a bit:
Swap: 752424k total, 1124k used, 751300k free, 169996k cached

Thanks for info.

bgeddy 01-12-2009 05:52 PM

Quote:

Ok now its using a bit:
Swap: 752424k total, 1124k used, 751300k free, 169996k cached
Don't doubt the kernel. Linux is a superb user of resources.


All times are GMT -5. The time now is 01:21 PM.