/proc and disk usage, strange messages
When I do:
Code:
du -sh /proc Code:
du: cannot access `/proc/1005/task/1005/fd/4': No such file or directory |
The /proc system is a window into the kernel. Running du on /proc doesn't make any more sense than running fsck on the graphic card. Garbage in: garbage out.
|
Well I don't run du /proc normally, but du / and the proc is there anyway. And I don't want these garbages in the output
So, you think It is a problem with the kernel? |
How to think of it?? In Linux and Unix, one concept is that "everything is a file". That works to a point--ie there are some file-related commands that work with /proc (e.g. "more"). But the "virtual files" like proc are really just structures in memory, so they don't use the disk. Thus du is not going to work.
|
But du /proc works fine in my Debian distro.
|
I stand corrected...but it is not telling you the disk utilization---ie all that stuff is not on your disk.
The "files" that don't exist---can you see them by browsing thru the /proc tree? |
Quote:
|
do ps -e and see if the process IDs you are seeing are actually the ones for du. Perhaps du can't "look at itself"
|
Yes but I can't catch du while running, Cannot send it to the background. I have not X yet
EDIT: Let's assumend it is it's ID, how to get rid of this warnings? When I run du / I don't want to see this garbages |
du / | grep -v /proc/
OR du / 2>/dev/null the first one just bypasses all the output containing "/proc/", but still gives the total for /proc the second one send all errors to /dev/null |
Never mind... :)
|
OR.....
du --exclude=*/proc* |
Quote:
OK, thanks I will try this |
Quote:
|
All times are GMT -5. The time now is 06:43 AM. |