Lsof

Lsof

lsof is a command meaning "list open files", which is used in many Unix-like systems to report a list of all open files and the processes that opened them. This open source utility was developed and supported by Vic Abell, the retired Associate Director of the Purdue University Computing Center. It works in and supports several UNIX flavors. [citation|title=Unix Network Programming: the Sockets networking API |author= W. Richard Stevens, Bill Fenner, Andrew M. Rudoff|year= 2003|publisher=Addison-Wesley Professional|url= http://books.google.com/books?vid=ISBN0131411551&id=ptSC4LpwGA0C&pg=RA1-PA897&lpg=RA1-PA897&ots=Kp7AQkfiSm&dq=Lsof&ie=ISO-8859-1&output=html&sig=bbb3jzTxdoa4IlTPpgUP17T7qVU|id=ISBN 0131411551]

Open files in the system include disk files, pipes, network sockets and devices opened by all processes. One use for this command is when a disk cannot be unmounted because (unspecified) files are in use. The listing of open files can be consulted (suitably filtered if necessary) to identify the process that is using the files.

# lsof /var COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME syslogd 350 root 5w VREG 222,5 0 440818 /var/adm/messages syslogd 350 root 6w VREG 222,5 339098 6248 /var/log/syslog cron 353 root cwd VDIR 222,5 512 254550 /var -- atjobs

See also

* stat (Unix)
* netstat
* strace
* List of Unix programs
* Process Explorer [http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx] from SysInternals - the equivalent for Windows (Find menu -> Find Handle or DLL)

References

External links

* [http://www.netadmintools.com/html/lsof.man.html lsof manpage on www.netadmintools.com]
* Vic Abell's [http://people.freebsd.org/~abe/ homepage] , author of lsof.
* Sam Nelson's [http://www.unix.ms/pcp/ PCP] script, an alternative to "lsof -i" for Solaris.
* [http://digitalprognosis.com/blog/2008/02/14/troubleshooting-running-systems-with-lsof/ Troubleshooting Running Systems with lsof]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Lsof — (от англ. LiSt of Open Files) утилита, служащая для вывода информации о том, какие файлы используются теми или иными процессами. Эта утилита имеется в очень многих UNIX‐подобных ОС, включая GNU/Linux с ядром версии 2.1.72 и выше, а также в HP UX …   Википедия

  • lsof — (Lista de archivos abiertos, en español) es una conocida herramienta de monitoreo de sistemas operativos tipo Unix que se utiliza para mostrar todos los archivos de disco que mantiene abiertos un determinado proceso (PID), incluyendo los sockets… …   Wikipedia Español

  • lsof — (от англ. LiSt of Open Files) утилита, служащая для вывода информации о том, какие файлы используются теми или иными процессами. Эта утилита имеется в очень многих UNIX ‐ подобных ОС, включая GNU/Linux с ядром версии 2.1.72 и выше, а также в …   Википедия

  • Lsof — Saltar a navegación, búsqueda lsof es una conocida herramienta de monitorización, que nos muestra todos los archivos que mantiene abiertos un determinado ID de proceso (PID), incluyendo los sockets abiertos. Captura de pantalla ayuda lsof… …   Wikipedia Español

  • Lsof (Unix) — lsof est une commande UNIX qui permet de lister les fichiers actuellement ouverts sur le système. Exemple : % lsof COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME init 1 root cwd unknown /proc/1/cwd (readlink: Permission denied) init 1 root… …   Wikipédia en Français

  • lsof (Unix) — lsof est une commande UNIX qui permet de lister les fichiers actuellement ouverts sur le système. Exemple : % lsof COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME init 1 root cwd unknown /proc/1/cwd (readlink: Permission denied) init 1 root… …   Wikipédia en Français

  • LSOF — LiSt Open Files (UNIX Tool) …   Acronyms

  • LSOF — LiSt Open Files (UNIX Tool) …   Acronyms von A bis Z

  • Commande UNIX — Commandes Unix Les systèmes d exploitation de type UNIX offrent à leurs utilisateurs des centaines de commandes qui font de la console un outil pratique et extrêmement puissant. Certaines d entre elles sont fournies directement par le shell,… …   Wikipédia en Français

  • Commande Unix — Commandes Unix Les systèmes d exploitation de type UNIX offrent à leurs utilisateurs des centaines de commandes qui font de la console un outil pratique et extrêmement puissant. Certaines d entre elles sont fournies directement par le shell,… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”