Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/fstat/fstat.1
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)fstat.1 8.3 (Berkeley) 2/25/94 | .\" @(#)fstat.1 8.3 (Berkeley) 2/25/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd September 28, 2011 | .Dd October 19, 2019 | ||||
.Dt FSTAT 1 | .Dt FSTAT 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm fstat | .Nm fstat | ||||
.Nd identify active files | .Nd identify active files | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl fmnv | .Op Fl fmnsv | ||||
.Op Fl M Ar core | .Op Fl M Ar core | ||||
.Op Fl N Ar system | .Op Fl N Ar system | ||||
.Op Fl p Ar pid | .Op Fl p Ar pid | ||||
.Op Fl u Ar user | .Op Fl u Ar user | ||||
.Op Ar | .Op Ar | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
Show All 32 Lines | |||||
the file resides in rather than the mount point name; for special | the file resides in rather than the mount point name; for special | ||||
files, print the | files, print the | ||||
device number that the special device refers to rather than the filename | device number that the special device refers to rather than the filename | ||||
in | in | ||||
.Pa /dev ; | .Pa /dev ; | ||||
and print the mode of the file in octal instead of symbolic form. | and print the mode of the file in octal instead of symbolic form. | ||||
.It Fl p | .It Fl p | ||||
Report all files open by the specified process. | Report all files open by the specified process. | ||||
.It Fl s | |||||
Print socket endpoint information. | |||||
.It Fl u | .It Fl u | ||||
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. | ||||
Print error messages upon failures to locate particular | Print error messages upon failures to locate particular | ||||
system data structures rather than silently ignoring them. | system data structures rather than silently ignoring them. | ||||
Most of | Most of | ||||
these data structures are dynamically created or deleted and it is | these data structures are dynamically created or deleted and it is | ||||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | |||||
In all cases the first field is the domain name, the second field | 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 | is the socket type (stream, dgram, etc), and the third is the socket | ||||
flags field (in hex). | flags field (in hex). | ||||
The remaining fields are protocol dependent. | The remaining fields are protocol dependent. | ||||
For tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). | For tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). | ||||
For unix domain sockets, its the address of the socket pcb and the address | For unix domain sockets, its the address of the socket pcb and the address | ||||
of the connected pcb (if connected). | of the connected pcb (if connected). | ||||
Otherwise the protocol number and address of the socket itself are printed. | Otherwise the protocol number and address of the socket itself are printed. | ||||
The attempt is to make enough information available to | |||||
permit further analysis without duplicating | |||||
.Xr netstat 1 . | |||||
.Pp | .Pp | ||||
For example, the addresses mentioned above are the addresses which the | For example, the addresses mentioned above are the addresses which the | ||||
.Dq Li netstat -A | .Dq Li netstat -A | ||||
command would print for tcp, udp, and unixdomain. | command would print for tcp, udp, and unixdomain. | ||||
Note that since pipes are implemented using sockets, a pipe appears as a | Note that since pipes are implemented using sockets, a pipe appears as a | ||||
connected unix domain stream socket. | connected unix domain stream socket. | ||||
A unidirectional unix domain socket indicates the direction of flow with | A unidirectional unix domain socket indicates the direction of flow with | ||||
an arrow (``<-'' or ``->''), and a full duplex socket shows a double arrow | an arrow (``<-'' or ``->''), and a full duplex socket shows a double arrow | ||||
(``<->''). | (``<->''). | ||||
.Pp | |||||
When the | |||||
.Fl s | |||||
flag is used, socket endpoint information is shown after the address of the | |||||
socket. | |||||
For internet sockets the local and remote address are shown, separated with | |||||
yuripv: With a "non-native speaker" disclaimer, this looks somehow wrong to me, should it be "the local… | |||||
jlhAuthorUnsubmitted Done Inline ActionsCan't really tell. Leaving it to a native speaker. jlh: Can't really tell. Leaving it to a native speaker. | |||||
impUnsubmitted Done Inline Actions"The a and b" is plural. So "addresses" is needed. imp: "The a and b" is plural. So "addresses" is needed. | |||||
a double arrow (``<->''). | |||||
For unix/local sockets either the local or remote address is shown, depending | |||||
on which one is available. | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr netstat 1 , | .Xr netstat 1 , | ||||
.Xr nfsstat 1 , | .Xr nfsstat 1 , | ||||
.Xr procstat 1 , | .Xr procstat 1 , | ||||
.Xr ps 1 , | .Xr ps 1 , | ||||
.Xr sockstat 1 , | .Xr sockstat 1 , | ||||
.Xr systat 1 , | .Xr systat 1 , | ||||
.Xr tcp 4 , | .Xr tcp 4 , | ||||
Show All 14 Lines |
With a "non-native speaker" disclaimer, this looks somehow wrong to me, should it be "the local and remote addresses are shown", or even "both local and remote addresses are shown" instead?