When I am doing lsof -l
it shows all open file descriptors (~180000), but when I am checking lsof -lp pid
shows only ~1000. I know that process with pid pid
has ~170000 file descriptors open.
Here are logs:
root@riak:/proc/3238# lsof -l | grep 3238 | wc -l
172923
root@riak:/proc/3238# lsof -lp 3238 | wc -l
1075
root@riak:/proc/3238# ls -la | wc -l
44
root@riak:/proc/3238# ls -la fd | wc -l
924
Why there is such difference?