[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

procfiles Command

Purpose

Reports information about all file descriptors opened by processes.

Syntax

procfiles [ -F ] [ -n ][ ProcessID ] ...

Description

The /proc filesystem provides a mechanism to control processes. It also gives access to information about the current state of processes and threads, but in binary form. The proctools commands provide ascii reports based on some of the available information.

Most of the commands take a list of process IDs or /proc/ProcessID strings as input. The shell expansion /proc/* can therefore be used to specify all processes in the system.

Each of the proctools commands gathers information from /proc for the specified processes and displays it to the user. The proctools commands like procrun and procstop start and stop a process using the /proc interface.

The information gathered by the commands from /proc is a snapshot of the current state of processes, and therefore can vary at any instant except for stopped processes.

The procfiles command reports information on all file descriptors opened by processes. With the -n option it also displays the names of the corresponding files.

Flags

-F Forces procfiles to take control of the target process even if another process has control.
-n Prints the names of the files referred to by file descriptors.
ProcessID Specifies the process id.

Examples

  1. To display status and control information on the file descriptors opened by process 11928, enter:
    procfiles 11928
    The output of this command might look like this:
    11928 : -sh
      Current rlimit: 2000 file descriptors
       0: S_IFCHR mode:0622 dev:10,4  ino:2584 uid:100 gid:100 rdev:28,1
          O_RDONLY
       1: S_IFCHR mode:0622 dev:10,4  ino:2584 uid:100 gid:100 rdev:28,1
          O_RDONLY
       2: S_IFCHR mode:0622 dev:10,4  ino:2584 uid:100 gid:100 rdev:28,1
          O_RDONLY
       63: S_IFREG mode:0600 dev:10,8  ino:311 uid:100 gid:100 rdev:40960,10317
          O_RDONLY size:2574
  2. To display name, status and control information on the file descriptors opened by process 15502, enter:
    procfiles -n 15502
    The output of this command might look like this:
    15502 : /home/guest/test 
      Current rlimit: 2000 file descriptors                                 
       0: S_IFCHR mode:0622 dev:10,4  ino:2584 uid:100 gid:100 rdev:28,1
          O_RDONLY
       1: S_IFCHR mode:0622 dev:10,4  ino:2584 uid:100 gid:100 rdev:28,1
          O_RDONLY
       2: S_IFCHR mode:0622 dev:10,4  ino:2584 uid:100 gid:100 rdev:28,1
          O_RDONLY
       3: S_IFREG mode:0644 dev:10,7  ino:26 uid:100 gid:100 rdev:0,0       
          O_RDONLY size:0  name:/tmp/foo

Files

/proc Contains the /proc filesystem.

Related Information

The proccred command, procflags command, procldd command, procmap command, procrun command, procsig command, procstack command, procstop command, proctree command, procwait command, procwdx command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]