⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fstat.1

📁 早期freebsd实现
💻 1
字号:
.\" Copyright (c) 1987, 1991, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" 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.\" SUCH DAMAGE..\".\"     @(#)fstat.1	8.3 (Berkeley) 2/25/94.\".Dd February 25, 1994.Dt FSTAT 1.Os BSD 4.Sh NAME.Nm fstat.Nd file status.Sh SYNOPSIS.Nm fstat.Op Fl fnv.Op Fl M Ar core.Op Fl N Ar system.Op Fl p Ar pid.Op Fl u Ar user.Op Ar filename....Sh DESCRIPTION.Nm Fstatidentifies open files.A file is considered open by a process if it was explicitly opened,is the working directory, root directory, active pure text, or kerneltrace file for that process.If no options are specified,.Nm fstatreports on all open files in the system..PpOptions:.Bl -tag -width Ds.It Fl fRestrict examination to files open in the same filesystems asthe named file arguments, or to the filesystem containing thecurrent directory if there are no additional filename arguments.For example, to find all files open in the filesystem where thedirectory.Pa /usr/srcresides, type.Dq Li fstat -f /usr/src ..It Fl MExtract values associated with the name list from the specified coreinstead of the default.Pa /dev/kmem ..It Fl NExtract the name list from the specified system instead of the default.Pa /vmunix ..It Fl nNumerical format.  Print the device number (maj,min) of the filesystemthe file resides in rather than the mount point name; for specialfiles, print thedevice number that the special device refers to rather than the filenamein.Pa /dev ;and print the mode of the file in octal instead of symbolic form..It Fl pReport all files open by the specified process..It Fl uReport all files open by the specified user..It Fl vVerbose mode.  Print error messages upon failures to locate particularsystem data structures rather than silently ignoring them.  Most ofthese data structures are dynamically created or deleted and it ispossible for them to disappear while.Nm fstatis running.  Thisis normal and  unavoidable since the rest of the system is running while.Nm fstatitself is running..It Ar filename ...Restrict reports to the specified files..El.PpThe following fields are printed:.Bl -tag -width MOUNT.It Li USERThe username of the owner of the process (effective uid)..It Li CMDThe command name of the process..It Li PIDThe process id..It Li FDThe file number in the per-process open file table or one of the followingspecial names:.Pp.Bd -ragged -offset indent -compacttext	- pure text inodewd 	- current working directoryroot	- root inodetr	- kernel trace file.Ed.PpIf the file number is followed by an asterisk (``*''), the file isnot an inode, but rather a socket,.Tn FIFO ,or there is an error.In this case the remainder of the line doesn'tcorrespond to the remaining headers -- the format of the lineis described later under.Sx Sockets ..It Li MOUNTIf the.Fl nflag wasn't specified, this header is present and is thepathname that the filesystem the file resides in is mounted on..It Li DEVIf the.Fl nflag is specified, this header is present and is themajor/minor number of the device that this file resides in..It Li INUMThe inode number of the file..It Li MODEThe mode of the file.  If the.Fl nflag isn't specified, the mode is printedusing a symbolic format (see.Xr strmode 3 ) ;otherwise, the mode is printedas an octal number..It Li SZ\&|DVIf the file is not a character or block special, prints the size ofthe file in bytes.  Otherwise, if the.Fl nflag is not specified, printsthe name of the special file as located in.Pa /dev .If that cannot belocated, or the.Fl nflag is specified, prints the major/minor devicenumber that the special device refers to..It Li R/WThis column describes the access mode that the file allows.The letter ``r'' indicates open for reading;the letter ``w'' indicates open for writing.This field is useful when trying to find the processes that arepreventing a filesystem from being down graded to read-only..It Li NAMEIf filename arguments are specified and the.Fl fflag is not, thenthis field is present and is the name associated with the given file.Normally the name cannot be determined since there is no mappingfrom an open file back to the directory entry that was used to openthat file.  Also, since different directory entries may referencethe same file (via.Xr ln 2 ) ,the name printed may not be the actualname that the process originally used to open that file..El.Sh SOCKETSThe formating of open sockets depends on the protocol domain.In all cases the first field is the domain name, the second fieldis the socket type (stream, dgram, etc), and the third is the socketflags 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 domain sockets, its the address of the socket pcb and the addressof the connected pcb (if connected).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 ..PpFor example, the addresses mentioned above are the addresses which the.Dq Li netstat -Acommand would print for tcp, udp, and unixdomain.Note that since pipes are implemented using sockets, a pipe appears as aconnected unix domain stream socket.A unidirectional unix domain socket indicates the direction of flow withan arrow (``<-'' or ``->''), and a full duplex socket shows a double arrow(``<->'')..Sh BUGSSince.Nm fstattakes a snapshot of the system, it is only correct for a very short periodof time..Sh SEE ALSO.Xr netstat 1 ,.Xr nfsstat 1 ,.Xr ps 1 ,.Xr systat 1 ,.Xr vmstat 1 ,.Xr iostat 8 ,.Xr pstat 8.Sh HISTORYThe.Nmcommand appeared in.Bx 4.3 tahoe .

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -