Linux systems ship with monitoring tools by default like\u00a0 On Debian\/Ubuntu systems use:<\/strong><\/p>\n On Redhat\/CentOS systems use:<\/strong><\/p>\n Note that\u00a0‘-y’<\/strong>\u00a0flag in both\u00a0cases above auto answers<\/strong>\u00a0“yes”<\/strong>\u00a0during installs.<\/p>\n On your terminal<\/strong>, type in\u00a0 On your terminal<\/strong>, type in\u00a0 You can also type in\u00a0 On your terminal,<\/strong>\u00a0type in\u00a0 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}]}}top<\/code>,\u00a0
df<\/code>, and\u00a0
du<\/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>,\u00a0
ncdu<\/code>,\u00a0
pydf<\/code>) to help better monitor our\u00a0VM instances<\/strong>.<\/p>\n
Installation<\/strong><\/h3>\n
sudo apt-get -y install htop ncdu pydf\r\n<\/code><\/pre>\n
sudo yum -y install htop ncdu pydf\r\n<\/code><\/pre>\n
Usage<\/strong><\/h3>\n
htop (interactive process viewer)<\/strong><\/h4>\n
htop<\/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\u00a0
q<\/code>\u00a0to exit. Compare this to running just the\u00a0
top<\/code>\u00a0command.<\/p>\n
ncdu (disk usage analyzer)<\/strong><\/h4>\n
ncdu<\/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\u00a0
q<\/code>\u00a0to exit. Compare this to running the standard\u00a0
du<\/code>\u00a0command.<\/p>\n
ncdu [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
pydf<\/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>\u00a0
df\u00a0<\/code>command.<\/strong><\/p>\n
Conclusion<\/strong><\/h3>\n