Mailinglist Archive: opensuse (2835 mails)

< Previous Next >
Re: [opensuse] Size of /proc/kcor
  • From: Thomas Hertweck <Thomas.Hertweck@xxxxxx>
  • Date: Tue, 05 Dec 2006 20:44:04 +0000
  • Message-id: <4575DA14.7090902@xxxxxx>

Susemail wrote:
> Is this normal? # du -hsx /proc/*-> 4.8G /proc/kcore

Yes, see David's email. It's the kernel core image.

> ps: Why do the first 2 outputs happen?:
> # du -hsx /proc/* | grep kcore
> du: `/proc/18268/task': No such file or directory
> du: `/proc/18268/fd': No such file or directory
> 4.8G /proc/kcore

The directory /proc (which is the mount point for the virtual
proc-filesystem) contains (among other things) one subdirectory for
each running process named after the corresponding PID. For example,
when I start a process like

$> find / -iname "*.txt" -print

then "ps -elf" can tell me that it has PID 7451. While this "find"
process is running, there exists a directory /proc/7451. This directory
disappears once the "find" process has finished.

When you enter a command like "du -hsx /proc/*", you should realize that
the wildcard "*" is actually expanded by the shell, not by the "du"
command. At the time when the shell expands your wildcard, the directory
structure in /proc might differ from the directory structure a bit later
on as /proc is very dynamic. It might also happen, that the directory
structure in /proc changes while the "du" command is executed.

By the way, it's pretty useless to run a "du" command on a virtual
filesystem like procfs. So everything seems to be fine on your system.

HTH, Th.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >