SUMMARY: Problem with /proc

From: Fiorella Sartori (fiorella@alpha.science.unitn.it)
Date: Fri May 24 1996 - 02:44:13 CDT


Thank you to all the persons who have replied to our question:

Johnie Stafford <js@cctechnol.com>
Cheryl Southard <cld@astro.caltech.edu>
Martin Espinoza <drink@sei.com>
Pete Ashdown <pashdown@xmission.com>
Nicholas R LeRoy <nleroy@norland.idcnet.com>
Michael Sullivan <mike@trdlnk.com>
Carlo Tosti <carlo@io.org>
Alan Hill <ahill@lanser.net>
Ugo Balordi <idugo@Italy.Sun.COM>
Phil Howle <howlep@stp.xfi.bp.com>
Borgarello Massimo <max@itocindy.CV.COM>
Guy Harris <guy@netapp.com>
Stephen Potter <spp@psa.pencom.com>
Shigeki Misawa <misawa@physics.Berkeley.EDU>
John Justin Hough <john@oncology.uthscsa.edu>
Ross Parker <rpark@dev.hcsd.hac.ca>
Colin Melville <iv08480@issc02.mdc.com>
Ric Anderson <ric@rtd.com>
Alexander Greiml <greiml@uni-trier.de>

This is the original question whe have submitted you:

> Hi!
>
> Sometimes on our SUN Ultra1 (with SunOS 5.5) we find the root partition
> with no free space, so we need to reboot immediatly in order to be able
> to work. We need to reboot because what is filling the file system is
> the /proc directory which files can't be deleted.
>
> Is there a workaround?
>
> Thank you in advance, I'll summarize.
>
> Fiorella
>

The problem hasn't occurred again till now. We have already downloaded and
installed the utility lsof, like advised by some of you.
When we'll have another chance, we'll try to check any other problems you
suggested.
Many thanks again!

Fiorella

---

------------------------------------------------------------------------- | Fiorella Sartori | Phone : +39-461-881598 | | C.I.S.C.A. | Fax : +39-461-881668 | | University of Trento | E-Mail: fiorella@science.unitn.it | | Via Sommarive, 14 | | | I-38050 POVO (Trento), ITALY | | -------------------------------------------------------------------------

=============================================================================== Johnie Stafford wrote: ------------------------------------------------------------------------------- /proc should be its own file system, it shouldn't affect the root file system.

Johnie

------------------------------------------------------------------------------- Cheryl Southard wrote: ------------------------------------------------------------------------------- Type "df -k" or "/usr/ucb/df". Are there separate lines for the root partition "/" and "/proc"? If there are, then when /proc fills up it shouldn't affect the root partition.

When your root partition fills up, try looking in /var/tmp. /var/tmp is part of the root partition (unless you have a separate /var partition) and oftentimes things are put there.

Cheryl

------------------------------------------------------------------------------- Martin Espinoza wrote: ------------------------------------------------------------------------------- You need to put an entry in your fstab to mount "none" on /proc type proc.

------------------------------------------------------------------------------- Pete Ashdown wrote: ------------------------------------------------------------------------------- Try rm /core first. Something may be dumping there. Kill processes if you are out of process space in order to run the "rm". Second, you can usually get a lot of free space by wiping your wtmp and wtmpx files. Do a "cp /dev/null /etc/wtmp" then a "cp /dev/null /etc/wtmpx". Of course, this will reset your "last" logins record, so keep this in mind.

The best solution is to make a larger partition, and monitor it for when it goes over 90%.

------------------------------------------------------------------------------- Nicholas R LeRoy wrote: ------------------------------------------------------------------------------- No, you don't need to delete these files. The /proc file system *DOES NOT* use any actual disk space -- its just a clean way to access parts of the system. There are probably other things lurking that are sucking up your disk scape, however....

-- Nick

------------------------------------------------------------------------------- Michael Sullivan wrote: ------------------------------------------------------------------------------- You are mistaken as to the cause of your root file system filling up since /proc is a separate non-disk file system which doesn't take up any space in the root file system. The apparent sizes of the contents of /proc actually represent the virtual memory being used by the corresponding processes.

If rebooting frees up space in the file system, there was probably a large unlinked file that some process still had open. Causing that process to close the file will release the disk space without a reboot. Killing the errant process is one way to "cause it to close the file," although depending on the program being run there may be a more elegant way.

There is no straight forward way to identify the process which has the file open. One trick that I sometimes use is to run fsck with the -n option on the file system. The -n option is essential to ensure that fsck doesn't try to modify the file system, which might be disastrous since it is still mounted. If fsck reports a large unreferenced file ("UNREF FILE"), note the file's inode number (the number following "I="), and use lsof to identify the process which has a file open with that inode on the file system in question.

lsof is a very useful freely distributable utility to list open files. It is available via anonymous ftp from vic.cc.purdue.edu in pub/tools/unix/lsof

------------------------------------------------------------------------------- Carlo Tosti wrote: ------------------------------------------------------------------------------- Fiorella, I will make the assumption that "Italian" is a known language to you.

Una soluzione poco elegante e' quella di dare molto piu' spazio a /proc o alla sua "patition".

Una soluzione un po' piu' elegante e' quella di isolare quei processi che non sono necessari ed evitare che vengano creati. Un esempio di processi che prendono spazio senza fare niente sono queli che non hanno il "parent" e quelli che non hanno un "display" attivo ( PC con X emulation ? ) cioe uno che e' sparito prima di chiudere il dislogo correttamente.

Il mio Italiano e' molto carente ma spero di averti dato il messaggio che devi fare un po' di ricerca sull' attivita' della "macchina"

Ciao !

Carlo Tosti

------------------------------------------------------------------------------- Alan Hill wrote: ------------------------------------------------------------------------------- /proc is not real, that is not your problem. Ignore it. You may have a problem with /var/adm/wtmp and /var/adm/wtmpx If those files are large, and you do not require the accounting, then you should chop them. 1) verify file permissions, owner & group ls -a /var/adm/*tmp* -rw-r--r-- 1 root bin 756 May 16 /var/adm/utmp -rw-r--r-- 1 root bin 7812 May 16 /var/adm/utmpx -rw-rw-r-- 1 adm adm 175630 May 16 /var/adm/wtmp -rw-rw-r-- 1 adm adm 1781240 May 16 /var/adm/wtmpx 2) to the chop, you will loose your accounting history, and last info cp /var/adm/utmp /var/adm/wtmp cp /var/adm/utmpx /var/adm/wtmpx 3) verify that your permissions, and reset if required Alan Hill, Montreal, Quebec, Canada

------------------------------------------------------------------------------- Ugo Balordi wrote: ------------------------------------------------------------------------------- Ciao,

rispondo al volo in italiano per amor di brevita'; la /proc contiene solo l'immagine dei processi in memoria (non dovrebbe occupare spazio su disco) non si possono cancellare i file, se vuoi puoi uccidere dei processi. Per il file system full ti conviene spostare la /var in una partizione separata o creare dei link che puntino altrove.

fammi sapere se servissero altre info.

Ciao

Ugo

------------------------------------------------------------------------------- Phil Howle wrote: ------------------------------------------------------------------------------- hi,

/proc files take up NO space!

phil

------------------------------------------------------------------------------- Borgarello Massimo wrote: ------------------------------------------------------------------------------- The /proc does not matter at all because it's on swap! Fiorella probabilmente il problema sta sotto /var/adm oppure lo spooler, quanto e` grossa la / ? Qunato spazio libero hai mediamente ? Ciao

------------------------------------------------------------------------------- Guy Harris wrote: ------------------------------------------------------------------------------- I don't think so.

The "/proc" directory is nominally part of the root file system; however, the system mounts the "procfs" file system on top of it, so all the stuff *under* "/proc" is part of "procfs"...

...and "procfs" doesn't exist on disk, it's just a "virtual" view of all the processes on the system.

Something *else* is taking up all your disk space on the root file system.

------------------------------------------------------------------------------- Stephen Potter wrote: ------------------------------------------------------------------------------- I think you might be slightly confused as to where your problem is. /proc is not supposed to be a real file system. It is a virual filesystem. If you do a df, you should see /proc mounted, not part of /.

-spp

------------------------------------------------------------------------------- Shigeki Misawa wrote: ------------------------------------------------------------------------------- /proc is a filesystem image of the processes running on the system. It takes no disk space. (See man -s 4 proc for more information.)

It's hard to believe that it is causing your problems with space in the root file system.

------------------------------------------------------------------------------- John Justin Hough wrote: ------------------------------------------------------------------------------- Fiorella,

No doubt you've had tons of responses, but your root filesystem is not filling up because /proc. /proc is a virtual filesystem that shows all the processes running and the amount for virtual memory they are currently using (the file size).

You have something else eating memory in your root partition.

john

------------------------------------------------------------------------------- Ross Parker wrote: ------------------------------------------------------------------------------- Fiorella,

Unless something is SERIOUSLY wrong with the /proc filesystem in SunOS 5.5, there is no way of filling the root partition via entries in /proc.

/proc essentially takes up no space - it simply provides a file-based access method to allow programs that need process information easier access to other processes.

What's much more likely to be happening is that you've got a process or processes that are forking rapidly and filling your process table (you will see LOTS of entries in /proc because of this), or you have processes that are writing to files in the '/' partition (in /tmp, for instance).

Many applications will open temporary files, keep them open, and remove their directory entry. The result of this is that a partition could be filling up with data being written to a file that you can't find.

The 'lsof' utility is very good at finding things like this.

Ross

------------------------------------------------------------------------------- Colin Melville wrote: ------------------------------------------------------------------------------- Fiorella,

Sounds like you're running out of swap space.

How much physical memory do you have? How big is your root & swap partitions?

Colin

------------------------------------------------------------------------------- Ric Anderson wrote: ------------------------------------------------------------------------------- /proc files do *NOT* take any space on "/". They are just handles to process images. Each file name in /proc corresponds to an active process and is used by ps, debuggers, and other tools to access data in the process. The size you see is the amout of virtual memory allocated to the process.

I'd suggest you look at /var/tmp as teh cause if /vr is on the root filesystem.

Cheers, Ric (<ric@rtd.com> "Ric Anderson", using RTD's public internet access)

------------------------------------------------------------------------------- Alexander Greiml wrote: ------------------------------------------------------------------------------- Hi Fiorell,

I'm almost shure Your analization of the problem is wrong, as the /proc mounted filesystem is a virtual filesystem, which only uses minimal space in Main Memory, but no space on disk. /proc is a kernel environment which is mapped from Memory to the filesystem.

Better try to find out about the sizes of /tmp and/or coredumps. Maybe even Your logfiles might be the reason, in case You didn't separate the /var directory. Another reason might be /var/spool/mail, ...

Hope this'll help

Alexander

===============================================================================



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:00 CDT