LinuxQuestions.org
Visit Jeremy's Blog.
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 04-26-2006, 10:43 AM   #1
malar
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Rep: Reputation: 15
/proc/kcore larger than RAM


I've been reading posts about the kcore file because I was trying to free up disk space and came across it. I understand that it represents the contents of RAM and is supposedly not using hard disk space, but on my machine I have 512MB of RAM and the kcore file is over 1GB. Reading through "man 5 proc" states that kcore should be the size of RAM + 4KB. I am running SuSE 10. Any thoughts?
 
Old 04-27-2006, 03:08 AM   #2
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 638
Blog Entries: 1

Rep: Reputation: 52
If your machine is working properly, don't touch it! Find some other way to free up disk space. Alternatively, you might consider adding another hard drive to your computer. Hard drives are relatively inexpensive these days and making linux see a new hard drive in general is quite simple.
 
Old 04-27-2006, 04:54 AM   #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
Did you happen to try and look at it ???.
Haven't looked at the code, but seems it tries to accomodate any address it is requested to display. I managed to bump my 256Meg system up to a Gig pretty easily.
Have another look at the size after a reboot.

xode, I think malar is cognisant that it is to be left alone.
 
Old 05-01-2006, 12:24 AM   #4
malar
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks syg00 - you were right. I did try to view the contents before I knew what it was. After rebooting it was back to normal. That was good advice xode about leaving it alone - if I had I wouldn't have caused the problem before I knew what I was jacking with. I thought it was a coredump file at first so I tried to delete it. haha

thanks for the input. Linux rules, phonon and nmm are going to be the sh..
 
Old 05-02-2006, 01:36 AM   #5
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 638
Blog Entries: 1

Rep: Reputation: 52
In general, /proc is a dummy filesystem. It is solely a product of the linux kernel in action, occupies no space on your hard drive and is the kernel's scratch space. You never want to write to it or make any other changes to it and you want to be very careful when reading its contents. For example, you don't want to scan /proc with an antivirus scanner because it can hang your system. However, you very much do want an antivirus scanner for your linux system and I have found F-Prot (http://www.f-prot.com) to be a good choice.
 
Old 05-04-2006, 11:14 AM   #6
malar
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Original Poster
Rep: Reputation: 15
That raises an interesting point that I posted above. If it doesn't take up space then how could it have had a size that was twice the amount of RAM in my system? I guess I'm not 100% on how /proc works.
 
Old 05-04-2006, 02:37 PM   #7
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 638
Blog Entries: 1

Rep: Reputation: 52
/proc may not occupy space on your hard drive (the linux filesytem that is) but it still occupies space, first in RAM and then probably on your hard drive swap partition (or file if you have linux set up that way). In any case, the contents of /proc are temporary, reflect the current state of your system and change as the state of your system changes, moment by moment.
 
Old 05-04-2006, 07:31 PM   #8
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
Quote:
Originally Posted by malar
If it doesn't take up space then how could it have had a size that was twice the amount of RAM in my system? I guess I'm not 100% on how /proc works.
If it doesn't take up space, what relevance is a (nominal) size ???.
In other words it is "indicative - FSVO indicative. People expect to see a "size" when looking at a "file" - so a size is presented.
Neither the "file" nor the "size" exist except as a concept (in the case of /proc, which is a pseudo filesystem). For most /proc "files" the data only exists when you attempt to read it.

Don't worry about it - it is just a figment of someones imagination.
 
Old 05-04-2006, 10:28 PM   #9
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 638
Blog Entries: 1

Rep: Reputation: 52
Quote:
From syg00

For most /proc "files" the data only exists when you attempt to read it.
This is a nice concise way of putting it. This would also mean that writing to /proc will usually have unpredicatble results, since what you are writing to will only exist when you write to it and you will usually have no way in advance of knowing what you are writing to.
 
Old 11-22-2006, 03:35 PM   #10
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 32
Don't worry about size of anything in /proc.
It is not a partition, and stuff there doesn't take space on hard drives or in RAM.
It is only a interface to more complex and deep system features.
It is a directory, but it is not
 
Old 11-23-2006, 11:42 PM   #11
malar
LQ Newbie
 
Registered: Feb 2006
Posts: 27

Original Poster
Rep: Reputation: 15
deep!

thanks for the timely response! haha that was a bad joke. I actually do appreciate the response just because it may help someone else when they start really digging into the filesystem and wondering what the heck /proc is all about. here's a new question - how do you like XGL? (not the right spot for a new questions I know, but still)
 
  


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
/proc/kcore =| nostracosa Linux - General 3 08-19-2005 11:43 PM
/proc/kcore size doesn't match with physical ram size cash_05 Linux - Newbie 2 06-01-2005 01:23 PM
/proc/kcore mithu_sree Linux - General 2 05-14-2005 03:40 AM
/proc/kcore -- what is it? JustinHoMi Linux - General 3 02-15-2002 01:34 AM
/proc/kcore Dallam Linux - General 1 05-12-2001 05:24 AM

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

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