lsof

lsof

 英

  • 网络显示打开用户目录的进程;查找打开的文件;使用介绍

例句

The lsof and fuser commands make it easy to identify the processes that are preventing you from unmounting a file system.

lsoffuser命令有助于识别阻止文件系统卸载进程

Depending on the operating system, lsof might be able to grab the name of the file from kernel memory.

不同操作系统lsof可能可以核心内存捕获文件名称

As a systems administrator, lsof lets you peer into kernel memory to find out how the system is currently using these files.

作为系统管理员lsof允许核心内存进行查看找出系统当前如何使用这些文件

If you suspect an application is running out of file descriptors, you can use lsof to count the number of files open to verify.

如果怀疑应用程序耗尽文件描述符那么可以使用lsof统计打开文件数目进行验证

The utility to do so is called lsof, which means "list open files. "

完成任务实用程序称为lsof对应listopenfiles”(列出打开文件)。

You can use lsof to show all open files on a file system by specifying the name of the mount point.

通过指定装入名称可以使用lsof显示一个文件系统所有打开文件

Completes or hangs. If it hangs, then lsof will probably hang, too, and you should try to discover why ls hangs.

正常完成如果那么lsof命令可能我们应该预先查找ls命令原因

Listing 2 contains a script that uses lsof and netstat to show the system's current port usage in an easily readable format.

清单2包含一个使用lsofnetstat脚本用来以一种容易阅读格式显示系统当前端口使用情况

The simplest uses of lsof tell you which process has what files open and which files are opened by what process.

lsof简单用法可以告诉哪些进程打开哪些文件以及哪些文件哪些进程打开

The rest of this article focuses on using lsof to display only the information you need and how to interpret it properly.

本文余下部分重点关注如何使用lsof显示信息以及如何正确地进行解释

See Resources for information about obtaining lsof for your system.

关于获取适合自己系统lsof信息参见参考资料

You later discovered that lsof shows the file descriptor of a process and the associated file name.

随后内容看到lsof可以显示进程文件描述符相关文件

If you're interested in knowing what files the processes owned by a particular login name have open, lsof can help.

如果兴趣了解一个特定登陆用户拥有进程打开文件lsof能够告诉

Earlier I showed you how simply running lsof without any parameters dumps information about every open file belonging to every process.

前面介绍如何简单地运行不带任何参数lsof以便显示关于每个进程打开文件信息

To solve this, you need to use a command called lsof, which may need to be installed separately.

解决无法问题需要一个叫做lsof命令命令需要单独安装

Using lsof can help you further determine which threads are accessing which files.

使用lsof可以进一步帮助确定哪些线程正在访问哪些文件

lsof - list open files, network connections and much more.

lsof—列出开放文件网络连接以及更多

The lsof utility uses this information and other knowledge about the kernel's internals to produce its output.

lsof实用程序使用信息其他关于内核内部状态信息产生输出

Nmap, netstat, and lsof are the most helpful tools.

netstatlsof非常有用工具

Network connections are also files, which means that lsof can also get information about them.

网络连接也是文件意味可以使用lsof获得关于它们信息

For information about obtaining lsof, see the Resources section.

获取更多关于lsof信息请参见参考资料部分

The following appendices describe the lsof options in detail.

下面详细描述lsof命令参数

Listing 2 specifies three parameters to lsof.

清单2lsof指定三个参数

In addition to seeing what daemons are listening, lsof can also spy on what connections are happening, again using the -i parameter.

除了显示这些守护进程正在监听对象lsof可以发现发生连接同样使用-i参数

If possible you should have a spare set of common programs such as ps, ls, if config, perhaps lsof, etc. , on a secure host.

如果可能的话应该一个共同方案一套备用ps,ls使用ifconfig也许lsof主机安全

Listing 17 provides an example of lsof, an external command.

清单17外部命令lsof示例

Lsof needs a recompile to work with linux 2. 2.

lsof需要重新编译Linux2.2一起工作

You may want to consider upgrading other software such as openssl, openssh, lsof, etc at this stage.

也许这个阶段考虑升级其他软件比如opensslopensshlsof

Listing 1. Sample output of lsof

清单1.lsof示例输出