2

we are tying to count all open files by lsof

lsof | wc -l
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/42/gvfs
      Output information may be incomplete.

but sill after 1 hour lsof not rerun answer ( like its stuck )

any other approach how to count all files ?

we have redhat 7.2 version

  • I guess we have also CLOSE_WAIT entries consumes kernel memory

second , we need to found which application is consume most of open files ,

shalom
  • 451
  • 12
  • 26

1 Answers1

1

Use -b option tells lsof not to use kernel functions that may block.

You can exclude the CLOSE_WAIT sockets using -iTCP -sTCP:^CLOSE_WAIT

lsof -b -iTCP -sTCP:^CLOSE_WAIT
suspectus
  • 548
  • 1
  • 4
  • 11