4.4BSD/usr/share/man/cat1/fstat.0

Compare this file to the similar file:
Show the results in this format:

FSTAT(1)                     BSD Reference Manual                     FSTAT(1)

NNAAMMEE
     ffssttaatt - file status

SSYYNNOOPPSSIISS
     ffssttaatt [--ffnnvv] [--MM _c_o_r_e] [--NN _s_y_s_t_e_m] [--uu _u_s_e_r] [_f_i_l_e_n_a_m_e_._._.]

DDEESSCCRRIIPPTTIIOONN
     FFssttaatt identifies open files.  A file is considered open by a process if
     it was explicitly opened, is the working directory, root directory, ac-
     tive pure text, or kernel trace file for that process.  If no options are
     specified, ffssttaatt reports on all open files in the system.

     Options:

     --ff      If additional filename arguments are present, restrict examina-
             tion to files open in the same filesystem as the named file argu-
             ments.  For example, to find all files open in the filesystem
             where the directory _/_u_s_r_/_s_r_c resides, type ``fstat -f /usr/src''.

     --MM      Extract values associated with the name list from the specified
             core instead of the default _/_d_e_v_/_k_m_e_m.

     --NN      Extract the name list from the specified system instead of the
             default _/_v_m_u_n_i_x.

     --nn      Numerical format.  Print the device number (maj,min) of the
             filesystem the file resides in rather than the mount point name;
             for special files, print the device number that the special de-
             vice refers to rather than the filename in _/_d_e_v; and print the
             mode of the file in octal instead of symbolic form.

     --pp      Report all files open by the specified process.

     --uu      Report all files open by the specified user.

     --vv      Verbose mode.  Print error messages upon failures to locate par-
             ticular system data structures rather than silently ignoring
             them.  Most of these data structures are dynamically created or
             deleted and it is possible for them to disappear while ffssttaatt is
             running.  This is normal and  unavoidable since the rest of the
             system is running while ffssttaatt itself is running.

     _f_i_l_e_n_a_m_e _._._.
             Restrict reports to the specified files.

     The following fields are printed:

     USER   The username of the owner of the process (effective uid).

     CMD    The command name of the process.

     PID    The process id.

     FD     The file number in the per-process open file table or one of the
            following special names:

                  text - pure text inode wd   - current working directory
                  root - root inode tr   - kernel trace file

            If the file number is followed by an asterisk (``*''), the file is
            not an inode, but rather a socket, FIFO, or there is an error.  In
            this case the remainder of the line doesn't correspond to the re-
            maining headers -- the format of the line is described later under

            _S_o_c_k_e_t_s.

     MOUNT  If the --nn flag wasn't specified, this header is present and is the
            pathname that the filesystem the file resides in is mounted on.

     DEV    If the --nn flag is specified, this header is present and is the ma-
            jor/minor number of the device that this file resides in.

     INUM   The inode number of the file.

     MODE   The mode of the file.  If the --nn flag isn't specified, the mode is
            printed using a symbolic format (see strmode(3));  otherwise, the
            mode is printed as an octal number.

     SZ|DV  If the file is not a character or block special, prints the size
            of the file in bytes.  Otherwise, if the --nn flag is not specified,
            prints the name of the special file as located in _/_d_e_v. If that
            cannot be located, or the --nn flag is specified, prints the ma-
            jor/minor device number that the special device refers to.

     R/W    This column describes the access mode that the file allows.  The
            letter ``r'' indicates open for reading; the letter ``w'' indi-
            cates open for writing.  This field is useful when trying to find
            the processes that are preventing a filesystem from being down
            graded to read-only.

     NAME   If filename arguments are specified and the --ff flag is not, then
            this field is present and is the name associated with the given
            file.  Normally the name cannot be determined since there is no
            mapping from an open file back to the directory entry that was
            used to open that file.  Also, since different directory entries
            may reference the same file (via ln(2)),  the name printed may not
            be the actual name that the process originally used to open that
            file.

SSOOCCKKEETTSS
     The formating of open sockets depends on the protocol domain.  In all
     cases the first field is the domain name, the second field is the socket
     type (stream, dgram, etc), and the third is the socket flags field (in
     hex).  The remaining fields are protocol dependent.  For tcp, it is the
     address of the tcpcb, and for udp, the inpcb (socket pcb).  For unix do-
     main sockets, its the address of the socket pcb and the address of the
     connected pcb (if connected).  Otherwise the protocol number and address
     of the socket itself are printed.  The attempt is to make enough informa-
     tion available to permit further analysis without duplicating netstat(1).


     For example, the addresses mentioned above are the addresses which the
     ``netstat -A'' command would print for tcp, udp, and unixdomain.  Note
     that since pipes are implemented using sockets, a pipe appears as a con-
     nected unix domain stream socket.  A unidirectional unix domain socket
     indicates the direction of flow with an arrow (``<-'' or ``->''), and a
     full duplex socket shows a double arrow (``<->'').

BBUUGGSS
     Since ffssttaatt takes a snapshot of the system, it is only correct for a very
     short period of time.

SSEEEE AALLSSOO
     netstat(1),  nfsstat(1),  ps(1),  systat(1),  vmstat(1),  iostat(8),
     pstat(8)

HHIISSTTOORRYY
     The ffssttaatt command appeared in 4.3BSD-Tahoe.

4th Berkeley Distribution        June 6, 1993                                2