-1

When i do a

du -h --max-depth=1

in my server i get following errors coming up,

du: cannot access `./proc/13379/task/13379/fd/4': No such file or directory
du: cannot access `./proc/13379/task/13379/fdinfo/4': No such file or directory
du: cannot access `./proc/13379/fd/4': No such file or directory
du: cannot access `./proc/13379/fdinfo/4': No such file or directory

if i do

rm -rf /proc/13379/* 

to delete the folder it keeps coming back with different pid.

How do i know which process is using this and any problems of these file links ?

mahen3d
  • 4,342
  • 14
  • 36
  • 57
  • 3
    (I'm probably not alone) I find it just a bit scary that your response to this error message was rm -rf. – user9517 Jun 29 '14 at 14:49

2 Answers2

4

Actually, the "/proc/" folder is for housing the process info and linkage itself to the irq, file discriptor and other kernel sources (which is expected to see the looping link and depending the process itself operation.)

Therefore, it's unable to remove when the process is up and running as the process is occupying the resource on this folder. Also, the PID is expressed on the "/proc/{PID}", so you're no need to use any command (like lsof) to lookup which process using that the file link. In teh above case, "13379" is the process ID which you're looking for.

YLW
  • 161
  • 4
2

As mentioned above, /proc is housekeeping info from the running processes on the machine. It is a virtual filesystem, does not take any diskspace and only contains symlinks and 'files' with information that are generated by the kernel or are read by the kernel (some of them are writable).

However, these error messages are completely harmless. What happened is that du gathered a list of directories in /proc (which are process IDs), and when it tried to descend into, or even while it was inside the directory, the process has exited and its corresponding directory disappears. This confuses du.

To avoid such errors you can skip /proc with --ecxlude=/proc, or use other options like --one-file-system or --exclude-from=FIlE so you can also skip /dev, /sys, etc.

JvO
  • 561
  • 2
  • 10