LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-06-2005, 02:11 PM   #1
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269

Rep: Reputation: 54
Swap Usage


I installed Slackware 10.0 on an old laptop and have been playing around with it to get to know something about Linux. When I use the free command I get the following:
Code:
erik@*******:~$ free
                total       used       free     shared    buffers     cached
Mem:        126276     123764       2512          0       7632      28664
-/+ buffers/cache:      87468      38808
Swap:            0          0          0
which made me think that Linux didn't see the swap partition I made on installation so I checked my partitions to be sure everything was set correctly and got this:
Code:
Disk /dev/hda: 6495 MB, 6495068160 bytes
255 heads, 63 sectors/track, 789 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         729     5855661   83  Linux
/dev/hda2             730         789      481950   82  Linux swap
so I do have a Linux swap partition setup and yet I still never see it as being used. As this is an older machine I think that the lack of a swap usage might be related to some of the performance problems I see. Any idea as to why it isn't getting used, and how I can fix it??

Thanks in advacne.
 
Old 05-06-2005, 02:18 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the most basic reason it's not being used is that there's nothing in /etc/fstab to tell it to use it. to pick it up instantly, run "swapon /dev/hda2" and if that reports swap in free, just check your fstab entry.
 
Old 05-06-2005, 02:22 PM   #3
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Try running this command as root:
Code:
swapon -v /dev/hda2
and check again the free command.
If that worked then there must be something wrong in your fstab that's not indicating that that partition is swap.
Your fstab line should look like:
Code:
/dev/hda2        swap             swap        defaults         0   0
 
Old 05-06-2005, 02:33 PM   #4
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269

Original Poster
Rep: Reputation: 54
Thanks for the quick replies, that took care of it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory / Swap Usage RoaCh Of DisCor Linux - Newbie 16 05-19-2005 02:45 PM
mem and swap usage increasing daily epoo Linux - General 5 05-01-2005 11:49 PM
RAM/SWAP usage ganja_guru Linux - Software 13 12-29-2004 03:17 AM
memory/swap usage koy Linux - Newbie 2 05-18-2004 11:12 AM
swap file usage exigent Linux - General 5 11-25-2002 02:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration