Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
what is /proc/kcore and why is it taking up 1.2GB!!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
butters
Guru
Guru


Joined: 13 May 2002
Posts: 427
Location: Poughkeepsie, NY

PostPosted: Mon Jul 03, 2006 1:32 am    Post subject: what is /proc/kcore and why is it taking up 1.2GB!! Reply with quote

I was wondering why /proc was taking up 1.2GB on my hard disk, and I found that the very vast majority was due to a single binary file, /proc/kcore. What is this file used for and why is it so big? Is this a normal size for kcore?
_________________
If tugboats were bigger, they'd be the ones getting tugged.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Mon Jul 03, 2006 1:50 am    Post subject: Reply with quote

Message from kernel:
He's not fat, he's my core dump.


From /usr/src/linux/Documentation/filesystems/proc.txt.
Quote:
kcore Kernel core image (can be ELF or A.OUT(deprecated in 2.4))
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Mon Jul 03, 2006 3:31 am    Post subject: Reply with quote

Don't worry about anything in /proc. It's a virtual filesystem and is not taking up any disk space.

/proc/kcore should be the size of your memory. It is a gateway to your physical memory. If you read from it, you are reading directly from your physical memory.



troymc
Back to top
View user's profile Send private message
hampelratte
Apprentice
Apprentice


Joined: 29 Jul 2005
Posts: 155

PostPosted: Tue May 22, 2007 3:09 pm    Post subject: Reply with quote

i have the same problem since i have upgraded my ram to 1.5gb
Code:
$ df -h
Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
/dev/hda2             950M  902M     0 100% /


as you can see, my root partition has no space left because of kcore. at least some programs think so, for example firefox, when trying to download things to /tmp. that is very annoying. is there a workaround for that problem? can i disable this function in my kernel config?

otherwise i would have to repartition my harddisk, which i want to avoid.

thanks
henrik
Back to top
View user's profile Send private message
hampelratte
Apprentice
Apprentice


Joined: 29 Jul 2005
Posts: 155

PostPosted: Tue May 22, 2007 3:20 pm    Post subject: Reply with quote

found the answer by myself. there is an option for /proc/kcore in the kernel config. i have disabled this function now and will hopefully not run into this problem again.
Back to top
View user's profile Send private message
Stever
Apprentice
Apprentice


Joined: 01 Mar 2005
Posts: 151
Location: North Carolina

PostPosted: Tue May 22, 2007 5:03 pm    Post subject: Reply with quote

As previously explained, /proc does not exist on your harddrive, and turning off /proc/kcore support will not free disk space.

Try
Code:
# df -ah
to see what I mean - /proc is a separate mount from your hd.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Tue May 22, 2007 5:08 pm    Post subject: Reply with quote

hampelratte wrote:
i have the same problem since i have upgraded my ram to 1.5gb
Code:
$ df -h
Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
/dev/hda2             950M  902M     0 100% /


as you can see, my root partition has no space left because of kcore. at least some programs think so, for example firefox, when trying to download things to /tmp. that is very annoying. is there a workaround for that problem? can i disable this function in my kernel config?

otherwise i would have to repartition my harddisk, which i want to avoid.

thanks
henrik


Please, read above.

Anything in /proc is not taking any amount of disk space at all. /proc is just an interface to your live kernel, and not a physical filesystem in your hard drive. If your / is full, it is not because of kcore not anything under /proc.
Back to top
View user's profile Send private message
hampelratte
Apprentice
Apprentice


Joined: 29 Jul 2005
Posts: 155

PostPosted: Tue May 22, 2007 5:17 pm    Post subject: Reply with quote

yes, i know that proc is virtual, but as i explained, for some programs it looks like there is no space left on the device because kcore is included in the calculation of disk usage, though there is enough space left on the device. if i du over all directories, which live on / excluding kcore the sum shows the right value of free disk space.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Tue May 22, 2007 5:32 pm    Post subject: Reply with quote

hampelratte wrote:
yes, i know that proc is virtual, but as i explained, for some programs it looks like there is no space left on the device because kcore is included in the calculation of disk usage, though there is enough space left on the device. if i du over all directories, which live on / excluding kcore the sum shows the right value of free disk space.


No. At least, that would not be a normal behaviour.

/proc is mounted as another filesystem, and as such, its size should not interfere in the rest of partitions. When you do a df -ah you can see the space used and available for each mounted volume, including /proc. Each volume is a separate entity, and the space that /proc/kcore takes should, by no means, interfere with the root partition, the same that /usr or /var don't do so either.

Can you confirm that that space is being counted as used in the root partition or is it just an assumption? If you can really confirm it, then, in that case that would be a bug, though I am not quite sure where to dig first to find it.

Maybe firefox or the others complained for any other reason. Just maybe.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9891
Location: almost Mile High in the USA

PostPosted: Tue May 22, 2007 6:12 pm    Post subject: Reply with quote

I've found that a 1GB partition is really insufficient to install Gentoo, especially with portage on the same disk.
Make sure /usr/portage is somewhere that has a lot of space to grow, that tree itself takes quite a bit of disk space, coupled with /sbin, etc., will quickly eat up a root partition. You don't detail enough of the partitioning scheme so this is just an assumption and it sounds like you did not preplan partitions (?)...

I was trying to get a 2GB disk install with firefox, that was pretty much impossible to do if I had portage on the same disk...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
hampelratte
Apprentice
Apprentice


Joined: 29 Jul 2005
Posts: 155

PostPosted: Tue May 22, 2007 6:43 pm    Post subject: Reply with quote

i planned my partition scheme very well except /tmp which should have been on another partition
Code:
# df -h
Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
/dev/hda2             950M  280M  622M  32% /
udev                  760M  2,7M  757M   1% /dev
cachedir              950M  280M  622M  32% /lib/splash/cache
none                  760M     0  760M   0% /dev/shm
/dev/hda5             9,2G  5,7G  3,1G  65% /var
/dev/hda3             9,2G  5,7G  3,1G  65% /usr
/dev/hdc3             3,0G  1,3G  1,6G  46% /opt
/dev/hdc2             2,0G  1,8G   72M  97% /home
/dev/hda1             4,7G  3,9G  851M  83% /mnt/win
/dev/hda6              41G   35G  5,6G  87% /mnt/programme
/dev/hdc4             109G   84G   26G  77% /mnt/daten
/dev/hda7              84G   60G   20G  76% /mnt/dachboden


as you can see my / only takes 280M and there is 620M left for mainly /tmp, which is enough in most cases.

i figured out the problem: it was firefox in combination with mplayerplug-in. the mplayerplug-in stored a big movie in a temp file in /tmp. after closing the mplayerplug-in tab in firefox the file has been deleted but somehow not really. lsof +L1 still showed this file as (deleted) and tools like ls and du seemed to ignore this file. df included the file for it's calculation. that's why i thought kcore was the bad guy, because kcore was the only big file in /. after closing firefox at all, everything looked fine again. so be careful using the mpalyerplug-in ;-)
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Tue May 22, 2007 7:15 pm    Post subject: Reply with quote

interesting thread 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum