version 1.18, 2000/07/16 23:40:48 |
version 1.19, 2000/11/10 05:10:27 |
|
|
.Op Fl u Ar user |
.Op Fl u Ar user |
.Op Ar file ... |
.Op Ar file ... |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm fstat |
.Nm |
identifies open files. |
identifies open files. |
A file is considered open by a process if it was explicitly opened, |
A file is considered open by a process if it was explicitly opened, |
is the working directory, root directory, active pure text, or kernel |
is the working directory, root directory, active pure text, or kernel |
trace file for that process. |
trace file for that process. |
If no options are specified, |
If no options are specified, |
.Nm fstat |
.Nm |
reports on all open files in the system. |
reports on all open files in the system. |
.Pp |
.Pp |
The options are as follows: |
The options are as follows: |
|
|
Output file offset. |
Output file offset. |
Follow the size field with the descriptor's offset. |
Follow the size field with the descriptor's offset. |
Useful for checking progress as a process works through a large file. |
Useful for checking progress as a process works through a large file. |
.It Fl p pid |
.It Fl p Ar pid |
Report all files open by the specified process. |
Report all files open by the specified process. |
.It Fl u user |
.It Fl u Ar user |
Report all files open by the specified user. |
Report all files open by the specified user. |
.It Fl v |
.It Fl v |
Verbose mode. |
Verbose mode. |
|
|
system data structures rather than silently ignoring them. |
system data structures rather than silently ignoring them. |
Most of these data structures are dynamically created or deleted and it is |
Most of these data structures are dynamically created or deleted and it is |
possible for them to disappear while |
possible for them to disappear while |
.Nm fstat |
.Nm |
is running. |
is running. |
This is normal and unavoidable since the rest of the system is running while |
This is normal and unavoidable since the rest of the system is running while |
.Nm fstat |
.Nm |
itself is running. |
itself is running. |
.It Ar file ... |
.It Ar file ... |
Restrict reports to the specified files. |
Restrict reports to the specified files. |
|
|
and a full duplex socket shows a double arrow |
and a full duplex socket shows a double arrow |
.Pq Dq <-> ) . |
.Pq Dq <-> ) . |
.Pp |
.Pp |
For AF_INET sockets, |
For |
.Nm fstat |
.Dv AF_INET |
|
sockets, |
|
.Nm |
also attempts to print the internet address and port for the |
also attempts to print the internet address and port for the |
local end of a connection. |
local end of a connection. |
If the socket is connected, it also prints the remote internet address |
If the socket is connected, it also prints the remote internet address |
|
|
W - The pipe blocks waiting for the reader to read data. |
W - The pipe blocks waiting for the reader to read data. |
R - The pipe blocks waiting for the writer to write data. |
R - The pipe blocks waiting for the writer to write data. |
E - The pipe is in EOF state. |
E - The pipe is in EOF state. |
.Sh BUGS |
|
Since |
|
.Nm fstat |
|
takes a snapshot of the system, it is only correct for a very short period |
|
of time. |
|
.Pp |
|
Moreover, because DNS resolution and YP lookups cause many file |
|
descriptor changes, |
|
.Nm fstat |
|
does not attempt to translate the internet address and port numbers into |
|
symbolic names. |
|
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr netstat 1 , |
.Xr netstat 1 , |
.Xr nfsstat 1 , |
.Xr nfsstat 1 , |
|
|
.Nm |
.Nm |
command appeared in |
command appeared in |
.Bx 4.3 tahoe . |
.Bx 4.3 tahoe . |
|
.Sh BUGS |
|
Since |
|
.Nm |
|
takes a snapshot of the system, it is only correct for a very short period |
|
of time. |
|
.Pp |
|
Moreover, because DNS resolution and YP lookups cause many file |
|
descriptor changes, |
|
.Nm |
|
does not attempt to translate the internet address and port numbers into |
|
symbolic names. |