lsof FD列等于DEL,是什么意思? [英] lsof FD column equal to DEL, what does it mean?

查看:786
本文介绍了lsof FD列等于DEL,是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在使用太多内存的进程.

I've a process which is using too much memory.

当我运行lsof -p <pid>时,输出为:

ETL-GRIB 5981 root  DEL    REG    8,4          183633075 /tmp/icom/65516_GRIB/20150921220023_6796_YTXG23EGRR211800__ln_3857.shp
ETL-GRIB 5981 root  DEL    REG    8,4          183633059 /tmp/icom/65516_GRIB/20150921220023_6796_YTXG23EGRR211800__pl_3857.shp
...

DEL是什么意思?可能是该进程在内存中但文件已被其他任何进程删除?

What DEL mean? It could be that the process has the file in memory but It has been deleted by any other process?

推荐答案

lsof通常报告TYPE列中带有mem的Linux /proc/<PID>/maps文件中的条目.但是,如果lsof无法stat(2)进程maps文件中的路径,并且maps file条目包含(deleted),表示该文件在打开后被删除,则lsof报告该文件.键入为DEL.

lsof usually reports entries from the Linux /proc/<PID>/maps file with mem in the TYPE column. However, when lsof can't stat(2) a path in the process maps file and the mapsfile entry contains (deleted), indicating the file was deleted after it had been opened, lsof reports the file type as DEL.

是的,仅这些文件在被进程读取后即被删除.如果您已更新/替换了这些文件,则可能要重新启动服务/进程.

Yes, Simply those files are deleted after they are read by the process. If you have updated/replaced those files then you probably want to restart the service/process.

这篇关于lsof FD列等于DEL,是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆