热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

lsof列出的FD管道列是什么意思?-WhatdoestheFDcolumnofpipeslistedbylsofmean?

Imusingthefollowingcommandtogetalistofpipes:我正在使用以下命令获取管道列表:lsof|grepPIPEIwant

I'm using the following command to get a list of pipes:

我正在使用以下命令获取管道列表:

lsof | grep PIPE 

I want to know what the values of the FD column mean (the 5th one http://i.imgur.com/KHczptf.png). I think that r and w mean read and write, respectively, but what does the number which follows each of these chars means?

我想知道FD列的值是什么意思(第5页http://i.imgur.com/KHczptf.png)。我认为r和w分别表示读写,但每个这些字符后面的数字是什么意思?


I know that FD means File Descriptor, what I want to figure out is what means the values shown in the column, like the 3r, 16w, 20r, etc.

我知道FD意味着文件描述符,我想弄清楚的是列中显示的值是什么意思,比如3r,16w,20r等。

2 个解决方案

#1


9  

Files are not only opened as streams. Some of those are listed in lsof's manual:

文件不仅作为流打开。其中一些列在lsof的手册中:

FD    is the File Descriptor number of the file or:

           cwd  current working directory;
           Lnn  library references (AIX);
           err  FD information error (see NAME column);
           jld  jail directory (FreeBSD);
           ltx  shared library text (code and data);
           Mxx  hex memory-mapped type number xx.
           m86  DOS Merge mapped file;
           mem  memory-mapped file;
           mmap memory-mapped device;
           pd   parent directory;
           rtd  root directory;
           tr   kernel trace file (OpenBSD);
           txt  program text (code and data);
           v86  VP/ix mapped file;

      FD  is  followed  by one of these characters, describing the
      mode under which the file is open:

           r for read access;
           w for write access;
           u for read and write access;
           space if mode unknown and no lock
            character follows;
           '-' if mode unknown and lock
            character follows.

      The mode character is followed by one of these lock  charac-
      ters, describing the type of lock applied to the file:

           N for a Solaris NFS lock of unknown type;
           r for read lock on part of the file;
           R for a read lock on the entire file;
           w for a write lock on part of the file;
           W for a write lock on the entire file;
           u for a read and write lock of any length;
           U for a lock of unknown type;
           x  for an SCO OpenServer Xenix lock on part  of the
      file;
           X for an SCO OpenServer Xenix lock on  the   entire
      file;
           space if there is no lock.

      See  the  LOCKS  section  for  more  information on the lock
      information character.

      The FD column contents constitutes a single field for  pars-
      ing in post-processing scripts.

#2


0  

That is file descriptor.

那是文件描述符。

More on it:

更多信息:

  • http://en.wikipedia.org/wiki/File_descriptor

File descriptor (FD) is an abstract indicator for accessing a file. The term is generally used in POSIX operating systems.

文件描述符(FD)是用于访问文件的抽象指示符。该术语通常用于POSIX操作系统。

In POSIX, a file descriptor is an integer, specifically of the C type int. There are three standard POSIX file descriptors, corresponding to the three standard streams, which presumably every process (save perhaps a daemon) should expect to have.

在POSIX中,文件描述符是一个整数,特别是C类型int。有三个标准POSIX文件描述符,对应于三个标准流,可能是每个进程(可能保存一个守护进程)应该具有的。


推荐阅读
  • Nginx使用(server参数配置)
    本文介绍了Nginx的使用,重点讲解了server参数配置,包括端口号、主机名、根目录等内容。同时,还介绍了Nginx的反向代理功能。 ... [详细]
  • android listview OnItemClickListener失效原因
    最近在做listview时发现OnItemClickListener失效的问题,经过查找发现是因为button的原因。不仅listitem中存在button会影响OnItemClickListener事件的失效,还会导致单击后listview每个item的背景改变,使得item中的所有有关焦点的事件都失效。本文给出了一个范例来说明这种情况,并提供了解决方法。 ... [详细]
  • 本文介绍了在mac环境下使用nginx配置nodejs代理服务器的步骤,包括安装nginx、创建目录和文件、配置代理的域名和日志记录等。 ... [详细]
  • 开发笔记:实验7的文件读写操作
    本文介绍了使用C++的ofstream和ifstream类进行文件读写操作的方法,包括创建文件、写入文件和读取文件的过程。同时还介绍了如何判断文件是否成功打开和关闭文件的方法。通过本文的学习,读者可以了解如何在C++中进行文件读写操作。 ... [详细]
  • 本文详细介绍了GetModuleFileName函数的用法,该函数可以用于获取当前模块所在的路径,方便进行文件操作和读取配置信息。文章通过示例代码和详细的解释,帮助读者理解和使用该函数。同时,还提供了相关的API函数声明和说明。 ... [详细]
  • 本文介绍了Python高级网络编程及TCP/IP协议簇的OSI七层模型。首先简单介绍了七层模型的各层及其封装解封装过程。然后讨论了程序开发中涉及到的网络通信内容,主要包括TCP协议、UDP协议和IPV4协议。最后还介绍了socket编程、聊天socket实现、远程执行命令、上传文件、socketserver及其源码分析等相关内容。 ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • eclipse学习(第三章:ssh中的Hibernate)——11.Hibernate的缓存(2级缓存,get和load)
    本文介绍了eclipse学习中的第三章内容,主要讲解了ssh中的Hibernate的缓存,包括2级缓存和get方法、load方法的区别。文章还涉及了项目实践和相关知识点的讲解。 ... [详细]
  • 本文介绍了为什么要使用多进程处理TCP服务端,多进程的好处包括可靠性高和处理大量数据时速度快。然而,多进程不能共享进程空间,因此有一些变量不能共享。文章还提供了使用多进程实现TCP服务端的代码,并对代码进行了详细注释。 ... [详细]
  • 计算机存储系统的层次结构及其优势
    本文介绍了计算机存储系统的层次结构,包括高速缓存、主存储器和辅助存储器三个层次。通过分层存储数据可以提高程序的执行效率。计算机存储系统的层次结构将各种不同存储容量、存取速度和价格的存储器有机组合成整体,形成可寻址存储空间比主存储器空间大得多的存储整体。由于辅助存储器容量大、价格低,使得整体存储系统的平均价格降低。同时,高速缓存的存取速度可以和CPU的工作速度相匹配,进一步提高程序执行效率。 ... [详细]
  • 个人学习使用:谨慎参考1Client类importcom.thoughtworks.gauge.Step;importcom.thoughtworks.gauge.T ... [详细]
  • 本文讨论了clone的fork与pthread_create创建线程的不同之处。进程是一个指令执行流及其执行环境,其执行环境是一个系统资源的集合。在调用系统调用fork创建一个进程时,子进程只是完全复制父进程的资源,这样得到的子进程独立于父进程,具有良好的并发性。但是二者之间的通讯需要通过专门的通讯机制,另外通过fork创建子进程系统开销很大。因此,在某些情况下,使用clone或pthread_create创建线程可能更加高效。 ... [详细]
  • 解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法
    本文介绍了解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法,包括检查location配置是否正确、pass_proxy是否需要加“/”等。同时,还介绍了修改nginx的error.log日志级别为debug,以便查看详细日志信息。 ... [详细]
  • 31.项目部署
    目录1一些概念1.1项目部署1.2WSGI1.3uWSGI1.4Nginx2安装环境与迁移项目2.1项目内容2.2项目配置2.2.1DEBUG2.2.2STAT ... [详细]
author-avatar
137381372_e57647
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有