{"id":478,"date":"2012-07-04T16:50:25","date_gmt":"2012-07-04T08:50:25","guid":{"rendered":"http:\/\/rmohan.com\/?p=478"},"modified":"2012-07-04T16:50:25","modified_gmt":"2012-07-04T08:50:25","slug":"list-number-of-file-handles-open-files-for-each-process","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=478","title":{"rendered":"List number of file handles (open files) for each process"},"content":{"rendered":"<h3><a href=\"http:\/\/kb.yarmakconsulting.com\/2008\/05\/list-number-of-file-handles-open-files.html\">List number of file handles (open files) for each process<\/a><\/h3>\n<p>Here is a simple script that will show you a number of file handles (open files) used by each process on your Linux system:<\/p>\n<div><\/div>\n<p>ps -e|grep -v TTY|awk {&#8216;print &#8220;echo -n \\&#8221;Process: &#8220;$4&#8243;\\tPID: &#8220;$1&#8243;\\tNumber of FH: \\&#8221;; lsof -p &#8220;$1&#8243;|wc -l&#8221;&#8216;} &gt; out; . .\/out<\/p>\n","protected":false},"excerpt":{"rendered":"<p>List number of file handles (open files) for each process <\/p>\n<p>Here is a simple script that will show you a number of file handles (open files) used by each process on your Linux system:<\/p>\n<p>ps -e|grep -v TTY|awk {&#8216;print &#8220;echo -n \\&#8221;Process: &#8220;$4&#8243;\\tPID: &#8220;$1&#8243;\\tNumber of FH: \\&#8221;; lsof -p &#8220;$1&#8243;|wc -l&#8221;&#8216;} &gt; out; . .\/out<\/p>\n<p> [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/478"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=478"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/478\/revisions"}],"predecessor-version":[{"id":479,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/478\/revisions\/479"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}