Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fuser(1M) — HP-UX 9.03

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mount(1M)

ps(1)

kill(2)

signal(2)

fuser(1M)

NAME

fuser, cfuser − list process IDs of all processes that have file open
 

SYNOPSIS

/etc/fuser [-kums] files [-] [[-kums] files]

/etc/cfuser [-kums] files [-] [[-kums] files]
 

DESCRIPTION

fuser lists the process IDs of processes that have file open.  For block special devices, all processes using any file on that device are listed.  The process ID is followed by c if the process is using the file as its current directory or p if using the file as its root directory. 
 
Use the -m option to display processes that have files open on a file system.  The -m option also outputs file systems that are mounted on the given file system. 
 

Options

-k Sends the SIGKILL signal to each process.  Only users with appropriate privileges can terminate another user’s process (see kill(2)).

-u Causes the login name (in parentheses) to follows the process ID. 

-m Lists all files that are open on the file system that contains the given file.  This is not neccessarily the same as the given file.  For example:
 
  fuser -m /etc/fuser
 
lists all open files on "/", while:
 
  fuser /etc/fuser
 
lists the processes that have /etc/fuser open.

-s Use when the given file system is NFS-mounted and its NFS server is down to list the files. Be sure to give the correct mount point with -s , since fuser cannot determine the mount point when the NFS server is down. The -s option implys the -m option. 

Options can be respecified between groups of files.  The new set of options replaces the old set, with a lone dash canceling any options currently in force. 

The process IDs are printed as a single line on the standard output, separated by spaces and terminated with a single new line.  All other output is written on standard error. 

In the HP Clustered environment, cfuser identifies processes running on any node in the HP Cluster using a file or file structure.  A separate report is produced for each member of the cluster.  Each report is preceded by the cluster member’s name. 

EXAMPLES

fuser -ku /dev/dsk/1s? 
if typed by a user with appropriate privileges, terminates all processes that are preventing disk drive 1 from being unmounted, listing the process ID and login name of each process being killed. 

fuser -u /etc/passwd
lists process IDs and login names of processes that have the password file open. 

fuser -ku /dev/dsk/1s? -u /etc/passwd
if typed by a user with appropriate privileges, combines both of the above examples into a single command line.

fuser -s /lrom
lists all files open on /lrom, even if the file system is NFS-mounted and the NFS server is down. 
 

FILES

/dev/kmem for system image

/dev/mem also for system image

/hp-ux for name list
 

SEE ALSO

mount(1M), ps(1), kill(2), signal(2). 
 

STANDARDS CONFORMANCE

fuser: SVID2

Hewlett-Packard Company     —  HP-UX 9.03: March 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026