Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2481,"date":"2019-12-06T00:19:03","date_gmt":"2019-12-06T00:19:03","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2481"},"modified":"2019-12-11T00:45:58","modified_gmt":"2019-12-11T00:45:58","slug":"better-monitoring-tools-for-ubuntu-and-centos","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/better-monitoring-tools-for-ubuntu-and-centos\/","title":{"rendered":"Better Monitoring Tools For Ubuntu And CentOS"},"content":{"rendered":"

Introduction<\/strong><\/h3>\n

Linux systems ship with monitoring tools by default like\u00a0top<\/code>,\u00a0df<\/code>, and\u00a0du<\/code>\u00a0that help monitor\u00a0processes and disk space<\/strong>. Often times though, they are not very\u00a0user\/visual friendly<\/strong>. We’ll be setting up three friendlier versions of the previously\u00a0mentioned tools<\/strong>\u00a0(htop<\/code>,\u00a0ncdu<\/code>,\u00a0pydf<\/code>) to help better monitor our\u00a0VM instances<\/strong>.<\/p>\n

Installation<\/strong><\/h3>\n

On Debian\/Ubuntu systems use:<\/strong><\/p>\n

sudo apt-get -y install htop ncdu pydf\r\n<\/code><\/pre>\n

On Redhat\/CentOS systems use:<\/strong><\/p>\n

sudo yum -y install htop ncdu pydf\r\n<\/code><\/pre>\n

Note that\u00a0‘-y’<\/strong>\u00a0flag in both\u00a0cases above auto answers<\/strong>\u00a0“yes”<\/strong>\u00a0during installs.<\/p>\n

Usage<\/strong><\/h3>\n

htop (interactive process viewer)<\/strong><\/h4>\n

On your terminal<\/strong>, type in\u00a0htop<\/code>\u00a0and press\u00a0ENTER<\/strong>. You will see a colorful display listing all running processes as well as the\u00a0percentage of CPU<\/strong>,\u00a0Memory and Swap<\/strong>\u00a0that your system is using. Press\u00a0q<\/code>\u00a0to exit. Compare this to running just the\u00a0top<\/code>\u00a0command.<\/p>\n

ncdu (disk usage analyzer)<\/strong><\/h4>\n

On your terminal<\/strong>, type in\u00a0ncdu<\/code>\u00a0and press\u00a0ENTER<\/strong>. You will see a list of all files and folders in the current directory you in are with a visual bar showing the relative amount of space they are using. Press\u00a0q<\/code>\u00a0to exit. Compare this to running the standard\u00a0du<\/code>\u00a0command.<\/p>\n

You can also type in\u00a0ncdu [directory-path]<\/code>\u00a0to see disk usage stats for any directory.\u00a0One fantastic feature ncdu<\/strong>\u00a0has is the ability to navigate directory structures. This allows it to drill down and get even more disk usage stats for sub-directories.<\/p>\n

pydf (disk usage checker)<\/strong><\/h4>\n

On your terminal,<\/strong>\u00a0type in\u00a0pydf<\/code>\u00a0and press\u00a0ENTER<\/strong>. You will see a colorful summary of the disk usage on your system.\u00a0Contrast this to running the standard<\/strong>\u00a0df\u00a0<\/code>command.<\/strong><\/p>\n

Conclusion<\/strong><\/h3>\n

These\u00a0new tools provide a more user-friendly way to analyze running processes and disk usage on a server.<\/strong>\u00a0Each of these tools should be in the toolkit of anyone\u00a0(Admins, DevOps, etc.)<\/strong>\u00a0who manages linux servers.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[231,233,242,247],"manual_kb_tag":[310],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2481"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2481"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2481\/revisions"}],"predecessor-version":[{"id":2482,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2481\/revisions\/2482"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2481"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2481"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}