<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sysadmin on Evan Hoffman</title><link>https://evan.wtf/tags/sysadmin/</link><description>Recent content in Sysadmin on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Thu, 05 Feb 2026 06:18:40 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/sysadmin/index.xml" rel="self" type="application/rss+xml"/><item><title>Home NAS build - 2026 Edition</title><link>https://evan.wtf/2026/02/05/home-nas-build-2026-edition/</link><pubDate>Thu, 05 Feb 2026 06:18:40 +0000</pubDate><guid>https://evan.wtf/2026/02/05/home-nas-build-2026-edition/</guid><description>My journey building a new home NAS in 2026 I outgrew the one I had previously built in 2017. I discuss CPU and disk selection, benchmarking raid levels, optimizing configurations with docker and how to leverage AI assistants to simplify configurations.</description></item><item><title>Can I create an EC2 MySQL slave to an RDS master?</title><link>https://evan.wtf/2014/10/08/can-i-create-an-ec2-mysql-slave-to-an-rds-master/</link><pubDate>Wed, 08 Oct 2014 15:25:10 +0000</pubDate><guid>https://evan.wtf/2014/10/08/can-i-create-an-ec2-mysql-slave-to-an-rds-master/</guid><description>&lt;h2 id="no"&gt;No.&lt;a class="heading-anchor" href="#no" aria-label="Link to this section"&gt;&#10; &lt;svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"&#10; stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"&gt;&#10; &lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/&gt;&#10; &lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/&gt;&#10; &lt;/svg&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Here&amp;rsquo;s what happens if you try:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;mysql&amp;gt; grant replication slave on *.* to &amp;#39;ec2-slave&amp;#39;@&amp;#39;%&amp;#39;;&#10;ERROR 1045 (28000): Access denied for user &amp;#39;rds_root&amp;#39;@&amp;#39;%&amp;#39; (using password: YES)&#10;mysql&amp;gt; update mysql.user set Repl_slave_priv=&amp;#39;Y&amp;#39; WHERE user=&amp;#39;rds_root&amp;#39; AND host=&amp;#39;%&amp;#39;;&#10;ERROR 1054 (42S22): Unknown column &amp;#39;ERROR (RDS): REPLICA SLAVE PRIVILEGE CANNOT BE GRANTED OR MAINTAINED&amp;#39; in &amp;#39;field list&amp;#39;&#10;mysql&amp;gt;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: this is for MySQL 5.5, which is unfortunately what I&amp;rsquo;m currently stuck with.&lt;/p&gt;</description></item><item><title>Create CloudWatch alerts for all Elastic Load Balancers</title><link>https://evan.wtf/2014/07/18/create-cloudwatch-alerts-for-all-elastic-load-balancers/</link><pubDate>Fri, 18 Jul 2014 10:29:57 +0000</pubDate><guid>https://evan.wtf/2014/07/18/create-cloudwatch-alerts-for-all-elastic-load-balancers/</guid><description>&lt;p&gt;I manage a bunch of ELBs but we were missing an alert on a pretty basic metric: how many errors the load balancer was returning. Rather than wade through the UI to add these alerts I figured it would be easier to do it via the CLI.&lt;/p&gt;&#10;&lt;p&gt;Assuming aws-cli is installed and the ARN for your SNS topic (in my case, just an email alert) is $arn:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;for i in `aws elb describe-load-balancers | grep LoadBalancerName | &#10;perl -ne &amp;#39;chomp; my @a=split(/s+/); $a[2] =~ s/[&amp;#34;,]//g ; print &amp;#34;$a[2] &amp;#34;;&amp;#39; ` ; &#10;do aws cloudwatch put-metric-alarm --alarm-name &amp;#34;$i ELB 5XX Errors&amp;#34; --alarm-description &#10;&amp;#34;High $i ELB 5XX error count&amp;#34; --metric-name HTTPCode_ELB_5XX --namespace AWS/ELB &#10;--statistic Sum --period 300 --evaluation-periods 1 --threshold 50 &#10;--comparison-operator GreaterThanThreshold --dimensions Name=LoadBalancerName,Value=$i &#10;--alarm-actions $arn --ok-actions $arn ; done&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That huge one-liner creates a CloudWatch notification that sends an alarm when the number of 5XX errors returned by the ELB is greater than 50 over 5 minutes, and sends an &amp;ldquo;ok&amp;rdquo; message via the same SNS topic. The for loop creates/modifies the alarm for every ELB.&lt;/p&gt;</description></item><item><title>The not-so-secret secret to Postgres performance</title><link>https://evan.wtf/2013/10/07/the-not-so-secret-secret-to-postgres-performance/</link><pubDate>Mon, 07 Oct 2013 10:19:05 +0000</pubDate><guid>https://evan.wtf/2013/10/07/the-not-so-secret-secret-to-postgres-performance/</guid><description>&lt;p&gt;I manage a bunch of Postgres DBs and one of the things I almost always forget to do when setting up a new one is set the readahead up from the default of 256. I created this script and run it out of /etc/rc.local and sometimes cron it too. The 3 commands at the top are only really relevant on systems with &amp;ldquo;huge&amp;rdquo; memory - probably over 64 GB. We &lt;a href="https://evan.wtf/2012/09/25/problems-with-postgresql-9-0-on-centos-6-3-with-a-2-6-32-series-kernel/"&gt;ran into some memory problems&lt;/a&gt; with CentOS 6 on a box with 128 GB ram which we ended up working around by reinstalling CentOS 5, but the &lt;code&gt;/sys/kernel/mm/redhat_transparent_hugepage/&lt;/code&gt; options below should fix them in 6.x (though we haven&amp;rsquo;t actually tried it on that DB, we haven&amp;rsquo;t seen any problems in other large DBs).&lt;/p&gt;</description></item><item><title>Goodbye, pg_dump</title><link>https://evan.wtf/2013/09/26/goodbye-pg_dump/</link><pubDate>Thu, 26 Sep 2013 09:12:05 +0000</pubDate><guid>https://evan.wtf/2013/09/26/goodbye-pg_dump/</guid><description>&lt;p&gt;I&amp;rsquo;ve been a Postgres user and administrator for a while. Over the years, my views on backups have evolved.&lt;/p&gt;&#10;&lt;p&gt;Originally, like most people, I started out with good old pg_dump. With a reasonably small database (under 50 GB) dumping to a flat text file is a fine option. I&amp;rsquo;d generally do something like &lt;code&gt;pg_dump -Upostgres dbname | gzip &amp;gt; dbname.sql.gz&lt;/code&gt; to compress it on the fly and save space. For years this seemed perfect: dumping the entire database in a single transaction into a single file that can be restored anywhere.&lt;/p&gt;</description></item><item><title>More fun parsing BIND query logs</title><link>https://evan.wtf/2010/12/13/more-fun-parsing-bind-query-logs/</link><pubDate>Mon, 13 Dec 2010 18:21:59 +0000</pubDate><guid>https://evan.wtf/2010/12/13/more-fun-parsing-bind-query-logs/</guid><description>&lt;p&gt;&amp;ldquo;But wouldn&amp;rsquo;t it be cool if it also&amp;hellip;&amp;rdquo; That phrase usually triggers a lot of wasted cycles in my brain, though it sometimes comes up with something neat. I added a super lame graph to the DNS QPS parser. Makes it really easy to see peaks &amp;amp; troughs in usage:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;2010-12-12 00:00 to 00:59 =&amp;gt; 3237, rate 0.899 queries/sec&#9;***********&#10;2010-12-12 01:00 to 01:59 =&amp;gt; 2709, rate 0.752 queries/sec&#9;**********&#10;2010-12-12 02:00 to 02:59 =&amp;gt; 2473, rate 0.687 queries/sec&#9;*********&#10;2010-12-12 03:00 to 03:59 =&amp;gt; 2171, rate 0.603 queries/sec&#9;********&#10;2010-12-12 04:00 to 04:59 =&amp;gt; 2048, rate 0.569 queries/sec&#9;*******&#10;2010-12-12 05:00 to 05:59 =&amp;gt; 1918, rate 0.533 queries/sec&#9;*******&#10;2010-12-12 06:00 to 06:59 =&amp;gt; 2120, rate 0.589 queries/sec&#9;********&#10;2010-12-12 07:00 to 07:59 =&amp;gt; 2477, rate 0.688 queries/sec&#9;*********&#10;2010-12-12 08:00 to 08:59 =&amp;gt; 2994, rate 0.832 queries/sec&#9;**********&#10;2010-12-12 09:00 to 09:59 =&amp;gt; 3704, rate 1.029 queries/sec&#9;*************&#10;2010-12-12 10:00 to 10:59 =&amp;gt; 4297, rate 1.194 queries/sec&#9;***************&#10;2010-12-12 11:00 to 11:59 =&amp;gt; 4744, rate 1.318 queries/sec&#9;****************&#10;2010-12-12 12:00 to 12:59 =&amp;gt; 5106, rate 1.418 queries/sec&#9;******************&#10;2010-12-12 13:00 to 13:59 =&amp;gt; 5311, rate 1.475 queries/sec&#9;******************&#10;2010-12-12 14:00 to 14:59 =&amp;gt; 5083, rate 1.412 queries/sec&#9;*****************&#10;2010-12-12 15:00 to 15:59 =&amp;gt; 4855, rate 1.349 queries/sec&#9;*****************&#10;2010-12-12 16:00 to 16:59 =&amp;gt; 5179, rate 1.439 queries/sec&#9;******************&#10;2010-12-12 17:00 to 17:59 =&amp;gt; 4959, rate 1.377 queries/sec&#9;*****************&#10;2010-12-12 18:00 to 18:59 =&amp;gt; 4693, rate 1.304 queries/sec&#9;****************&#10;2010-12-12 19:00 to 19:59 =&amp;gt; 4792, rate 1.331 queries/sec&#9;****************&#10;2010-12-12 20:00 to 20:59 =&amp;gt; 4799, rate 1.333 queries/sec&#9;****************&#10;2010-12-12 21:00 to 21:59 =&amp;gt; 5068, rate 1.408 queries/sec&#9;*****************&#10;2010-12-12 22:00 to 22:59 =&amp;gt; 4672, rate 1.298 queries/sec&#9;****************&#10;2010-12-12 23:00 to 23:59 =&amp;gt; 4514, rate 1.254 queries/sec&#9;****************&#10;2010-12-13 00:00 to 00:59 =&amp;gt; 3917, rate 1.088 queries/sec&#9;**************&#10;2010-12-13 01:00 to 01:59 =&amp;gt; 3458, rate 0.961 queries/sec&#9;************&#10;2010-12-13 02:00 to 02:59 =&amp;gt; 2874, rate 0.798 queries/sec&#9;**********&#10;2010-12-13 03:00 to 03:59 =&amp;gt; 2715, rate 0.754 queries/sec&#9;**********&#10;2010-12-13 04:00 to 04:59 =&amp;gt; 2690, rate 0.747 queries/sec&#9;*********&#10;2010-12-13 05:00 to 05:59 =&amp;gt; 2719, rate 0.755 queries/sec&#9;**********&#10;2010-12-13 06:00 to 06:59 =&amp;gt; 2831, rate 0.786 queries/sec&#9;**********&#10;2010-12-13 07:00 to 07:59 =&amp;gt; 3416, rate 0.949 queries/sec&#9;************&#10;2010-12-13 08:00 to 08:59 =&amp;gt; 4962, rate 1.378 queries/sec&#9;*****************&#10;2010-12-13 09:00 to 09:59 =&amp;gt; 6943, rate 1.929 queries/sec&#9;************************&#10;2010-12-13 10:00 to 10:59 =&amp;gt; 8296, rate 2.304 queries/sec&#9;****************************&#10;2010-12-13 11:00 to 11:59 =&amp;gt; 8938, rate 2.483 queries/sec&#9;******************************&#10;2010-12-13 12:00 to 12:59 =&amp;gt; 8926, rate 2.479 queries/sec&#9;******************************&#10;2010-12-13 13:00 to 13:59 =&amp;gt; 8950, rate 2.486 queries/sec&#9;******************************&#10;2010-12-13 14:00 to 14:59 =&amp;gt; 2173, rate 0.604 queries/sec&#9;********&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can see pretty quickly that 4-5 AM (Eastern) is the period of lowest activity, as you&amp;rsquo;d probably expect for a US-based US-centric site. Modified perl script below.&lt;/p&gt;</description></item></channel></rss>