LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-15-2003, 08:59 PM   #1
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Rep: Reputation: 30
command to check swapfile?


I need to see the info for my swap to make sure Slack is using the correct partition. In ksim, it shows my swap as 12mb, while I setup that partition as 512mb.

What command would provide the info I need?
 
Old 09-15-2003, 09:07 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Look your fstab file and see which line has /swap. Then compare that with the output of fdisk -l
 
Old 09-15-2003, 09:15 PM   #3
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
fstab:

/dev/hda6 / reiserfs defaults 1 1
/dev/hda7 /home reiserfs defaults 1 2
/dev/hda5 /mnt/fat vfat defaults 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

fdisk -l

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2328 18699628+ 7 HPFS/NTFS
/dev/hda2 2329 4866 20386485 f Win95 Ext'd (LBA)
/dev/hda5 2329 3093 6144831 b Win95 FAT32
/dev/hda6 3094 3519 3421813+ 83 Linux
/dev/hda7 3520 4248 5855661 83 Linux
/dev/hda8 4802 4866 522081 82 Linux swap

Apparently, it's not set up to mnt the swap.
Would adding: /dev/hda8 ??? defaults 1 ? to fstab fix it? What belongs where the ? are.

Thanks!
 
Old 09-15-2003, 09:32 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Add to your fstab
/dev/hda8 swap swap defaults 0 0

Then just to be on the safe side
mkswap /dev/hda8 ( to format)
swapon /dev/hda8 ( to turn it on)

Next time you boot the swap partition will be enabled automatically

I'm not familar with Ksim. I wonder where its getting the info from?

What does the output of the console command free show for swap?
 
Old 09-15-2003, 09:36 PM   #5
Scruff
Member
 
Registered: Oct 2002
Location: Stoughton, MA
Distribution: Gentoo x86_64 & PPC
Posts: 949

Original Poster
Rep: Reputation: 30
#free shows 0 (for swap). I guess on this install I set the swap partition up, but didn't tell Slack to use it during the install process. Oops

Thanks for the help.

Last edited by Scruff; 09-15-2003 at 09:40 PM.
 
Old 09-15-2003, 09:47 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Your welcome.

After you turn swap on look at the free command again and you should see something other than 0 for total swap. With 512mb of RAM you will probably not see much swap if any being used for normal desktop usage.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get my swapfile to work? Mr. New Linux - Newbie 2 01-01-2005 11:37 AM
Mount check command WayuU Linux - Newbie 3 12-08-2004 03:02 PM
swapfile doesn't work kozgun Slackware 7 10-20-2004 12:42 AM
SuSe swapfile Pond247 Linux - Newbie 0 09-19-2003 02:17 PM
Swapfile Shantesh Linux - Software 2 09-11-2003 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:14 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