{"id":3845,"date":"2014-06-18T05:47:53","date_gmt":"2014-06-18T03:47:53","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/"},"modified":"2014-06-18T05:47:53","modified_gmt":"2014-06-18T03:47:53","slug":"linux-how-to-monitor-the-nofiles-limit","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/","title":{"rendered":"Linux: how to monitor the nofile limit"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nIn a <a href=\"\/linux-how-to-monitor-the-nproc-limit-1\">previous post<\/a> I explained how to measure the number of processes that are generated when a fork() or clone() call checks the nproc limit. There is another limit in \/etc\/limits.conf &#8211; or in \/etc\/limits.d &#8211; that is displayed by &#8216;ulimit -n&#8217;. It&#8217;s the number of open files &#8211; &#8216;nofile&#8217; &#8211; and here again we need to know what kind of files are counted.<\/p>\n<h3>nofile<\/h3>\n<p>&#8216;nofile&#8217; is another limit that may not be easy to monitor, because if you just count the &#8216;lsof&#8217; output you will include a lot of lines which are not file descriptors. So how can we count the number of files descriptors in a process?<\/p>\n<h3>lsof<\/h3>\n<p>&#8216;lsof&#8217; is a utility that show all the open files. Let&#8217;s take an example:<\/p>\n<p>I get the pid of my pmon process:<\/p>\n<pre><code>[oracle@VM211 ulimit]$ ps -edf | grep pmon\noracle   10586     1  0 19:21 ?        00:00:02 ora_pmon_DEMO\noracle   15494 15290  0 22:12 pts\/1    00:00:00 grep pmon\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>And I list the open files for that process<\/p>\n<pre><code>[oracle@VM211 ulimit]$ lsof -p 10586\nCOMMAND     PID   USER   FD TYPE DEVICE  SIZE\/OFF NAME\nora_pmon_ 10586 oracle  cwd  DIR  252,0      4096 \/app\/oracle\/product\/12.1\/dbs\nora_pmon_ 10586 oracle  rtd  DIR  252,0      4096 \/\nora_pmon_ 10586 oracle  txt  REG  252,0 322308753 \/app\/oracle\/product\/12.1\/bin\/oracle\nora_pmon_ 10586 oracle  mem  REG   0,17   4194304 \/dev\/shm\/ora_DEMO_150175744_0\nora_pmon_ 10586 oracle  mem  REG   0,17   4194304 \/dev\/shm\/ora_DEMO_150208513_0\nora_pmon_ 10586 oracle  mem  REG   0,17   4194304 \/dev\/shm\/ora_DEMO_150208513_1\nora_pmon_ 10586 oracle  mem  REG   0,17   4194304 \/dev\/shm\/ora_DEMO_150208513_2\nora_pmon_ 10586 oracle  mem  REG   0,17   4194304 \/dev\/shm\/ora_DEMO_150208513_3\nora_pmon_ 10586 oracle  mem  REG   0,17   4194304 \/dev\/shm\/ora_DEMO_150208513_4\nora_pmon_ 10586 oracle  mem  REG   0,17   4194304 \/dev\/shm\/ora_DEMO_150208513_5\n...\nora_pmon_ 10586 oracle  mem  REG  252,0   1135194 \/app\/oracle\/product\/12.1\/lib\/libskgxp12.so\nora_pmon_ 10586 oracle  mem  REG  252,0   6776936 \/app\/oracle\/product\/12.1\/lib\/libcell12.so\nora_pmon_ 10586 oracle  mem  REG  252,0     14597 \/app\/oracle\/product\/12.1\/lib\/libodmd12.so\nora_pmon_ 10586 oracle    0r CHR    1,3       0t0 \/dev\/null\nora_pmon_ 10586 oracle    1w CHR    1,3       0t0 \/dev\/null\nora_pmon_ 10586 oracle    2w CHR    1,3       0t0 \/dev\/null\nora_pmon_ 10586 oracle    3r CHR    1,3       0t0 \/dev\/null\nora_pmon_ 10586 oracle    4r REG  252,0   1233408 \/app\/oracle\/product\/12.1\/rdbms\/mesg\/oraus.msb\nora_pmon_ 10586 oracle    5r DIR    0,3         0 \/proc\/10586\/fd\nora_pmon_ 10586 oracle    6u REG  252,0      1544 \/app\/oracle\/product\/12.1\/dbs\/hc_DEMO.dat\nora_pmon_ 10586 oracle    7u REG  252,0        24 \/app\/oracle\/product\/12.1\/dbs\/lkDEMO_SITE1\nora_pmon_ 10586 oracle    8r REG  252,0   1233408 \/app\/oracle\/product\/12.1\/rdbms\/mesg\/oraus.msb\n\n<\/code><\/pre>\n<p>I&#8217;ve removed hundreds of lines with FD=mem and size=4M. I&#8217;m in AMM with memory_target=800M and SGA is implemented in \/dev\/shm granules. With lsof, we see all of them. And with a large memory_target we can have thousands of them (even if granule becomes 16M when memory_target is larger than 1GB). But don&#8217;t worry, they don&#8217;t count in the &#8216;nofile&#8217; limit. Only &#8216;real&#8217; file descriptors are counted &#8211; those with a numeric FD.<\/p>\n<p>So, if you want to know the processes that are near the limit, you can use the following:<\/p>\n<pre><code>[oracle@VM211 ulimit]$ lsof | awk '$4 ~ \/[0-9]+[rwu -].*\/{p[$1\"t\"$2\"t\"$3]=p[$1\"t\"$2\"t\"$3]+1}END{for (i in p) print p[i],i}' | sort -n | tail\n15 ora_dmon_    10634   oracle\n16 ora_dbw0_    10608   oracle\n16 ora_mmon_    10626   oracle\n16 ora_rsm0_    10722   oracle\n16 tnslsnr      9785    oracle\n17 automount    1482    root\n17 dbus-daem    1363    dbus\n20 rpc.mount    1525    root\n21 ora_lgwr_    10610   oracle\n89 master       1811    root\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>The idea is to filter the output of lsof and use awk to keep only the numeric file descriptors, and aggregate per process. Then, we sort them and show the highest counts. Here the Postfix master process has 89 files open. Then log writer follows.<\/p>\n<p>You can get the same information from \/proc filesystem where files handles are in \/proc\/\/fd:<\/p>\n<pre><code>for p in \/proc\/[0-9]* ; do echo $(ls $p\/fd | wc -l) $(cat $p\/cmdline) ; done | sort -n | tail\n<\/code><\/pre>\n<pre><code>15 ora_dmon_DEMO\n16 ora_dbw0_DEMO\n16 ora_mmon_DEMO\n16 ora_rsm0_DEMO\n16 \/app\/oracle\/product\/12.1\/bin\/tnslsnrLISTENER-inherit\n17 automount--pid-file\/var\/run\/autofs.pid\n17 dbus-daemon--system\n20 rpc.mountd\n21 ora_lgwr_DEMO\n89 \/usr\/libexec\/postfix\/master<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Same result, much quicker and more information about the process. This is the way I prefer, but remember that if you want to see all processes, you should be logged as root.<\/p>\n<h3>The proof<\/h3>\n<p>As I did for nproc, I have written a small C program that open files (passed as arguments) for a few seconds, so that I&#8217;m sure I&#8217;m counting the right things.<\/p>\n<p>And I encourage to do the same on a test system and let me know if your result differs. Here is the source:\u00a0<a title=\"title\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/139\/openfiles.zip\" target=\"_self\" rel=\"noopener noreferrer\">openfiles.zip<\/a><\/p>\n<p>First, I set my nofile limit to only 10<\/p>\n<pre><code>ulimit -n 10<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Then, let&#8217;s open 7 files. In addition with stdin, stdout and stderr we will have 10 file handles:<\/p>\n<pre><code>[oracle@VM211 ulimit]$ .\/openfiles myfile1.tmp myfile2.tmp myfile3.tmp myfile4.tmp myfile5.tmp myfile6.tmp myfile7.tmp &amp;\nopen file 1 of 7 getrlimit nofile: soft=10 hard=10 myfile1.tmp\nopen file 2 of 7 getrlimit nofile: soft=10 hard=10 myfile2.tmp\nopen file 3 of 7 getrlimit nofile: soft=10 hard=10 myfile3.tmp\nopen file 4 of 7 getrlimit nofile: soft=10 hard=10 myfile4.tmp\nopen file 5 of 7 getrlimit nofile: soft=10 hard=10 myfile5.tmp\nopen file 6 of 7 getrlimit nofile: soft=10 hard=10 myfile6.tmp\nopen file 7 of 7 getrlimit nofile: soft=10 hard=10 myfile7.tmp\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>I was able to open those 7 files. Then I check lsof:<\/p>\n<pre><code>[oracle@VM211 ulimit]$ lsof | grep openfiles\nopenfiles 21853    oracle  cwd       DIR  0,24    380928    9320 \/tmp\/ulimit\nopenfiles 21853    oracle  rtd       DIR 252,0      4096       2 \/\nopenfiles 21853    oracle  txt       REG  0,24      7630    9494 \/tmp\/ulimit\/openfiles\nopenfiles 21853    oracle  mem       REG 252,0    156928 1579400 \/lib64\/ld-2.12.so\nopenfiles 21853    oracle  mem       REG 252,0   1926800 1579401 \/lib64\/libc-2.12.so\nopenfiles 21853    oracle    0u      CHR 136,1       0t0       4 \/dev\/pts\/1\nopenfiles 21853    oracle    1u      CHR 136,1       0t0       4 \/dev\/pts\/1\nopenfiles 21853    oracle    2u      CHR 136,1       0t0       4 \/dev\/pts\/1\nopenfiles 21853    oracle    3r      REG  0,24         0    9487 \/tmp\/myfile1.tmp\nopenfiles 21853    oracle    4r      REG  0,24         0    9488 \/tmp\/myfile2.tmp\nopenfiles 21853    oracle    5r      REG  0,24         0    9489 \/tmp\/myfile3.tmp\nopenfiles 21853    oracle    6r      REG  0,24         0    9490 \/tmp\/myfile4.tmp\nopenfiles 21853    oracle    7r      REG  0,24         0    9491 \/tmp\/myfile5.tmp\nopenfiles 21853    oracle    8r      REG  0,24         0    9492 \/tmp\/myfile6.tmp\nopenfiles 21853    oracle    9r      REG  0,24         0    9493 \/tmp\/myfile7.tmp\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>We see our 10 file handles and this proves that only numeric FD are counted when checking the nofile limit of 10. You see stdin, stdout, stderr as FD 0,1,2 and then my 7 files opened in read only.<\/p>\n<p>Let&#8217;s try to open one more file:<\/p>\n<pre><code>[oracle@VM211 ulimit]$ .\/openfiles myfile1.tmp myfile2.tmp myfile3.tmp myfile4.tmp myfile5.tmp myfile6.tmp myfile7.tmp myfile8.tmp\nopen file 1 of 8 getrlimit nofile: soft=10 hard=10 myfile1.tmp\nopen file 2 of 8 getrlimit nofile: soft=10 hard=10 myfile2.tmp\nopen file 3 of 8 getrlimit nofile: soft=10 hard=10 myfile3.tmp\nopen file 4 of 8 getrlimit nofile: soft=10 hard=10 myfile4.tmp\nopen file 5 of 8 getrlimit nofile: soft=10 hard=10 myfile5.tmp\nopen file 6 of 8 getrlimit nofile: soft=10 hard=10 myfile6.tmp\nopen file 7 of 8 getrlimit nofile: soft=10 hard=10 myfile7.tmp\nopen file 8 of 8 getrlimit nofile: soft=10 hard=10 myfile8.tmp\nfopen() number 8 failed with errno=24\n<\/code><\/pre>\n<p>Here the limit is reached and the open() call returns error 24 (ENFILE) because we reached the nofile=10.<\/p>\n<h3>Threads<\/h3>\n<p>When counting the processes for the nproc limit, we have seen that threads must be counted as processes. For the nofile limit we don&#8217;t need to detail the threads because all threads share the file descriptor table.<\/p>\n<h3>Recommended values<\/h3>\n<p>Currently this is what is set on Oracle linux 6 for 11gR2 (in \/etc\/security\/limits.conf):<\/p>\n<pre><code>oracle   soft   nofile    1024\noracle   hard   nofile    65536\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>For 12c, these are set in \/etc\/security\/limits.d\/oracle-rdbms-server-12cR1-preinstall.conf which overrides \/etc\/security\/limits.conf:<\/p>\n<pre><code>oracle soft nofile 1024\noracle hard nofile 65536\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Do you think it&#8217;s a bit low? Just for information, here is what is set in the ODA X4-2:<\/p>\n<pre><code>oracle soft nofile 131072\n<\/code><\/pre>\n<p>In any case, it is a good idea to check if you are reaching the limit and the above scripts on lsof or \/proc should help for that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . In a previous post I explained how to measure the number of processes that are generated when a fork() or clone() call checks the nproc limit. There is another limit in \/etc\/limits.conf &#8211; or in \/etc\/limits.d &#8211; that is displayed by &#8216;ulimit -n&#8217;. It&#8217;s the number of open files &#8211; &#8216;nofile&#8217; [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[42,59],"tags":[46,96,17,74],"type_dbi":[],"class_list":["post-3845","post","type-post","status-publish","format-standard","hentry","category-operating-systems","category-oracle","tag-linux-unix","tag-oracle","tag-oracle-11g","tag-oracle-linux"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Linux: how to monitor the nofile limit - dbi Blog<\/title>\n<meta name=\"description\" content=\"How to monitor &#039;nofile&#039; limit: &#039;nofile&#039; is another limit that may not be easy to monitor, because if you just count the &#039;lsof&#039; output you will include a lot of lines which are not file descriptors.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux: how to monitor the nofile limit\" \/>\n<meta property=\"og:description\" content=\"How to monitor &#039;nofile&#039; limit: &#039;nofile&#039; is another limit that may not be easy to monitor, because if you just count the &#039;lsof&#039; output you will include a lot of lines which are not file descriptors.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-18T03:47:53+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Linux: how to monitor the nofile limit\",\"datePublished\":\"2014-06-18T03:47:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/\"},\"wordCount\":641,\"commentCount\":0,\"keywords\":[\"Linux\/UNIX\",\"Oracle\",\"Oracle 11g\",\"Oracle Linux\"],\"articleSection\":[\"Operating systems\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/\",\"name\":\"Linux: how to monitor the nofile limit - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2014-06-18T03:47:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"How to monitor 'nofile' limit: 'nofile' is another limit that may not be easy to monitor, because if you just count the 'lsof' output you will include a lot of lines which are not file descriptors.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux: how to monitor the nofile limit\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Linux: how to monitor the nofile limit - dbi Blog","description":"How to monitor 'nofile' limit: 'nofile' is another limit that may not be easy to monitor, because if you just count the 'lsof' output you will include a lot of lines which are not file descriptors.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/","og_locale":"en_US","og_type":"article","og_title":"Linux: how to monitor the nofile limit","og_description":"How to monitor 'nofile' limit: 'nofile' is another limit that may not be easy to monitor, because if you just count the 'lsof' output you will include a lot of lines which are not file descriptors.","og_url":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/","og_site_name":"dbi Blog","article_published_time":"2014-06-18T03:47:53+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Linux: how to monitor the nofile limit","datePublished":"2014-06-18T03:47:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/"},"wordCount":641,"commentCount":0,"keywords":["Linux\/UNIX","Oracle","Oracle 11g","Oracle Linux"],"articleSection":["Operating systems","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/","url":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/","name":"Linux: how to monitor the nofile limit - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2014-06-18T03:47:53+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"How to monitor 'nofile' limit: 'nofile' is another limit that may not be easy to monitor, because if you just count the 'lsof' output you will include a lot of lines which are not file descriptors.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/linux-how-to-monitor-the-nofiles-limit\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Linux: how to monitor the nofile limit"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=3845"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/3845\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=3845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=3845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=3845"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=3845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}