{"id":13887,"date":"2019-04-06T13:42:14","date_gmt":"2019-04-06T13:42:14","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13887"},"modified":"2019-04-06T13:42:14","modified_gmt":"2019-04-06T13:42:14","slug":"linfo-shows-linux-server-health-status-in-real-time","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/linfo-shows-linux-server-health-status-in-real-time\/","title":{"rendered":"Linfo \u2013 Shows Linux Server Health Status in Real-Time"},"content":{"rendered":"<p><strong>Linfo<\/strong>\u00a0is a free and open source, cross-platform server statistics UI\/library which displays a great deal of system information. It is extensible, easy-to-use (via composer) PHP5 library to get extensive system statistics programmatically from your PHP application. It\u2019s a Ncurses CLI view of Web UI, which works in Linux, Windows, *BSD, Darwin\/Mac OSX, Solaris, and Minix.<\/p>\n<p>It displays system info including\u00a0<a href=\"https:\/\/www.tecmint.com\/corefreq-linux-cpu-monitoring-tool\/\" target=\"_blank\" rel=\"noopener noreferrer\">CPU type\/speed<\/a>; architecture, mount point usage, hard\/optical\/flash drives, hardware devices, network devices and stats, uptime\/date booted, hostname, memory usage (RAM and swap, if possible), temperatures\/voltages\/fan speeds and RAID arrays.<\/p>\n<h4>Requirements:<\/h4>\n<ul>\n<li>PHP 5.3<\/li>\n<li>pcre extension<\/li>\n<li>Linux \u2013 \/proc and \/sys mounted and readable by PHP and Tested with the 2.6.x\/3.x kernels<\/li>\n<\/ul>\n<h3>How to Install Linfo Server Stats UI\/library in Linux<\/h3>\n<p>First, create a\u00a0<strong>Linfo<\/strong>\u00a0directory in your Apache or Nginx web root directory, then clone and move repository files into\u00a0<code>\/var\/www\/html\/linfo<\/code>\u00a0using the\u00a0<a href=\"https:\/\/www.tecmint.com\/rsync-local-remote-file-synchronization-commands\/\" target=\"_blank\" rel=\"noopener noreferrer\">rsync command<\/a>\u00a0as shown below:<\/p>\n<pre>$ sudo mkdir -p \/var\/www\/html\/linfo \r\n$ git clone git:\/\/github.com\/jrgp\/linfo.git \r\n$ sudo rsync -av linfo\/ \/var\/www\/html\/linfo\/\r\n<\/pre>\n<p>Then rename\u00a0<strong>sample.config.inc.php<\/strong>\u00a0to\u00a0<strong>config.inc.php<\/strong>. This is the Linfo config file, you can define your own values in it:<\/p>\n<pre>$ sudo mv sample.config.inc.php config.inc.php \r\n<\/pre>\n<p>Now open the URL\u00a0<code>http:\/\/SERVER_IP\/linfo<\/code>\u00a0in web browser to see the Web UI as shown in the screenshots below.<\/p>\n<p>This screenshot shows the Linfo Web UI displaying core system info, hardware components, RAM stats, network devices, drives and file system mount points.<\/p>\n<div id=\"attachment_25660\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Health-Information.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25660\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Health-Information.png\" sizes=\"auto, (max-width: 1241px) 100vw, 1241px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Health-Information.png 1241w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Health-Information-768x638.png 768w\" alt=\"Linux Server Health Information\" width=\"1241\" height=\"1031\" aria-describedby=\"caption-attachment-25660\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-25660\" class=\"wp-caption-text\">Linux Server Health Information<\/p>\n<\/div>\n<p>You can add the line below in the config file\u00a0<code>config.inc.php<\/code>\u00a0to yield useful error messages for troubleshooting purposes:<\/p>\n<pre>$settings['show_errors'] = true;\r\n<\/pre>\n<h3>Running Linfo in Ncurses Mode<\/h3>\n<p>Linfo has a simple ncurses-based interface, which rely on php\u2019s ncurses extension.<\/p>\n<pre># yum install php-pecl-ncurses                    [On CentOS\/RHEL]\r\n# dnf install php-pecl-ncurses                    [On Fedora]\r\n$ sudo apt-get install php5-dev libncurses5-dev   [On Debian\/Ubuntu] \r\n<\/pre>\n<p>Now compile the php extension as follows<\/p>\n<pre>$ wget http:\/\/pecl.php.net\/get\/ncurses-1.0.2.tgz\r\n$ tar xzvf ncurses-1.0.2.tgz\r\n$ cd ncurses-1.0.2\r\n$ phpize # generate configure script\r\n$ .\/configure\r\n$ make\r\n$ sudo make install\r\n<\/pre>\n<p>Next, if you successfully compiled and installed the php extension, run the commands below.<\/p>\n<pre>$ sudo echo extension=ncurses.so &gt; \/etc\/php5\/cli\/conf.d\/ncurses.ini\r\n<\/pre>\n<p>Verify the ncurses.<\/p>\n<pre>$ php -m | grep ncurses\r\n<\/pre>\n<p>Now run the\u00a0<strong>Linfo<\/strong>.<\/p>\n<pre>$ cd \/var\/www\/html\/linfo\/\r\n$ .\/linfo-curses\r\n<\/pre>\n<div id=\"attachment_25661\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Information.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-25661\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Information.png\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Information.png 814w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/05\/Linux-Server-Information-768x462.png 768w\" alt=\"Linux Server Information\" width=\"814\" height=\"490\" aria-describedby=\"caption-attachment-25661\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-25661\" class=\"wp-caption-text\">Linux Server Information<\/p>\n<\/div>\n<p>The following features yet to be added in Linfo:<\/p>\n<ol>\n<li>Support for more Unix operating systems (such as Hurd, IRIX, AIX, HP UX, etc)<\/li>\n<li>Support for less known operating systems: Haiku\/BeOS<\/li>\n<li>Extra superfluous features\/extensions<\/li>\n<li>Support for\u00a0<a href=\"https:\/\/www.tecmint.com\/install-htop-linux-process-monitoring-for-rhel-centos-fedora\/\" target=\"_blank\" rel=\"noopener noreferrer\">htop-like<\/a>\u00a0features in ncurses mode<\/li>\n<\/ol>\n<p>For more information, visit Linfo Github repository:\u00a0<a href=\"https:\/\/github.com\/jrgp\/linfo\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/jrgp\/linfo<\/a><\/p>\n<p>That\u2019s all! From now on, you can view a Linux system\u2019s information from within a web browser using Linfo. Try it out and share with us your thoughts in the comments. Additionally, have you come across any similar useful tools\/libraries? If yes, then give us some info about them as well.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/linfo-shows-linux-server-health-status-in-real-time\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linfo\u00a0is a free and open source, cross-platform server statistics UI\/library which displays a great deal of system information. It is extensible, easy-to-use (via composer) PHP5 library to get extensive system statistics programmatically from your PHP application. It\u2019s a Ncurses CLI view of Web UI, which works in Linux, Windows, *BSD, Darwin\/Mac OSX, Solaris, and Minix. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/06\/linfo-shows-linux-server-health-status-in-real-time\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linfo \u2013 Shows Linux Server Health Status in Real-Time&#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-13887","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\/13887","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=13887"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13887\/revisions"}],"predecessor-version":[{"id":13888,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13887\/revisions\/13888"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}