Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Finding open files on the system


On Wed, 9 May 2001, Andrew Eager wrote:

> At the last meeting,  it was asked:
>
> " If the disk is spinning madly is there any way to determine which
> process is causing the activity ?"

There is also a command "fuser" that I have found to available on Linux,
Solaris and AIX. Then again, AIX installs this (binary) in /etc/fuser.

Some sample output:

[mikal@firewall mikal]$ /sbin/fuser
usage: fuser [ -a | -s ] [ -n space ] [ -signal ] [ -kimuv ] name ...
             [ - ] [ -n space ] [ -signal ] [ -kimuv ] name ...
       fuser -l
       fuser -V

    -a        display unused files too
    -k        kill processes accessing that file
    -i        ask before killing (ignored without -k)
    -l        list signal names
    -m        mounted FS
    -n space  search in the specified name space (file, udp, or tcp)
    -s        silent operation
    -signal   send signal instead of SIGKILL
    -u        display user ids
    -v        verbose output
    -V        display version information
    -         reset options

  udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]

[mikal@firewall mikal]$ /sbin/fuser -u .
.:                   30488c(mikal)

Cheers,
Mikal

-- 
Michael Still (mikal@xxxxxxxxxxx)
  http://www.stillhq.com -- a whole bunch of Open Source stuff including PDF software...

"Grrrrrrr! I'm a volleyballing machine!"