{"id":11438,"date":"2019-03-14T07:34:18","date_gmt":"2019-03-14T07:34:18","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=11438"},"modified":"2019-03-14T07:34:18","modified_gmt":"2019-03-14T07:34:18","slug":"procinfo-shows-system-statistics-from-proc-filesystem","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/procinfo-shows-system-statistics-from-proc-filesystem\/","title":{"rendered":"procinfo \u2013 Shows System Statistics from \/proc Filesystem"},"content":{"rendered":"<p>The\u00a0<a href=\"https:\/\/www.tecmint.com\/exploring-proc-file-system-in-linux\/\" target=\"_blank\" rel=\"noopener\">proc file system<\/a>\u00a0is a virtual file system that contains files that store information about processes and other system information. It is mapped to the\u00a0<code>\/proc<\/code>\u00a0directory and mounted at boot time. A number of programs retrieve information from\u00a0<strong>\/proc<\/strong>\u00a0file system, process it and provide it readily usable for various purposes.<\/p>\n<p><strong>Procinfo<\/strong>\u00a0is a simple command line utility for viewing system information collected from\u00a0<strong>\/proc<\/strong>\u00a0directory and prints it beautifully formatted on the standard output device. In this article, we will explain a number of\u00a0<strong>procinfo<\/strong>command examples in Linux.<\/p>\n<p>In most Linux distributions, the\u00a0<strong>procinfo<\/strong>\u00a0command should come pre-installed, if you don\u2019t have it, install it using following command.<\/p>\n<pre>$ sudo apt install procinfo\t\t#Debian\/Ubuntu\r\n$ sudo yum install procinfo\t\t#CentOS\/RHEL\r\n$ sudo dnf install procinfo\t\t#Fedora 22+\r\n<\/pre>\n<p>The simplest example is to run\u00a0<strong>procinfo<\/strong>\u00a0without any arguments as shown.<\/p>\n<pre><strong>$ procinfo<\/strong>\r\n\r\nMemory:        Total        Used        Free     Buffers                       \r\nRAM:         8069036     7693288      375748      301356                       \r\nSwap:        3906556           0     3906556                                   \r\n\r\nBootup: Mon Jun  4 11:09:45 2018   Load average: 0.35 0.84 1.01 1\/1021 15406   \r\n\r\nuser  :   01:09:12.02  13.4%  page in :          2434469                       \r\nnice  :   00:02:12.37   0.4%  page out:          2162544                       \r\nsystem:   00:15:17.34   3.0%  page act:          2395528                       \r\nIOwait:   00:39:04.09   7.6%  page dea:             3424                       \r\nhw irq:   00:00:00.00   0.0%  page flt:         20783328                       \r\nsw irq:   00:00:29.07   0.1%  swap in :                0                       \r\nidle  :   06:30:26.88  75.6%  swap out:                0                       \r\nuptime:   02:10:11.66         context :         51698643                       \r\n\r\nirq   0:         21  2-edge timer        irq  42:          0  466944-edge PCIe \r\nirq   1:       3823  1-edge i8042        irq  43:     193892  327680-edge xhci_\r\nirq   8:          1  8-edge rtc0         irq  44:     191759  512000-edge 0000:\r\nirq   9:       2175  9-fasteoi acpi      irq  45:    1021515  524288-edge enp1s\r\nirq  12:       6865  12-edge i8042       irq  46:     541926  32768-edge i915  \r\nirq  19:          0  19-fasteoi rtl_pc   irq  47:         14  360448-edge mei_m\r\nirq  23:         33  23-fasteoi ehci_h   irq  48:        344  442368-edge snd_h\r\nirq  40:          0  458752-edge PCIe    irq  49:        749  49152-edge snd_hd\r\nirq  41:          0  464896-edge PCIe                                          \r\n\r\nloop0              90r               0   loop4              14r               0\r\nloop1             159r               0   loop5            7945r               0\r\nloop2             214r               0   loop6             309r               0\r\nloop3              79r               0   sda           112544r           70687w\r\n\r\nenp1s0      TX 58.30MiB      RX 883.00MiB     vmnet8      TX 0.00B         RX 0.00B        \r\nlo          TX 853.65KiB     RX 853.65KiB     wlp2s0      TX 0.00B         RX 0.00B        \r\nvmnet1      TX 0.00B         RX 0.00B                                          \r\n<\/pre>\n<p><center>To print\u00a0<strong>memory stats<\/strong>\u00a0in human readable format (KiB, MiB, GiB), instead of the default Kbytes, use the\u00a0<code>-H<\/code>\u00a0flag.<\/center><\/p>\n<pre><strong>$ procinfo -H<\/strong>\r\n\r\nMemory:        Total        Used        Free     Buffers                       \r\nRAM:         7.70GiB     7.36GiB   344.27MiB   294.38MiB                       \r\nSwap:        3.73GiB       0.00B     3.73GiB                                   \r\n\r\nBootup: Mon Jun  4 11:09:45 2018   Load average: 0.61 0.84 1.00 2\/1017 15439   \r\n\r\nuser  :   01:09:21.25  13.3%  page in :          2434613                       \r\nnice  :   00:02:12.43   0.4%  page out:          2223808                       \r\nsystem:   00:15:19.82   2.9%  page act:          2416184                       \r\nIOwait:   00:39:08.21   7.5%  page dea:             3424                       \r\nhw irq:   00:00:00.00   0.0%  page flt:         20891258                       \r\nsw irq:   00:00:29.08   0.1%  swap in :                0                       \r\nidle  :   06:33:48.38  75.7%  swap out:                0                       \r\nuptime:   02:11:06.85         context :         51916194                       \r\n\r\nirq   0:         21  2-edge timer        irq  42:          0  466944-edge PCIe \r\nirq   1:       3985  1-edge i8042        irq  43:     196957  327680-edge xhci_\r\nirq   8:          1  8-edge rtc0         irq  44:     192411  512000-edge 0000:\r\nirq   9:       2196  9-fasteoi acpi      irq  45:    1021900  524288-edge enp1s\r\nirq  12:       6865  12-edge i8042       irq  46:     543742  32768-edge i915  \r\nirq  19:          0  19-fasteoi rtl_pc   irq  47:         14  360448-edge mei_m\r\nirq  23:         33  23-fasteoi ehci_h   irq  48:        344  442368-edge snd_h\r\nirq  40:          0  458752-edge PCIe    irq  49:        749  49152-edge snd_hd\r\nirq  41:          0  464896-edge PCIe                                          \r\n\r\nloop0              90r               0   loop4              14r               0\r\nloop1             159r               0   loop5            7945r               0\r\nloop2             214r               0   loop6             309r               0\r\nloop3              79r               0   sda           112568r           71267w\r\n\r\nenp1s0      TX 58.33MiB      RX 883.21MiB     vmnet8      TX 0.00B         RX 0.00B        \r\nlo          TX 854.18KiB     RX 854.18KiB     wlp2s0      TX 0.00B         RX 0.00B        \r\nvmnet1      TX 0.00B         RX 0.00B                                        \r\n<\/pre>\n<p>The\u00a0<strong>-d<\/strong>\u00a0flag allows for displaying statistics on a per-seconds basis rather than as total values.<\/p>\n<pre>$ procinfo -d \r\n<\/pre>\n<p>To display statistics as totals, use the\u00a0<code>-D<\/code>\u00a0flag as follows.<\/p>\n<pre>$ procinfo -D\r\n<\/pre>\n<p>You can get continues updates on the screen and pause updates for N number of second (for instance\u00a0<strong>5<\/strong>seconds in this command) using the\u00a0<code>-n<\/code>\u00a0flag and press\u00a0<code>q<\/code>\u00a0to quit in this mode.<\/p>\n<pre>$ procinfo -n5 -H\r\n<\/pre>\n<p>To report \u201c<strong>real<\/strong>\u201d free memory similar to that showed by the\u00a0<a href=\"https:\/\/www.tecmint.com\/check-memory-usage-in-linux\/\" target=\"_blank\" rel=\"noopener\">free utility<\/a>, use the\u00a0<code>-r<\/code>\u00a0option.<\/p>\n<pre>$ procinfo -r \r\n<\/pre>\n<p>To show numbers of bytes instead of number of I\/O requests, employ the\u00a0<code>-b<\/code>\u00a0option.<\/p>\n<pre>$ procinfo -b\r\n<\/pre>\n<p><strong>Procinfo<\/strong>\u00a0works interactively too, when run fullscreen, this allows you to use the\u00a0<strong>d<\/strong>,\u00a0<strong>D<\/strong>,\u00a0<strong>r<\/strong>\u00a0and\u00a0<strong>b<\/strong>\u00a0keys whose functions correspond to their same-named command line flags explained above.<\/p>\n<p>For more information, see the\u00a0<strong>procinfo<\/strong>\u00a0man page.<\/p>\n<pre>$ man procinfo \r\n<\/pre>\n<p>In this article, we have explained a number of\u00a0<strong>procinfo<\/strong>\u00a0command examples.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/procinfo-shows-proc-system-information\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0proc file system\u00a0is a virtual file system that contains files that store information about processes and other system information. It is mapped to the\u00a0\/proc\u00a0directory and mounted at boot time. A number of programs retrieve information from\u00a0\/proc\u00a0file system, process it and provide it readily usable for various purposes. Procinfo\u00a0is a simple command line utility for viewing &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/procinfo-shows-system-statistics-from-proc-filesystem\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;procinfo \u2013 Shows System Statistics from \/proc Filesystem&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11438","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=11438"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11438\/revisions"}],"predecessor-version":[{"id":11439,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11438\/revisions\/11439"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=11438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=11438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=11438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}