{"id":2067,"date":"2016-06-23T16:14:38","date_gmt":"2016-06-23T20:14:38","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=2067"},"modified":"2016-09-29T17:53:12","modified_gmt":"2016-09-29T21:53:12","slug":"install-sar-centos","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/","title":{"rendered":"How to Install System Activity Reporter (SAR) on CentOS"},"content":{"rendered":"<p>Setting up a Linux server is only part of what must be done to run a solid site or service. You must also monitor the running system for security incidents, performance bottlenecks and resource use. While Linux exposes a host of monitoring capabilities, these are often very low-level and require a higher-level framework to effectively track. System Activity Reporter (SAR) is one such monitoring solution.<\/p>\n<h2>Getting Started with System Activity Reporter<\/h2>\n<p>To complete this guide, you will need the following:<br \/>\n\u2022 1 Node (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) running a clean installation of CentOS.<\/p>\n<p>When complete, you&#8217;ll be able to monitor this server&#8217;s performance, resource use and other characteristics.<\/p>\n<h2>Tutorial<\/h2>\n<p>We&#8217;ll begin by installing the Sysstat package. It will also be configured to launch on boot.<\/p>\n<p><code> yum install sysstat -y<br \/>\n systemctl start sysstat.service<br \/>\n systemctl enable sysstat.service<\/code><\/p>\n<p>Sysstat is now logging to \/var\/log\/sa. It is now monitoring and reporting system activity and resource use.<\/p>\n<p>Updates are performed via Cron, and reports persist for seven days. To change this value, tweak \/etc\/cron.d\/sysstat.<\/p>\n<p>As stated, logs are stored in \/var\/log\/sa. sa20 is a log of system activity on the 20th of the month. If the 20th of this month has not yet passed, then it refers to the 20th of the previous month.<\/p>\n<p>There are several useful SAR commands to access its data. Here, for instance, is how you&#8217;d view a daily report of memory and swap usage.<\/p>\n<p><code> sar -r<\/code><\/p>\n<p>Or maybe you&#8217;d like to view a history of swap space use on the 10th of the current month.<\/p>\n<p><code>sar -S -f \/var\/log\/sa\/sa10<\/code><\/p>\n<p>Here is a current report of CPU statistics updated by the second.<\/p>\n<p><code>sar -P ALL 1<\/code><\/p>\n<p>This command reports on disk I\/O statistics, updated every three seconds, for the next ten minutes.<\/p>\n<p><code>sar -b 3 10<\/code><\/p>\n<p>Now we&#8217;ll display the server&#8217;s load average history for today.<\/p>\n<p><code>sar -q<\/code><\/p>\n<h2>Conclusion<\/h2>\n<p>System Activity Reporter is great for both monitoring current server use, and for determining if performance issues exist. Running without a monitoring solution is a bad practice, as it will leave you unaware of serious server issues until it is too late. If this guide was helpful to you, kindly share it with others who may also be interested.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Setting up a Linux server is only part of what must be done to run a solid site or service. You must also monitor the running system for security incidents, performance bottlenecks and resource use. While Linux exposes a host of monitoring capabilities, these are often very low-level and require a higher-level framework to effectively<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72,70],"tags":[],"class_list":["post-2067","post","type-post","status-publish","format-standard","hentry","category-monitoring","category-web-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install System Activity Reporter (SAR) on CentOS - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will walk you through the installation of System Activity Reporter on your CentOS server. Read now &amp; start monitoring your server usage !\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install System Activity Reporter (SAR) on CentOS - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will walk you through the installation of System Activity Reporter on your CentOS server. Read now &amp; start monitoring your server usage !\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-23T20:14:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-09-29T21:53:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/\",\"name\":\"How to Install System Activity Reporter (SAR) on CentOS - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-06-23T20:14:38+00:00\",\"dateModified\":\"2016-09-29T21:53:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will walk you through the installation of System Activity Reporter on your CentOS server. Read now & start monitoring your server usage !\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install System Activity Reporter (SAR) on CentOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install System Activity Reporter (SAR) on CentOS - Globo.Tech","description":"This tutorial will walk you through the installation of System Activity Reporter on your CentOS server. Read now & start monitoring your server usage !","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/","og_locale":"en_US","og_type":"article","og_title":"How to Install System Activity Reporter (SAR) on CentOS - Globo.Tech","og_description":"This tutorial will walk you through the installation of System Activity Reporter on your CentOS server. Read now & start monitoring your server usage !","og_url":"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/","og_site_name":"Globo.Tech","article_published_time":"2016-06-23T20:14:38+00:00","article_modified_time":"2016-09-29T21:53:12+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/","url":"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/","name":"How to Install System Activity Reporter (SAR) on CentOS - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-06-23T20:14:38+00:00","dateModified":"2016-09-29T21:53:12+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will walk you through the installation of System Activity Reporter on your CentOS server. Read now & start monitoring your server usage !","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/install-sar-centos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to Install System Activity Reporter (SAR) on CentOS"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=2067"}],"version-history":[{"count":4,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2067\/revisions"}],"predecessor-version":[{"id":2845,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/2067\/revisions\/2845"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=2067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=2067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=2067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}