LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-13-2005, 07:57 PM   #1
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Rep: Reputation: 30
swap file doesn't work


Since I have upgraded my fc3 machine to fc4 when I work some programs simultaneously every thing get frozen and I have to reset my computer manually. I have a athlon 2000 XP+ with 384 MB ram. Swap file is 777MB but it never works for me. In system monitoring it is always empty even when run huge program.
 
Old 11-13-2005, 08:41 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Are you actually activating it? Have you got it in /etc/fstab
so you get it switched on automagically? And is it actually
a file or have you got a swap-partition (you should)? Where
is it set-up, how has it been set-up?

swapon <filename>


Cheers,
Tink
 
Old 11-13-2005, 08:48 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Simply issue "swapon -s" to see if you have any swap enabled/active.
 
Old 11-14-2005, 08:10 AM   #4
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
/sbin/swapon -s
Filename Type Size Used Priority
/dev/hda3 partition 795208 900 -1

swap file is available in fstab but I don't know why it never works for me. when my CPU usage become very high my computer freezes and every thing gets stopped and I have to reset it
 
Old 11-14-2005, 09:36 AM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Please post the swap partition entry from /etc/fstab.
 
Old 11-14-2005, 12:07 PM   #6
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
LABEL=SWAP-hda3 swap swap defaults 0 0

I am not sure whether the problem is with swap file. Maybe my athlon XP 2000+ is not good enough for linux
 
Old 11-14-2005, 12:55 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Umm, yeah, it's "good enough for Linux." That isn't the problem.

The swapon output indicates that the swap-partition is being used, although it is almost completely empty. I conclude that whatever is causing your system to freeze is not related to swapping.

Does /var/log/messages have anything?
 
Old 11-14-2005, 02:43 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What's the output of free?

In terms of the labeling - my understanding was that
the kind of label you're using is specific to ext2/3, and am
not certain that it will work with swap files. Try something
like this instead:
/dev/hda3 swap swap defaults 0 0


Cheers,
Tink
 
Old 11-14-2005, 04:37 PM   #9
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
in /var/log/messages there is nothing written about this problem
 
Old 11-14-2005, 04:42 PM   #10
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
I changed the fstab to /dev/hda3 swap swap defaults 0 0

I hope it works
 
Old 11-15-2005, 09:10 AM   #11
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
I still have that problem.
Even when I am reading a text and doiing nothing special my computer freezes.

in the system monitor when it freezes CPU usage is 100%
 
Old 11-15-2005, 04:03 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
What does dmesg have to say at the point it attempts to mount the swap ???>
 
Old 11-15-2005, 05:27 PM   #13
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
at the end of the file is written:
Adding 795208k swap on /dev/hda3. Priority:-1 extents:1

But I don't think that anything's wrong with swap
I have doubts about FAN, because CPU temperature is around 80c and system is 44c
 
Old 11-17-2005, 08:00 AM   #14
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
I was working on windows and my computer suddenly stopped working. that means there is a problem in hardware.
I have 2 RAMs. one 128 and the other 256.i think one of them doesn't work properly.
I have doubt about my CPU fan also. Since I have an AMD athlon machine it heats so moch and i think my fan is not enough for it.
I don't think that there could be any other errors.
 
  


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
Getting swap to work Andy@DP Linux - Newbie 9 05-07-2004 09:09 AM
Swap file sparkplug55 Linux - Newbie 2 08-11-2003 09:09 AM
SWAP File TJ60515 Linux - Newbie 4 07-30-2003 03:37 PM
How does Swap Space work? linuxnoobie Linux - Newbie 3 06-21-2003 11:57 AM
No Swap File tarballedtux Slackware 4 01-09-2003 02:07 PM

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

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