{"id":441,"date":"2013-10-03T08:47:00","date_gmt":"2013-10-03T08:47:00","guid":{"rendered":"https:\/\/opstree.com\/blog\/\/2013\/10\/03\/system-monitoring\/"},"modified":"2019-09-18T15:19:14","modified_gmt":"2019-09-18T09:49:14","slug":"system-monitoring","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2013\/10\/03\/system-monitoring\/","title":{"rendered":"System Monitoring"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align:left;\">One of the main task of a system administrator is system monitoring, system monitoring usually involves monitoring the ram &amp; disk space usage of the system &#8230;. In this blog I&#8217;ll be talking about my experience as a system admin &amp; how I do it.<\/p>\n<p>Usually system monitoring is divided into 2 parts Continuous system monitoring and troubleshooting system issues when system crosses a threshold value &amp; you have to figure out the issue &amp; try to resolve it.<\/p>\n<p>In continuous system monitoring a system is put under continuous monitoring i.e the system ram usage is within defined limit or not, the disk space occupancy should not cross a predefined threshold &#8230;. To achieve continuous monitoring you can use couple of tools available in market such as <a href=\"http:\/\/www.nagios.org\/\" target=\"_blank\" rel=\"noopener\"><b>nagios<\/b><\/a>, <a href=\"http:\/\/omdistro.org\/\" target=\"_blank\" rel=\"noopener\">omd<\/a> we are primarily using these tools their would be other tools available also for this purpose.<\/p>\n<p>Continuous system monitoring serves one purpose where they notify about any deviation from the expected state of the system, the next step is to troubleshoot this issue &amp; resolve it accordingly. As a first step I usually execute top command, top is a very powerful command apart from just viewing the processes activity in real you can do a lot of things i.e<\/p>\n<ul style=\"text-align:left;\">\n<li>If you want to add\/remove fields : press <i>f<\/i> &amp; then you can choose the fields to add\/remove<\/li>\n<li>If you want to change ordering of&nbsp; fields : press <i>O<\/i> &amp; then you can move fields<\/li>\n<li>If you want to change the sort order : press <i>F or O<\/i><\/li>\n<\/ul>\n<div style=\"text-align:left;\">there are lot of other options available as well, if you want to explore them pressing <i>h<\/i> will provide you a list of all the options.<\/p>\n<p>You can also read about <b>htop<\/b>, htop is an advanced form of top where you can view some graphs as well though I&#8217;ven&#8217;t used htop so much but I&#8217;m planning to \ud83d\ude42<\/p>\n<p>One thing to note sometimes you are not able ot run top command due to high resource utilization, in that case you have to use <i>cat \/proc\/loadavg<\/i> to view the load on the system &amp; <i>cat \/proc\/meminfo<\/i> to view current memory state of the system.<\/p>\n<p>One of the useful command if top doesn&#8217;t work<br \/>\n<i>ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -5<\/i><br \/>\nThis command will give the top 5 processes by memory usage.<\/p>\n<p>Also there are couple of other commands that you can use<br \/>\n<b>free<\/b> : To view the memory usage of system<br \/>\n<b>df<\/b> : To view the file system information<br \/>\n<b>du<\/b> : To view the disk usage<\/p>\n<p><b>One tip<\/b> : To increase the memory of system you can create a swap memory &amp; it is always recommended to create a swap on a partition only. Another best practice for swap area is if your system RAM is below 8 gb your swap area should be double of your ram otherwise it should be half of your RAM size<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>One of the main task of a system administrator is system monitoring, system monitoring usually involves monitoring the ram &amp; disk space usage of the system &#8230;. In this blog I&#8217;ll be talking about my experience as a system admin &amp; how I do it. Usually system monitoring is divided into 2 parts Continuous system &hellip; <a href=\"https:\/\/opstree.com\/blog\/2013\/10\/03\/system-monitoring\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;System Monitoring&#8221;<\/span><\/a><\/p>\n","protected":false},"author":171775670,"featured_media":29900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[28070474,111949],"tags":[768739285,768739293,28382],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/11\/DevSecOps-1.jpg","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-77","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/441"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/171775670"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=441"}],"version-history":[{"count":1,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/441\/revisions"}],"predecessor-version":[{"id":794,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/441\/revisions\/794"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/29900"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}