On Sat, Sep 20, 2008 at 4:19 PM, Jianhua Yang <[EMAIL PROTECTED]> wrote:
> Hello,
>
> file system was filled up and files were deleled by someone while there
> still had processes referencing those deleted files,
> the disk space was not released, the result of du was different from output
> of df.
> now how to use dtrace to find the pids that were still referencing those
> deleted files ?

I don't use dtrace for this - I use find.  For example:

# find /proc/*/fd -type f -links 0 \! -size 0 -ls | sort -n +1

You can view the (e.g) log file with commands like:

# tail -f /proc/<pid>/fd/<fd>

If you find that there is a process that you can't kill that has a
huge file, you can truncate it with:

# cp /dev/null /proc/<pid>/fd/<fd>

Be sure you have the right one.  See the tail command above.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to