
{"id":16527,"date":"2016-09-15T19:01:36","date_gmt":"2016-09-15T19:01:36","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=16527"},"modified":"2016-09-15T19:01:36","modified_gmt":"2016-09-15T19:01:36","slug":"finding-the-number-of-processor-units","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2016\/09\/15\/finding-the-number-of-processor-units\/","title":{"rendered":"Finding the number of processor units"},"content":{"rendered":"<p><u>ABOUT nproc<\/u><\/p>\n<pre>\nprint the number of processing units available\n<\/pre>\n<p><u>TYPICAL COMMANDLINE SESSION<\/u><br \/>\n[bash]<br \/>\n$nproc<br \/>\n2<br \/>\n$nproc &#8211;ignore=1<br \/>\n1<br \/>\n$grep -c ^processor \/proc\/cpuinfo<br \/>\n2<br \/>\n$cat \/proc\/cpuinfo | awk &#8216;\/^processor\/{print $3=$3+1}&#8217; | tail -1<br \/>\n2<br \/>\n$cat \/proc\/cpuinfo | awk &#8216;\/^processor\/{print $3}&#8217;<br \/>\n0<br \/>\n1<br \/>\n$lscpu | grep CPU<br \/>\nCPU op-mode(s):        32-bit, 64-bit<br \/>\nCPU(s):                2<br \/>\nOn-line CPU(s) list:   0,1<br \/>\nCPU family:            21<br \/>\nCPU MHz:               2800.000<br \/>\nCPU max MHz:           3000.0000<br \/>\nCPU min MHz:           1400.0000<br \/>\nNUMA node0 CPU(s):     0,1<br \/>\n$lscpu | grep &quot;CPU(s)&quot;<br \/>\nCPU(s):                2<br \/>\nOn-line CPU(s) list:   0,1<br \/>\nNUMA node0 CPU(s):     0,1<br \/>\n$lscpu | grep &quot;CPU(s):&quot;<br \/>\nCPU(s):                2<br \/>\nNUMA node0 CPU(s):     0,1<br \/>\n$lscpu | grep ^&quot;CPU(s):&quot;<br \/>\nCPU(s):                2<br \/>\n$lscpu | awk &#8216;FNR == 4 {print $2}&#8217;<br \/>\n2<br \/>\n$<br \/>\n[\/bash]<br \/>\nLINKS<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_GNU_Core_Utilities_commands\">https:\/\/en.wikipedia.org\/wiki\/List_of_GNU_Core_Utilities_commands<\/a><br \/>\n<a href=\"http:\/\/man7.org\/linux\/man-pages\/man1\/nproc.1.html\">http:\/\/man7.org\/linux\/man-pages\/man1\/nproc.1.html<\/a><br \/>\n<a href=\"https:\/\/blog.dbi-services.com\/linux-how-to-monitor-the-nproc-limit-1\/\">https:\/\/blog.dbi-services.com\/linux-how-to-monitor-the-nproc-limit-1\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT nproc print the number of processing units available TYPICAL COMMANDLINE SESSION [bash] $nproc 2 $nproc &#8211;ignore=1 1 $grep -c ^processor \/proc\/cpuinfo 2 $cat \/proc\/cpuinfo | awk &#8216;\/^processor\/{print $3=$3+1}&#8217; | tail -1 2 $cat \/proc\/cpuinfo | awk &#8216;\/^processor\/{print $3}&#8217; 0 1 $lscpu | grep CPU CPU op-mode(s): 32-bit, 64-bit CPU(s): 2 On-line CPU(s) list: 0,1 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2016\/09\/15\/finding-the-number-of-processor-units\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Finding the number of processor units&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[599,1183],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16527"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=16527"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/16527\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=16527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=16527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=16527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}