{"id":6976,"date":"2014-03-27T05:05:15","date_gmt":"2014-03-26T18:05:15","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=6976"},"modified":"2014-03-27T05:05:15","modified_gmt":"2014-03-26T18:05:15","slug":"linux-monitor-processes-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-monitor-processes-primer-tutorial\/","title":{"rendered":"Linux Monitor Processes Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Linux\/top\/Linux_top.m4v\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Linux Monitor Processes Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Linux\/top\/Linux_top.jpg\" title=\"Linux Monitor Processes Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">Linux Monitor Processes Primer Tutorial<\/p><\/div>\n<p>Linux (or Unix) servers have a &#8220;top&#8221; command for monitoring processes.   It&#8217;s <a target='Linux top command' href='http:\/\/alvinalexander.com\/linux\/unix-linux-top-command-cpu-memory'>top<\/a> &#8230; chortle, chortle.<\/p>\n<p>When you are analyzing performance it can be that a live monitoring of a web server, for instance, might tell you more than a log file will.   With web server frameworks you can often also turn statistical packages on to capture findings for you.   With this, as with top, there is a small price to pay for the resources used by the monitoring.<\/p>\n<p>In the case of an Apache\/PHP\/MySql web server there are a lot of considerations regarding performance, just a few of which are:<\/p>\n<ul>\n<li>number of processors that can help out with the CPU load<\/li>\n<li>the amount of RAM (memory) available to processes as a whole, and to MySql as a secondary issue<\/li>\n<li>swapping required by the system<\/li>\n<li>amount of diskspace available to the system<\/li>\n<li>database architecture quality<\/li>\n<li>database amount of data<\/li>\n<li>long running MySql queries<\/li>\n<li>number of MySql connections allowed<\/li>\n<li>number of open files allowed<\/li>\n<\/ul>\n<p>No one monitoring tool will satisfy your curiosity regarding everything you want to know, but top is a good start on your road to getting some initial feelings about what the server is doing.   You may find, by using top, an unusual process that spikes heavily at odd occasions, and which then either disappears, or does not appear at the top of the list of processes, until another spike.   Events like this can give you pointers to aspects of the hosting you weren&#8217;t expecting, and this often leads to other findings.<\/p>\n<p>So today we see top in action with this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Linux\/top\/Linux_top.m4v\" title=\"Click picture\">tutorial<\/a>.<\/p>\n<p><script>function gradual3() {\n  var g1=document.getElementById(\"myjoke3\");\n  g1.style.display = 'block';\n}\nfunction gradual2() {\n  var g1=document.getElementById(\"myjoke2\");\n  g1.style.display = 'block';\n  setTimeout(gradual3, 3000);\n}\nfunction gradual1() {\n  var g1=document.getElementById(\"myjoke1\");\n  g1.style.display = 'block';\n  setTimeout(gradual2, 3000);\n}<\/script><\/p>\n<p id=\"favdj\">Fancy a very droll joke &#8230; <a href=\"#favdj\" onclick=\" setTimeout(gradual1,1000); \">What&#8217;s the nickname of the host-s with the most-s?<\/a>  <span id=\"myjoke1\" style=\"display:none;\">Snake<\/span><span id=\"myjoke2\" style=\"display:none;\"> &#8230; get it<\/span><span id=\"myjoke3\" style=\"display:none;\"> &#8230; ssssssssssssssssss<\/span><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d6343' onclick='var dv=document.getElementById(\"d6343\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Linux\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d6343' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Linux (or Unix) servers have a &#8220;top&#8221; command for monitoring processes. It&#8217;s top &#8230; chortle, chortle. When you are analyzing performance it can be that a live monitoring of a web server, for instance, might tell you more than a &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-monitor-processes-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/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":[12,29,37],"tags":[707,718,809,1292,1319,1339],"class_list":["post-6976","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-linux","tag-logs","tag-monitoring","tag-top","tag-tutorial","tag-unix"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/6976"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=6976"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/6976\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=6976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=6976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=6976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}