|
|
1.1 root 1: .\" Copyright (c) 1987 Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted
5: .\" provided that the above copyright notice and this paragraph are
6: .\" duplicated in all such forms and that any documentation,
7: .\" advertising materials, and other materials related to such
8: .\" distribution and use acknowledge that the software was developed
9: .\" by the University of California, Berkeley. The name of the
10: .\" University may not be used to endorse or promote products derived
11: .\" from this software without specific prior written permission.
12: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14: .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15: .\"
16: .\" @(#)fstat.1 5.7 (Berkeley) 6/22/90
17: .\"
18: .TH FSTAT 1 "June 22, 1990"
19: .UC 4
20: .SH NAME
21: fstat \- file status
22: .SH SYNOPSIS
23: .B fstat
24: [
25: .B \-u
26: user ] [
27: .B \-p
28: pid ] [
29: .B filename...
30: ]
31: .SH DESCRIPTION
32: .I Fstat
33: identifies open files.
34: A file is considered open if a process has it open,
35: if it is the working directory for a process,
36: or if it is an active pure text file.
37: If no options are specified,
38: .I fstat
39: reports on all open files.
40: .PP
41: Options:
42: .TP 6
43: .B \-u
44: Report all files open by the specified user.
45: .TP 6
46: .B \-p
47: Report all files open by the specified process.
48: .TP 6
49: .B filename...
50: Restrict reports to the specified files.
51: If the file is a block special file,
52: .I fstat
53: additionally reports on any open files on that device,
54: treating it as a mounted file system.
55: .PP
56: The following fields are printed:
57: .TP 6
58: .B USER
59: The username of the owner of the process.
60: .TP 6
61: .B CMD
62: The command name of the process.
63: .TP 6
64: .B PID
65: The process id.
66: .TP 6
67: .B FD
68: The file number in the per-process open file table. The special
69: names ``text'' and ``wd'' mean that the file is the pure text inode
70: or the working directory for the process.
71: If the file number is followed by an asterisk (``*''), then the file is
72: not an inode, but is a socket or a FIFO or has an error of some kind.
73: In this case the rest of the entry is in variable format, doesn't
74: correspond to the rest of the headings, and is enclosed in parentheses.
75: If the file resides on a remote filesystem, the device, inode,
76: and size fields are replaced by the text ``from remote filesystem''.
77: .TP 6
78: .B DEVICE
79: Major/minor number of the device this file exists on.
80: .TP 6
81: .B INODE
82: The inode number of the file.
83: .TP 6
84: .B SIZE
85: The size, in bytes, of the file.
86: .TP 6
87: .B TYPE
88: The type of the file (see
89: .IR stat (2)).
90: .SH Sockets
91: The formating of open sockets depends on the protocol domain.
92: In all cases the first field is the domain name, the second field
93: is the socket type (stream, dgram, etc), and the third is the socket
94: flags field (in hex).
95: The remaining fields are protocol dependent.
96: For tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb).
97: For unix domain sockets, its the address of the socket pcb and the address
98: of the connected pcb (if connected).
99: Otherwise the protocol number and address of the socket itself are printed.
100: The attempt is to not duplicate
101: .IR netstat (1),
102: but rather to make enough information available to permit further analysis.
103: .PP
104: For example, the addresses mentioned above are the addresses which the
105: ``netstat -A'' command would print for tcp, udp, and unixdomain.
106: Note that since pipes are implemented using sockets, a pipe appears as a
107: connected unix domain stream socket.
108: A unidirectional unix domain socket indicates the direction of flow with
109: an arrow (``<-'' or ``->''), and a full duplex socket shows a double arrow
110: (``<->'').
111: .SH BUGS
112: Since
113: .I fstat
114: takes a snapshot of the system, it is only correct for a very short period
115: of time.
116: .SH "SEE ALSO"
117: netstat(1), ps(1), systat(1), stat(2), pstat(8)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.