<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>holyhandgrenade.org &#187; performance</title>
	<atom:link href="http://holyhandgrenade.org/blog/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://holyhandgrenade.org/blog</link>
	<description>System administration from the trenches.</description>
	<lastBuildDate>Wed, 28 Jul 2010 05:31:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Recording disk statistics with sysstat on RHEL/CentOS</title>
		<link>http://holyhandgrenade.org/blog/2009/11/recording-disk-statistics-with-sysstat-on-rhelcentos/</link>
		<comments>http://holyhandgrenade.org/blog/2009/11/recording-disk-statistics-with-sysstat-on-rhelcentos/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 19:56:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://holyhandgrenade.org/blog/?p=429</guid>
		<description><![CDATA[Unlike on Debian-like systems, the default configuration for sysstat&#8217;s sa1 collector on RHEL/CentOS does not include disk statistics (like you would get from iostat) in the sa collection output. This is due to a missing flag in the cron.d fragment that calls sa1. The &#8220;-A&#8221; flag to sa1 defies reasonable assumption about its function, and [...]]]></description>
			<content:encoded><![CDATA[<p>Unlike on Debian-like systems, the default configuration for sysstat&#8217;s sa1 collector on RHEL/CentOS does not include disk statistics (like you would get from iostat) in the sa collection output. This is due to a missing flag in the cron.d fragment that calls sa1. The &#8220;-A&#8221; flag to sa1 defies reasonable assumption about its function, and does not include disk statistics, so we have to specify &#8220;-d&#8221; manually.</p>
<p>To enable disk statistics collection/trending, edit <strong>/etc/cron.d/sysstat</strong> and change the following:</p>
<blockquote><p><code>*/10 * * * * root /usr/lib64/sa/sa1 1 1</code></p></blockquote>
<p>to this:</p>
<blockquote><p><code>*/10 * * * * root /usr/lib64/sa/sa1 -d 1 1</code></p></blockquote>
<p>(Obviously, replace &#8220;lib64&#8243; with &#8220;lib&#8221; as appropriate for i386 systems.)</p>
<p>Either wait for the next sa log rotation (at midnight) for sa1 to begin collecting disk statistics, or delete your current day&#8217;s statistics. sa1, for whatever historical reason, does not add new counters to an existing sa log file.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyhandgrenade.org/blog/2009/11/recording-disk-statistics-with-sysstat-on-rhelcentos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios plugin: check_sa.pl</title>
		<link>http://holyhandgrenade.org/blog/2009/11/nagios-plugin-check_sa-pl/</link>
		<comments>http://holyhandgrenade.org/blog/2009/11/nagios-plugin-check_sa-pl/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 21:41:48 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[nagios]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://holyhandgrenade.org/blog/?p=410</guid>
		<description><![CDATA[There&#8217;s a lot of useful Nagios addons out there. One of them, pnp4nagios, allows you to create graphs of all of your Nagios performance data with zero configuration. This is pretty nice, because your monitoring configurations are kept in one place, rather than having to separately maintain configurations for Nagios and Cacti (or whatever you [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a lot of useful Nagios addons out there. One of them, <a href="http://www.pnp4nagios.org">pnp4nagios</a>, allows you to create graphs of all of your Nagios performance data with zero configuration. This is pretty nice, because your monitoring configurations are kept in one place, rather than having to separately maintain configurations for Nagios and Cacti (or whatever you use).</p>
<p>I&#8217;ve always wanted to be able to monitor things like number of open sockets, page faults, context switches, and other performance counters. Some of them are available through SNMP; others aren&#8217;t. The ones that are available aren&#8217;t all available by device. I wanted a little bit more detail.</p>
<p>The other problem with SNMP queries is that a Nagios check doesn&#8217;t query an average &#8212; something that spikes for a minute is not the same as a condition that persists for several minutes or hours. I wanted to leverage the built-in accounting in sysstat to pull together something Nagios can actually make a little bit of sense out of.</p>
<p>Anyway, I went ahead and created a Nagios plugin that will parse the output of sadf (which is a frontend to sa/sar performance counters). You can query multiple counters at a shot, specifying separate alert thresholds for each (or none at all, if you just want performance data). You can specify, via shell-style glob patterns, which devices you want to include or exclude, so that you can, for example, exclude all &#8220;lo&#8221; and &#8220;tun*&#8221; devices from network statistic monitoring. You can also pick the sampling period, so if you want an average of the last 30 minutes the plugin will produce it.</p>
<p>You can do stuff like this:</p>
<blockquote><p><strong>./check_sa.pl -i -C %usr -C %soft -C %sys -C %idle -D all</strong><br />
SA OK &#8211; All counters within specified thresholds. | %idle[cpu0]=96.84;; %idle[cpu1]=96.31;; %idle[cpu2]=97.23;; %idle[cpu3]=95.8;; %soft[cpu0]=0;; %soft[cpu1]=0.01;; %soft[cpu2]=0;; %soft[cpu3]=0.01;; %sys[cpu0]=0.4;; %sys[cpu1]=0.46;; %sys[cpu2]=0.36;; %sys[cpu3]=0.63;; %usr[cpu0]=2.67;; %usr[cpu1]=3.13;; %usr[cpu2]=2.27;; %usr[cpu3]=3.46;;</p></blockquote>
<p>Or, if you prefer to summarize:</p>
<blockquote><p><strong>./check_sa.pl -i -C %usr -C %soft -C %sys -C %idle -d all</strong><br />
SA OK &#8211; All counters within specified thresholds. | %idle[all]=96.54;; %soft[all]=0;; %sys[all]=0.46;; %usr[all]=2.89;;</p></blockquote>
<p>It&#8217;s still a tiny bit slow &#8212; it takes about 500-600 ms to run on the systems I&#8217;ve tested &#8212; but this should be good enough to be useful without bogging down Nagios too badly.</p>
<p>The script requires the Text::Glob module to be installed, so it can convert shell-style globs into regular expressions to match against.</p>
<p>View the project:</p>
<ul>
<li><a href="http://github.com/jgoldschrafe/check_sa">On GitHub</a></li>
<li><a href="http://monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/check_sa">On MonitoringExchange</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://holyhandgrenade.org/blog/2009/11/nagios-plugin-check_sa-pl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
