Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/fstat/fstat.1
Show All 30 Lines | |||||
.Dd September 28, 2011 | .Dd September 28, 2011 | ||||
.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(s) information. | |||||
jilles: "(s)" is not needed, as below. | |||||
.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 | The attempt is to make enough information available to | ||||
permit further analysis without duplicating | permit further analysis without duplicating | ||||
.Xr netstat 1 . | .Xr netstat 1 . | ||||
jillesUnsubmitted Done Inline ActionsThis is no longer true since fstat now duplicates parts of netstat, but that need not be bad. Consider simply removing the sentence. jilles: This is no longer true since fstat now duplicates parts of netstat, but that need not be bad. | |||||
jlhAuthorUnsubmitted Done Inline ActionsGood catch, thanks! jlh: Good catch, thanks! | |||||
.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. | |||||
jillesUnsubmitted Done Inline ActionsThis sentence is incomplete. jilles: This sentence is incomplete. | |||||
Not Done Inline Actionssocket endpoint information *is* shown jilles: socket endpoint information *is* shown | |||||
Done Inline ActionsAh, this is uncountable in English (not in French :-)). Thanks! jlh: Ah, this is uncountable in English (not in French :-)). Thanks! | |||||
For internet sockets the local and remote address are shown, separated with | |||||
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 |
"(s)" is not needed, as below.