linux – 如何使用bash命令列出进程使用的管道
发布时间:2020-12-14 02:09:35 所属栏目:Linux 来源:网络整理
导读:有没有办法列出正在运行的 linux进程使用的管道(例如,给定它的pid或进程名称)并确定它们的已用容量? 就像是: lspipes -l -p pid 导致类似于: [rw] descriptor size name 其中rw是管端类型,大小是其使用容量 或类似的东西 解决方法 1)ls -l / proc / pid /
有没有办法列出正在运行的
linux进程使用的管道(例如,给定它的pid或进程名称)并确定它们的已用容量?
就像是: lspipes -l -p pid 导致类似于: [rw] descriptor size name 其中rw是管端类型,大小是其使用容量 或类似的东西 解决方法
1)ls -l / proc / pid / fd
这将列出管道 lr-x------ 1 prabagaran prabagaran 64 Sep 5 23:01 14 -> pipe:[57729] l-wx------ 1 prabagaran prabagaran 64 Sep 5 23:01 15 -> pipe:[57728] lr-x------ 1 prabagaran prabagaran 64 Sep 5 23:01 16 -> pipe:[57731] lr-x------ 1 prabagaran prabagaran 64 Sep 5 23:01 17 -> pipe:[57730] 2)lsof | grep 57731 wineserve 3641 prabagaran 76w FIFO 0,8 0t0 57731 pipe winedevic 3651 prabagaran 16r FIFO 0,8 0t0 57731 pipe 这些是与给定进程ID相关的管道信息. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |