<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Gahooa Perspective &#187; Linux</title>
	<atom:link href="http://blog.gahooa.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gahooa.com</link>
	<description>Thoughts on Life, Engineering, Technology, Business, and more...</description>
	<lastBuildDate>Sun, 11 Dec 2011 19:44:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.gahooa.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Gahooa Perspective &#187; Linux</title>
		<link>http://blog.gahooa.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.gahooa.com/osd.xml" title="The Gahooa Perspective" />
	<atom:link rel='hub' href='http://blog.gahooa.com/?pushpress=hub'/>
		<item>
		<title>HomeSchool Software: Page Rendering (Also ImageMagick Text Example)</title>
		<link>http://blog.gahooa.com/2011/06/13/homeschool-software-page-rendering/</link>
		<comments>http://blog.gahooa.com/2011/06/13/homeschool-software-page-rendering/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 05:56:35 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Home School]]></category>
		<category><![CDATA[Home School Software]]></category>
		<category><![CDATA[Homeschool]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[Productivity Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=654</guid>
		<description><![CDATA[Last couple days have had me working on the page rendering functionality of the HomeSchool software.  I&#8217;ve made some design decisions (for now) to speed up development like fixed 8.5&#8243; x 11&#8243; pages.  Hopefully later I will be able to go back and improve some aspects, but for now, time is of the essence. Here [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=654&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last couple days have had me working on the page rendering functionality of the HomeSchool software.  I&#8217;ve made some design decisions (for now) to speed up development like fixed 8.5&#8243; x 11&#8243; pages.  Hopefully later I will be able to go back and improve some aspects, but for now, time is of the essence.</p>
<p>Here is an example page render without the photographs included.  Still need a UI for selecting photographs and positioning them on the white area of the page.</p>
<p>At the bottom, see an ImageMagick Text Example about the python code used to render multiple text areas and color blocks on one image&#8230;</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/screen-shot-2011-06-13-at-12-50-51-am.png"><img class="alignnone size-full wp-image-655" title="Screen shot 2011-06-13 at 12.50.51 AM" src="http://gahooa.files.wordpress.com/2011/06/screen-shot-2011-06-13-at-12-50-51-am.png?w=700&#038;h=1031" alt="" width="700" height="1031" /></a></p>
<p>It took me a long time to figure out how to use ImageMagick to place multiple text areas on one image.  Here are some keywords for google:</p>
<p>ImageMagick, ImageMagick multiple text areas, ImageMagick pdf rendering, ImageMagick text.</p>
<p><pre class="brush: python;">
      PrimerFont = join(App.Path, 'Static', 'Primerb.ttf')
      PrimerFontBold = join(App.Path, 'Static', 'Primer.ttf')
      RenderFile = join(TempDir, 'Render.jpg')

      # Build the full image
      subprocess.check_call((
        '/usr/bin/convert',

        # Setup the background
        '-size', '2550x3300',
        'xc:white',

        # Title Bar
        '-fill', 'grey14', '-draw', 'rectangle 0,0 2550,300',

        # Summary bar
        '-fill', 'RoyalBlue4', '-draw', 'rectangle 0,300 2550,600',

        # Description Bar
        '-fill', 'LightGrey', '-draw', 'rectangle 0,600 2550,1050',

        # Now draw the Name
        '(',
          '-density'    , '300',
          '-fill'       , 'white',
          '-background' , 'grey14',
          '-font'       , PrimerFont,
          '-size'       , '1650x150',
          '-gravity'    , 'West',
          '-pointsize'  , '20',
          'caption:'    + self.Book.Name,
        ')',
        '-gravity', 'NorthWest', '-geometry', '+150+150', '-composite',

        # Now draw the Date
        '(',
          '-density'    , '300',
          '-fill'       , 'white',
          '-background' , 'grey14',
          '-font'       , PrimerFont,
          '-size'       , '600x150',
          '-gravity'    , 'East',
          '-pointsize'  , '20',
          'caption:' + Activity.Date.strftime('%B %d, %Y'),
        ')',
        '-gravity', 'NorthEast', '-geometry', '+150+150', '-composite',

        # Now draw the Summary
        '(',
          '-density'    , '300',
          '-fill'       , 'white',
          '-background' , 'RoyalBlue4',
          '-font'       , PrimerFontBold,
          '-size'       , '2250x300',
          '-gravity'    , 'Center',
          '-pointsize'  , '20',
          'caption:'    + Activity.Summary.replace(&quot;\n&quot;, &quot; &quot;),
        ')',
        '-gravity', 'North', '-geometry', '+0+300', '-composite',

        # Now draw the Description
        '(',
          '-density'    , '300',
          '-fill'       , 'black',
          '-background' , 'LightGrey',
          '-font'       , PrimerFont,
          '-size'       , '2250x450',
          '-gravity'    , 'Center',
          '-pointsize'  , '14',
          'caption:'    + Activity.Description.replace(&quot;\n&quot;, &quot;\\n&quot;),
        ')',
        '-gravity', 'North', '-geometry', '+0+600', '-composite',

        # Now draw the Page
        '(',
          '-density'    , '300',
          '-fill'       , 'black',
          '-background' , 'white',
          '-font'       , PrimerFont,
          '-size'       , '2250x150',  #entire right half minus 150pt margin
          '-gravity'    , 'Center',
          '-pointsize'  , '14',
          'caption:'    + 'Page {0}'.format(self.PageNumber),
        ')',
        '-gravity', 'South', '-geometry', '+0+150', '-composite',

#        NameFile, '-geometry', '+0+0', '-composite',
#        DateFile, '-geometry', '+1275+0', '-composite',
#        SummaryFile, '-geometry', '+0+150', '-composite',
#        DescriptionFile, '-geometry', '+0+450', '-composite',

        RenderFile,
        ))
</pre></p>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/home-school/'>Home School</a>, <a href='http://blog.gahooa.com/tag/home-school-software/'>Home School Software</a>, <a href='http://blog.gahooa.com/tag/homeschool/'>Homeschool</a>, <a href='http://blog.gahooa.com/tag/imagemagick/'>ImageMagick</a>, <a href='http://blog.gahooa.com/tag/productivity-software/'>Productivity Software</a>, <a href='http://blog.gahooa.com/tag/software-development/'>Software Development</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/654/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=654&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2011/06/13/homeschool-software-page-rendering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/screen-shot-2011-06-13-at-12-50-51-am.png" medium="image">
			<media:title type="html">Screen shot 2011-06-13 at 12.50.51 AM</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimal PuTTY Settings for SSH Connections to Linux</title>
		<link>http://blog.gahooa.com/2011/06/07/optimal-putty-settings-for-ssh-connections-to-linux/</link>
		<comments>http://blog.gahooa.com/2011/06/07/optimal-putty-settings-for-ssh-connections-to-linux/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 18:16:49 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[PuTTY]]></category>
		<category><![CDATA[PuTTY Configuration]]></category>
		<category><![CDATA[PuTTY Settings]]></category>
		<category><![CDATA[Software Technique]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSH Agent]]></category>
		<category><![CDATA[SSH Agent Forwarding]]></category>
		<category><![CDATA[SSH Client]]></category>
		<category><![CDATA[Windows SSH]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=631</guid>
		<description><![CDATA[PuTTY is a great program.  I think it tops the cake for most-useful-utility-on-windows that I have ever encountered.  I&#8217;ve used it to connect to telnet, ssh, linux, unix, windows, hypervisors, and even IBM iSeries (AS-400).  However, despite all the cool things one can do with PuTTY, the default out-of-the-box-settings leave a good bit to learn. For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=631&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> is a great program.</strong>  I think it tops the cake for most-useful-utility-on-windows that I have ever encountered.  I&#8217;ve used it to connect to telnet, ssh, linux, unix, windows, hypervisors, and even IBM iSeries (AS-400).  However, despite all the cool things one can do with PuTTY, the default out-of-the-box-settings leave a good bit to learn.</p>
<p>For a long time, I put up with some less than optimal settings.  But over time, I learned what worked best for me.  The purpose of this post is to share that with you.</p>
<p>Enjoy!</p>
<p><strong>Download from: <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">http://www.chiark.greenend.org.uk/~sgtatham/putty/</a></strong></p>
<p>Hint: I prefer the windows installer.  However, whatever you do, make sure you get the whole suite (unless you <span style="text-decoration:underline;">know</span> you don&#8217;t need it)</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-27-55-pm1.png"><img class="alignnone size-full wp-image-634" title="Putty Download Page" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-27-55-pm1.png?w=700" alt=""   /></a></p>
<p><strong>Launch PuTTY and configure &#8220;Session&#8221; section</strong></p>
<p>user@host is handy for auto-login.  I prefer to place my server name before my username in the saved sessions because the sort order will be maintained as the list grows.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-33-19-pm.png"><img class="alignnone size-full wp-image-635" title="6-7-2011 1-33-19 PM" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-33-19-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure the &#8220;Terminal &gt; Bell&#8221; section</strong></p>
<p>I have found it preferable not to disable the bell if it is overused.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-37-15-pm.png"><img class="alignnone size-full wp-image-636" title="Putty Bell Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-37-15-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure the &#8220;Window&#8221; Settings</strong></p>
<p>This is one of the most important settings.  The default of 200 lines of scrollback is <strong>just not enough</strong>.  I find 20000 to be more useful.  Also, the window size should be set according to your screen size and preferences.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-40-06-pm.png"><img class="alignnone size-full wp-image-637" title="Putty Window Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-40-06-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure &#8220;Window &gt; Appearance&#8221; settings</strong></p>
<p>I find that the Luicida Console 14 point font is very easy on the eyes.  Keep in mind I&#8217;m usually using a 27&#8243; or 30&#8243; display at 2560 pixels wide, so I can afford the extra size of 14pt.  However, even on smaller screens, I still find it nicer to be able to read effortlessly and see less than the other way around.  Just give it a try :)</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-42-29-pm.png"><img class="alignnone size-full wp-image-638" title="Putty Window Appearance Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-42-29-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure the &#8220;Window &gt; Translation&#8221; settings</strong></p>
<p>As of a few years ago, Linux began to use UTF-8 character encoding by default.  This means that if your terminal is set to latin1 or similar, then each single multi-byte-character is literally interpreted as <span style="text-decoration:underline;">multiple</span> latin1 characters, mostly drawn as out-of-place accented letters and various symbols.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-51-34-pm.png"><img class="alignnone size-full wp-image-639" title="Putty utf-8 vs latin-1 -- bad encoding" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-51-34-pm.png?w=700&#038;h=87" alt="" width="700" height="87" /></a></p>
<p>So in my experience, it is best to use UTF-8 when connecting to Linux.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-45-31-pm.png"><img class="alignnone size-full wp-image-640" title="Putty UTF-8 Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-45-31-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure &#8220;Window &gt; Selection&#8221; settings</strong></p>
<p>You need to decide here if you want an important safety precaution.  Under the &#8220;Compromise&#8221; setting above, right-click will paste whatever is on the clipboard&#8230; <span style="color:#ff0000;">even if you were just blogging about <strong>sudo rm -rf /</strong></span></p>
<p>So, think that over pretty hard.  The first option of &#8220;Windows&#8221; will bring up a right-click menu with a convenient &#8220;Paste&#8221; option.  Also, you can simply us SHIFT+INSERT to paste in PuTTY.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-53-34-pm.png"><img class="alignnone size-full wp-image-641" title="Putty Selection Options" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-53-34-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure &#8220;Window &gt; Colours&#8221; settings</strong></p>
<p>If you can read dark-blue-on-black, then your vision is in another &#8220;spectrum&#8221; than mine.  Check out the difference here:</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-01-15-pm.png"><img class="alignnone size-full wp-image-642" title="Putty Default Color Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-01-15-pm.png?w=700" alt=""   /></a></p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-01-51-pm.png"><img class="alignnone size-full wp-image-643" title="Putty Better Color Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-01-51-pm.png?w=700&#038;h=132" alt="" width="700" height="132" /></a></p>
<p>Simply select &#8220;ANSI Blue&#8221; and change the RGB values to 112, 112, 255.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-59-14-pm.png"><img class="alignnone size-full wp-image-644" title="Putty Color Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-59-14-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure &#8220;Connection&#8221; settings</strong></p>
<p>It is helpful to send a null packet every once in a while to keep sessions alive.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-04-16-pm.png"><img class="alignnone size-full wp-image-645" title="Putty Connection Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-04-16-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure &#8220;Connection &gt; SSH&#8221; settings <span style="color:#ff0000;">(Update)</span></strong></p>
<p>David Aldrich pointed out in a helpful comment that  &#8221;I also think it is probably worth enabling SSH compression if working over a slow connection.&#8221;</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/putty-connection-ssh.png"><img class="alignnone size-full wp-image-684" title="putty-connection-ssh" src="http://gahooa.files.wordpress.com/2011/06/putty-connection-ssh.png?w=700" alt=""   /></a></p>
<p><strong>Configure &#8220;Connection &gt; SSH &gt; Auth&#8221; settings</strong></p>
<p>If you use SSH Agent forwarding (eg pagent) to allow you to &#8220;hop&#8221; from one server to another, then PuTTY must be told to enable Agent Forwarding.  There are some security issues with this setting when connecting to an untrusted server, so please understand them first.</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-06-11-pm.png"><img class="alignnone size-full wp-image-646" title="Putty Agent Forwarding" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-06-11-pm.png?w=700" alt=""   /></a></p>
<p><strong>Configure &#8220;Connection &gt; SSH &gt; Tunnels&#8221;</strong></p>
<p>If you want to connect to a MySQL or PostgreSQL service running on the host you are connecting to, but have all communication encrypted and sent via SSH tunnel, here is how to set that up.</p>
<p>Keep in mind that your Windows OS you are on must have the source port free, so if you are ALSO running MySQL locally, then pick a different local port number like 13306.</p>
<p>Once your SSH session is established, then you can connect to localhost port 13306 and it will be tunneled to the remote server on 3306.  Cool!</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-09-03-pm.png"><img class="alignnone size-full wp-image-647" title="6-7-2011 2-09-03 PM" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-09-03-pm.png?w=700" alt=""   /></a></p>
<p><strong>Finally!!! Don&#8217;t forget to save your session.</strong></p>
<p>(hint: press the &#8220;Save&#8221; button)</p>
<p><a href="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-12-29-pm.png"><img class="alignnone size-full wp-image-648" title="Putty Save Settings" src="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-12-29-pm.png?w=700" alt=""   /></a></p>
<p>And that&#8217;s it!  The basic PuTTY settings that I use which work quite nicely.</p>
<p>Hope this helps.</p>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/putty/'>PuTTY</a>, <a href='http://blog.gahooa.com/tag/putty-configuration/'>PuTTY Configuration</a>, <a href='http://blog.gahooa.com/tag/putty-settings/'>PuTTY Settings</a>, <a href='http://blog.gahooa.com/tag/software-technique/'>Software Technique</a>, <a href='http://blog.gahooa.com/tag/ssh/'>SSH</a>, <a href='http://blog.gahooa.com/tag/ssh-agent/'>SSH Agent</a>, <a href='http://blog.gahooa.com/tag/ssh-agent-forwarding/'>SSH Agent Forwarding</a>, <a href='http://blog.gahooa.com/tag/ssh-client/'>SSH Client</a>, <a href='http://blog.gahooa.com/tag/windows-ssh/'>Windows SSH</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/631/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=631&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2011/06/07/optimal-putty-settings-for-ssh-connections-to-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-27-55-pm1.png" medium="image">
			<media:title type="html">Putty Download Page</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-33-19-pm.png" medium="image">
			<media:title type="html">6-7-2011 1-33-19 PM</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-37-15-pm.png" medium="image">
			<media:title type="html">Putty Bell Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-40-06-pm.png" medium="image">
			<media:title type="html">Putty Window Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-42-29-pm.png" medium="image">
			<media:title type="html">Putty Window Appearance Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-51-34-pm.png" medium="image">
			<media:title type="html">Putty utf-8 vs latin-1 -- bad encoding</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-45-31-pm.png" medium="image">
			<media:title type="html">Putty UTF-8 Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-53-34-pm.png" medium="image">
			<media:title type="html">Putty Selection Options</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-01-15-pm.png" medium="image">
			<media:title type="html">Putty Default Color Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-01-51-pm.png" medium="image">
			<media:title type="html">Putty Better Color Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-1-59-14-pm.png" medium="image">
			<media:title type="html">Putty Color Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-04-16-pm.png" medium="image">
			<media:title type="html">Putty Connection Settings</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/putty-connection-ssh.png" medium="image">
			<media:title type="html">putty-connection-ssh</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-06-11-pm.png" medium="image">
			<media:title type="html">Putty Agent Forwarding</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-09-03-pm.png" medium="image">
			<media:title type="html">6-7-2011 2-09-03 PM</media:title>
		</media:content>

		<media:content url="http://gahooa.files.wordpress.com/2011/06/6-7-2011-2-12-29-pm.png" medium="image">
			<media:title type="html">Putty Save Settings</media:title>
		</media:content>
	</item>
		<item>
		<title>How to force-drop a postgresql database by killing off connection processes</title>
		<link>http://blog.gahooa.com/2010/11/03/how-to-force-drop-a-postgresql-database-by-killing-off-connection-processes/</link>
		<comments>http://blog.gahooa.com/2010/11/03/how-to-force-drop-a-postgresql-database-by-killing-off-connection-processes/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 14:50:04 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Drop Database]]></category>
		<category><![CDATA[Kill Process]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Process]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=379</guid>
		<description><![CDATA[Ever need to drop a postgresql database, but it would not let you because there are open connections to it (from a webapp or whatever)? Quite annoying.  If on a production server, and other databases are being used, restarting postgresql is a last resort, because it generates downtime for your site (even if small). I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=379&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever need to drop a postgresql database, but it would not let you because there are open connections to it (from a webapp or whatever)?</p>
<p>Quite annoying.  If on a production server, and other databases are being used, restarting postgresql is a last resort, because it generates downtime for your site (even if small).</p>
<p>I finally took the time to scratch around and find the answer.</p>
<p><strong>As a super user, to list all of the open connections to a given database:</strong></p>
<pre>select * from pg_stat_activity where datname='YourDatabase';</pre>
<p><strong>As a superuser, to drop all of the open connections to a given database:</strong></p>
<pre>select pg_terminate_backend(procpid) from pg_stat_activity where datname='YourDatabase';</pre>
<p>&#8211;</p>
<p>Here are some references to the functions:</p>
<p><a href="http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL-TABLE">http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL-TABLE</a></p>
<p><a href="http://www.postgresql.org/docs/8.4/static/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE">http://www.postgresql.org/docs/8.4/static/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE</a></p>
<p>&nbsp;</p>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/drop-database/'>Drop Database</a>, <a href='http://blog.gahooa.com/tag/kill-process/'>Kill Process</a>, <a href='http://blog.gahooa.com/tag/postgresql/'>PostgreSQL</a>, <a href='http://blog.gahooa.com/tag/process/'>Process</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/379/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=379&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2010/11/03/how-to-force-drop-a-postgresql-database-by-killing-off-connection-processes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>How to checkout and track a remote git branch</title>
		<link>http://blog.gahooa.com/2010/07/09/how-to-checkout-and-track-a-remote-git-branch/</link>
		<comments>http://blog.gahooa.com/2010/07/09/how-to-checkout-and-track-a-remote-git-branch/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 18:16:08 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git branch]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=239</guid>
		<description><![CDATA[One of those really handy things to remember&#8230;  When git &#8220;tracks&#8221; a branch, it basically sets up an entry in .git/config which tells git what to do with push and pull.  For example: I had a remote branch called Task/Round3.3. I wanted to work on it locally, but have push and pull work right. So [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=239&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of those really handy things to remember&#8230;  When git &#8220;tracks&#8221; a branch, it basically sets up an entry in .git/config which tells git what to do with push and pull.  For example:</p>
<p>I had a remote branch called Task/Round3.3.</p>
<p><strong>I wanted to work on it locally, but have push and pull work right.</strong></p>
<p>So I ran this:</p>
<pre><span style="color:#0000ff;">git checkout -b Task/Round3.3 --track origin/Task/Round3.3</span></pre>
<p>To which git said:</p>
<pre><span style="color:#0000ff;">Branch Task/Round3.3 set up to track remote branch refs/remotes/origin/Task/Round3.3.
Switched to a new branch "Task/Round3.3"</span></pre>
<p>And in .git/config, these lines were added:</p>
<pre><span style="color:#0000ff;">[branch "Task/Round3.3"]
remote = origin
merge = refs/heads/Task/Round3.3</span></pre>
<p>Now, when I checkout Task/Round3.3, I am able to say `git pull` and `git push`, and it will do the &#8220;right thing&#8221;&#8230;</p>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/git/'>git</a>, <a href='http://blog.gahooa.com/tag/git-branch/'>git branch</a>, <a href='http://blog.gahooa.com/tag/version-control/'>version control</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=239&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2010/07/09/how-to-checkout-and-track-a-remote-git-branch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu Post-Install tips&#8230;</title>
		<link>http://blog.gahooa.com/2010/06/14/ubuntu-post-install-tips/</link>
		<comments>http://blog.gahooa.com/2010/06/14/ubuntu-post-install-tips/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 21:10:51 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Partner Repositories]]></category>
		<category><![CDATA[Ubuntu Setup]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=231</guid>
		<description><![CDATA[I received this from a friend, and thought I would post it here in case anyone would find it useful. After Installing Ubuntu, basically I do this: Go to: System -&#62; Administration -&#62; Software Sources -&#62; Other Sofware, and enable partner repository. After that, we can this on a Terminal: sudo apt-get update sudo apt-get dist-upgrade sudo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=231&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>I received this from a friend, and thought I would post it here in case anyone would find it useful.</strong></p>
<blockquote><p>After Installing Ubuntu, basically I do this:</p>
<p>Go to:<br />
System -&gt; Administration -&gt; Software Sources -&gt; Other Sofware, and enable partner repository.</p>
<p>After that, we can this on a Terminal:</p>
<p>sudo apt-get update<br />
sudo apt-get dist-upgrade<br />
sudo apt-get install ubuntu-restricted-extras<br />
sudo /usr/share/doc/libdvdread4/install-css.sh</p></blockquote>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/ubuntu/'>Ubuntu</a>, <a href='http://blog.gahooa.com/tag/ubuntu-partner-repositories/'>Ubuntu Partner Repositories</a>, <a href='http://blog.gahooa.com/tag/ubuntu-setup/'>Ubuntu Setup</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/231/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/231/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=231&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2010/06/14/ubuntu-post-install-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>nginx restart error</title>
		<link>http://blog.gahooa.com/2010/02/24/nginx-restart-error/</link>
		<comments>http://blog.gahooa.com/2010/02/24/nginx-restart-error/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:32:10 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx configuration]]></category>
		<category><![CDATA[nginx error]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=209</guid>
		<description><![CDATA[Was playing around with nginx on Centos 5 (EPEL package). Most of the time I ran: I would get this message in the /var/log/nginx/error.log file: After some hunting around, it appears to be a known bug in nginx (perhaps perl in nginx?)&#8230; Anyway, a simple workaround is to do this: Or, simply edit /etc/init.d/nginx, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=209&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Was playing around with nginx on Centos 5 (EPEL package).</p>
<p>Most of the time I ran:</p>
<p><pre class="brush: plain;">service nginx restart</pre></p>
<p>I would get this message in the /var/log/nginx/error.log file:</p>
<p><pre class="brush: plain;">panic: MUTEX_LOCK (22) [op.c:352].</pre></p>
<p>After some hunting around, it appears to be a known bug in nginx (perhaps perl in nginx?)&#8230; Anyway, a simple workaround is to do this:</p>
<p><pre class="brush: plain;">
service nginx stop
service nginx start
</pre></p>
<p>Or, simply edit <strong>/etc/init.d/nginx, and add the sleep 1 line:</strong></p>
<p><pre class="brush: plain;">
51 restart() {
52     configtest || return $?
53     stop
54     sleep 1
55     start
56 }
</pre></p>
<p>Nice workround!</p>
<br /> Tagged: <a href='http://blog.gahooa.com/tag/nginx/'>nginx</a>, <a href='http://blog.gahooa.com/tag/nginx-configuration/'>nginx configuration</a>, <a href='http://blog.gahooa.com/tag/nginx-error/'>nginx error</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=209&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2010/02/24/nginx-restart-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Example Automated MySQL Backup Script</title>
		<link>http://blog.gahooa.com/2009/12/26/example-automated-mysql-backup-script/</link>
		<comments>http://blog.gahooa.com/2009/12/26/example-automated-mysql-backup-script/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 18:23:21 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Backup Script]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=190</guid>
		<description><![CDATA[Rather than use --all-databases, which will prevent you from being able to selectively restore any single database, consider the following: Ideally, you should have a daily backup, with some history. It should be bulletproof (--force), it should be logged (&#62;&#62; ...log), it should be compressed (&#124; gzip), it should keep separate copies of each database, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=190&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Rather than use <code>--all-databases</code>, which will prevent you from being able to selectively restore any single database, consider the following:</p>
<p>Ideally, you should have a daily backup, with some history.  It should be bulletproof (<code>--force</code>), it should be logged (<code>&gt;&gt; ...log</code>), it should be compressed (<code>| gzip</code>), it should keep separate copies of each database, and it should automatically pick up any databases that are added.</p>
<p><strong>Consider, rather, a shell script like this:</strong></p>
<pre>
<pre class="brush: bash;">
#!/bin/bash

Host=server.domain.com
BDir=/home/backup/backup/mysql

Dump=&quot;/usr/bin/mysqldump --skip-extended-insert --force&quot;
MySQL=/usr/bin/mysql

Today=$(date &quot;+%a&quot;)

# Get a list of all databases
Databases=$(echo &quot;SHOW DATABASES&quot; | $MySQL -h $Host)

for db in $Databases; do
        date=`date`
        file=&quot;$BDir/$Host-$db-$Today.sql.gz&quot;
        echo &quot;Backing up '$db' from '$Host' on '$date' to: &quot;
        echo &quot;   $file&quot;
        $Dump -h $Host $db | gzip &gt; $file
done
</pre>
</pre>
<p>Which is assuming that you have a file <code>~/.my.cnf</code> (chmod 600), that has:</p>
<pre>
<pre class="brush: plain;">
[client]
user = &quot;BACKUP&quot;
password = &quot;SOMEPASS8342783492&quot;
</pre>
</pre>
<p>Make sure that whatever user you are using for <code>BACKUP</code> has this grant statement:</p>
<pre>
<pre class="brush: sql;">
GRANT
  SELECT, SHOW VIEW ON *.*
  TO BACKUP@localhost
  IDENTIFIED BY 'SOMEPASS8342783492';
</pre>
</pre>
<p>So simply add this to a nightly cronjob, and you have a daily backup that rotates each 7 days week.</p>
<pre>
<pre class="brush: plain;">
0 3 * * *   backup-mysql &gt;&gt; backup-mysql.log 2&gt;&gt; backup-mysql.log
</pre>
</pre>
<hr />
<p>The backup directory then contains:</p>
<pre>-rw-r--r-- 1 backup backup 2217482184 Sep  3 13:35 base.appcove.net-VOS4_0-20090903.sql.gz
-rw-rw-r-- 1 backup backup 2505876287 Dec 25 00:48 base.appcove.net-VOS4_0-Fri.sql.gz
-rw-r--r-- 1 backup backup 2500384029 Dec 21 00:48 base.appcove.net-VOS4_0-Mon.sql.gz
-rw-r--r-- 1 backup backup 2506849331 Dec 26 00:48 base.appcove.net-VOS4_0-Sat.sql.gz
-rw-r--r-- 1 backup backup 2499859469 Dec 20 00:48 base.appcove.net-VOS4_0-Sun.sql.gz
-rw-rw-r-- 1 backup backup 2505046147 Dec 24 00:48 base.appcove.net-VOS4_0-Thu.sql.gz
-rw-rw-r-- 1 backup backup 2502277743 Dec 22 00:48 base.appcove.net-VOS4_0-Tue.sql.gz
-rw-r--r-- 1 backup backup 2504169910 Dec 23 00:48 base.appcove.net-VOS4_0-Wed.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 25 00:49 base.appcove.net-VOS4_Mail_0-Fri.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 21 00:49 base.appcove.net-VOS4_Mail_0-Mon.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 26 00:49 base.appcove.net-VOS4_Mail_0-Sat.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 20 00:48 base.appcove.net-VOS4_Mail_0-Sun.sql.gz
-rw-rw-r-- 1 backup backup   76983829 Dec 24 00:49 base.appcove.net-VOS4_Mail_0-Thu.sql.gz
-rw-rw-r-- 1 backup backup   76983829 Dec 22 00:49 base.appcove.net-VOS4_Mail_0-Tue.sql.gz
-rw-r--r-- 1 backup backup   76983829 Dec 23 00:49 base.appcove.net-VOS4_Mail_0-Wed.sql.gz
-rw-r--r-- 1 backup backup  304803726 Dec 25 00:49 base.appcove.net-WeSell_0-Fri.sql.gz
-rw-r--r-- 1 backup backup  303480087 Dec 21 00:49 base.appcove.net-WeSell_0-Mon.sql.gz
-rw-r--r-- 1 backup backup  304710121 Dec 26 00:49 base.appcove.net-WeSell_0-Sat.sql.gz
-rw-r--r-- 1 backup backup  303791294 Dec 20 00:49 base.appcove.net-WeSell_0-Sun.sql.gz
-rw-rw-r-- 1 backup backup  305315415 Dec 24 00:49 base.appcove.net-WeSell_0-Thu.sql.gz
-rw-rw-r-- 1 backup backup  302516217 Dec 22 00:49 base.appcove.net-WeSell_0-Tue.sql.gz
-rw-r--r-- 1 backup backup  303314217 Dec 23 00:49 base.appcove.net-WeSell_0-Wed.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 25 00:30 dc40.appcove.net-mysql-Fri.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 21 00:30 dc40.appcove.net-mysql-Mon.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 26 00:30 dc40.appcove.net-mysql-Sat.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 20 00:30 dc40.appcove.net-mysql-Sun.sql.gz
-rw-rw-r-- 1 backup backup     135301 Dec 24 00:30 dc40.appcove.net-mysql-Thu.sql.gz
-rw-rw-r-- 1 backup backup     135301 Dec 22 00:30 dc40.appcove.net-mysql-Tue.sql.gz
-rw-r--r-- 1 backup backup     135301 Dec 23 00:30 dc40.appcove.net-mysql-Wed.sql.gz
</pre>
<br /> Tagged: backup, Backup Script, MySQL, System Administration <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=190&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/12/26/example-automated-mysql-backup-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Python 3.1 and mod_wsgi performance notes</title>
		<link>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/</link>
		<comments>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 09:40:31 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[reSearch]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[python 3]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=154</guid>
		<description><![CDATA[We&#8217;re researching the use of Python and mod_wsgi running under apache for developing some extensive web applications.  Here are some notes on a performance test that we recently ran. ================================================================== Server: x86_64 Python 3.1.1 mod_wsgi 3.0c5 apache 2.2 RHEL 5.3 quad core xenon 8 GB ram Development system &#8211; not in production use. ================================================================== Application: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=154&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re researching the use of Python and mod_wsgi running under apache for developing some extensive web applications.  Here are some notes on a performance test that we recently ran.<br />
==================================================================<br />
Server:</p>
<p>x86_64<br />
Python 3.1.1<br />
mod_wsgi 3.0c5<br />
apache 2.2<br />
RHEL 5.3<br />
quad core xenon<br />
8 GB ram</p>
<p>Development system &#8211; not in production use.</p>
<p>==================================================================<br />
Application:</p>
<p>1 import time<br />
2<br />
3 def application(environ, start_response):<br />
4     status = &#8217;200 OK&#8217;<br />
5<br />
6     output = &#8220;hello world!&#8221;<br />
7<br />
8     #time.sleep(1)<br />
9<br />
10     response_headers = [<br />
11         ('Content-type', 'text/plain'),<br />
12         ('Content-Length', str(len(output))),<br />
13         ]<br />
14<br />
15     start_response(status, response_headers)<br />
16<br />
17     return [output]</p>
<p>==================================================================<br />
Apache Configuration:</p>
<p>WSGISocketPrefix run/wsgi<br />
&lt;VirtualHost *&gt;<br />
ServerName <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a><br />
DocumentRoot /home/jason/Code/ShankProject/Web<br />
WSGIScriptAlias /Admin /home/jason/Code/ShankProject/WSGI/<br />
Admin.wsgi<br />
WSGIDaemonProcess <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a> threads=15<br />
WSGIProcessGroup <a style="color:#2a5db0;" href="http://shankproject.jason.star.ionzoft.net/" target="_blank">shankproject.jason.star.ionzoft.net</a><br />
&lt;/VirtualHost&gt;</p>
<p>==================================================================<br />
Tests:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Baseline with one process and 15 threads<br />
# 15 threads total</p>
<p>threads=15<br />
no process definition</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1800 / second<br />
concurrency = 100 &gt;&gt; 3900 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 14 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Get a marginal improvement by doubling the threads to 30<br />
# 30 threads total</p>
<p>threads=30<br />
no process definition</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1680 / second<br />
concurrency = 100 &gt;&gt; 3500 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 30 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Take processes from 1 to 3<br />
# 90 threads total</p>
<p>threads=30<br />
processes=3</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1770 / second<br />
concurrency = 100 &gt;&gt; 3500 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 88 / second</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# Take processes from 3 to 6<br />
# Take threads from 30 to 15<br />
# 90 threads total</p>
<p>threads=30<br />
processes=3</p>
<p>WITHOUT time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1550 / second<br />
concurrency = 100 &gt;&gt; 3300 / second</p>
<p>WITH time.sleep(1)<br />
concurrency = 1  &gt;&gt; 1 / second<br />
concurrency = 100  &gt;&gt; 88 / second</p>
<p>==================================================================<br />
Conclusion:</p>
<p>mod_wsgi performance is outstanding.  Even running slower requests, it<br />
can still handle significant concurrency in daemon mode without any<br />
apparent issues.</p>
<p>Questions:<br />
Is there any information on the balance between more processes less<br />
threads and more threads less processes?</p>
<p>Thanks!</p>
<br /> Tagged: Apache, mod_wsgi, Performance, Python, python 3 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=154&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/10/11/python-3-1-and-mod_wsgi-performance-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Interesting Thoughts on Cloud Server Performance</title>
		<link>http://blog.gahooa.com/2009/08/01/interesting-thoughts-on-cloud-server-performance/</link>
		<comments>http://blog.gahooa.com/2009/08/01/interesting-thoughts-on-cloud-server-performance/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 21:47:29 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[AB]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Benchmarking]]></category>
		<category><![CDATA[Cloud Server]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=145</guid>
		<description><![CDATA[Apache load testing on a Cloud Server &#8211; Jason &#8211; 7/31/2009 I recently created a cloud server for a wordpress blog, and configured it to the point that the blog was working OK.  Then I decided to check the performance aspects of the server, as it was a small 256 MB + 10GB machine. Using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=145&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-size:medium;">Apache load testing on a Cloud Server</span></strong><span style="font-weight:normal;"><strong><span style="font-size:medium;"><span style="font-size:medium;"> &#8211; Jason &#8211; 7/31/2009</span></span></strong></span></p>
<div></div>
<div>I recently created a cloud server for a wordpress blog, and configured it to the point that the blog was working OK.  Then I decided to check the performance aspects of the server, as it was a small <strong><span style="color:#0000ff;">256 MB + 10GB</span></strong> machine.</div>
<div>Using apachebench (ab), I ran some load tests on the blog home page.  <strong>The server choked to death.</strong> It was swapping so bad, that RackSpace Cloud sent me this email:</div>
<blockquote><p><span style="font-family:arial;"><em>This is an automatic notification to let you know that your Cloud Server, </em><a style="color:#2a5db0;" href="http://city.appcove.com/" target="_blank"><em>city.appcove.com</em></a><em>, is showing a considerable amount of consistent swapping activity. Quite often this is an indicator that your application or database are not as efficient as they could be. It also may indicate that you need to upgrade your Cloud Server for more RAM.</em></span></p></blockquote>
<div>That&#8217;s strange&#8230;</div>
<div>I found that the response rate was:</div>
<p style="padding-left:30px;"><strong>4 requests per second, 10 concurrent connections</strong></p>
<div>When the concurrency was raised to 50, the server died.  It took 10 minutes for it to calm down enough that I could LOG IN and KILL apache.</div>
<div>&#8211;</div>
<div>So upon further investingation, I found that the default httpd.conf configuration was <strong>WAY TOO LARGE</strong>:</div>
<div></div>
<div>We&#8217;re only working with 256 MB ram here, so if each apache process takes up any amount of memory at all, we have a low limit.</div>
<p style="padding-left:30px;"><span style="font-family:'Courier New';">&lt;IfModule prefork.c&gt;</span><br />
<span style="font-family:'Courier New';">StartServers       8</span><br />
<span style="font-family:'Courier New';">MinSpareServers    5</span><br />
<span style="font-family:'Courier New';">MaxSpareServers   20</span><br />
<span style="font-family:'Courier New';color:#0000ff;">ServerLimit      256</span><br />
<span style="font-family:'Courier New';color:#0000ff;">MaxClients       256</span><br />
<span style="font-family:'Courier New';">MaxRequestsPerChild  4000</span><br />
<span style="font-family:'Courier New';">&lt;/IfModule&gt;</span></p>
<div>
<div>Only after drastically reducing the configuration to the following, did we get reasonable performance:</div>
</div>
<p style="padding-left:30px;"><span style="font-family:'Courier New';">&lt;IfModule prefork.c&gt;</span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">StartServers       4</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">MinSpareServers    2</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">MaxSpareServers   4</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">ServerLimit      4</span></span><br />
<span style="font-family:'Courier New';"><span style="color:#0000ff;">MaxClients       4</span></span><br />
<span style="font-family:'Courier New';">MaxRequestsPerChild  4000</span><br />
<span style="font-family:'Courier New';">&lt;/IfModule&gt;</span></p>
<div>
<div></div>
</div>
<div>
<div>As it turns out, the performance went up considerably:</div>
</div>
<p style="padding-left:30px;"><strong>16 requests per second, 50 concurrent connections</strong></p>
<div>
<div>
<div>Still, I thought that it could get better.  So I looked into installing some PHP opcode caching software.</div>
</div>
</div>
<blockquote><p><a id="n41." title="http://www.php.net/manual/en/intro.apc.php" href="http://www.php.net/manual/en/intro.apc.php"><em>http://www.php.net/manual/en/intro.apc.php</em></a></p>
<p><em>The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.</em></p></blockquote>
<div>
<div></div>
<div>As it turns out, it was easy to install.</div>
</div>
<p style="padding-left:30px;"><span style="font-family:'Courier New';"># yum install php-pecl-apc</span></p>
<div>
<div>And after restarting apache:</div>
</div>
<p style="padding-left:30px;"><strong>47 requests per second, 50 concurrent connections</strong></p>
<div>
<div>Even during this load test, the site was still responsive from a web browser.</div>
<div></div>
<div>Not bad for a cheap little Cloud Server, eh?</div>
</div>
<br /> Tagged: AB, Apache, Benchmarking, Cloud Server, Performance <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=145&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/08/01/interesting-thoughts-on-cloud-server-performance/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
		<item>
		<title>Updating a cert on the Cisco 11500 Series Content Services Switches (CSS)</title>
		<link>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/</link>
		<comments>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 03:21:52 +0000</pubDate>
		<dc:creator>Jason Garber</dc:creator>
				<category><![CDATA[AppCove]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Cisco CSS]]></category>
		<category><![CDATA[SSL Certificates]]></category>

		<guid isPermaLink="false">http://blog.gahooa.com/?p=121</guid>
		<description><![CDATA[Upgrading a SSL certificate using the Cisco 11500 Series Content Services Switch (CSS) <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=121&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having recently moved some of our hosting infrastructure to the excellent <a href="http://www.rackspace.com/solutions/managed_hosting/colocation/index.php">Rackspace Platform group</a>, we inherited the management of the <a href="http://www.cisco.com/en/US/products/hw/contnetw/ps792/">Cisco 11500 Series Content Services Switches (CSS)</a>, which we use for general load balancing + ssl termination.</p>
<blockquote><p>As a side note, it&#8217;s really powerful, fast, and well, plain nice.  Not having to manage SSL certs on each apache instance is really nice, and all the LAN communication is done over plain old HTTP.</p></blockquote>
<p>This blog post is a regurgitation of some notes I took internally.  Perhaps someone who finds themselves managing this device will benefit&#8230;</p>
<hr />The task at hand was re-issuing and updating one of our primary wildcard certificates that powers a lot of subdomains.</p>
<h3>The first step is to generate the key, csr, and crt&#8230;</h3>
<p>All these files should be:</p>
<ul>
<li>Named the same as the domain that SSL is being generated for.</li>
<li>use WILD for a wildcard subdomain</li>
<li>Use this format &#8220;www.domain.com-0810.key&#8221;, where 08 is the from year and 10 is the to year</li>
<li>(the short version is because of name length limits on the CSS)</li>
</ul>
<p><span style="font-weight:bold;">Start by generating the key and csr</span></p>
<p>This should be done in the ciscoftp role under the ~/load directory</p>
<pre># openssl genrsa -out WILD.vosecure.com-0810.key 1024
# openssl req -new -key WILD.vosecure.com-0810.key -out WILD.vosecure.com-0810.csr</pre>
<p><span style="font-weight:bold;">Then get the certificate issued by (global sign)</span></p>
<p>Put the certificate into the the ~/load directory.  When done, it should look like:</p>
<pre>-rw-rw-r-- 1 ciscoftp ciscoftp  3139 Apr  6 15:59 WILD.vosecure.com-0810.crt
-rw-rw-r-- 1 ciscoftp ciscoftp   773 Apr  6 15:49 WILD.vosecure.com-0810.csr
-rw-rw-r-- 1 ciscoftp ciscoftp   883 Apr  6 15:47 WILD.vosecure.com-0810.key</pre>
<p><span style="font-weight:bold;">Put the crt and key onto the load balancer</span></p>
<p>To do this, use the &#8220;copy command&#8221; on the load balancer</p>
<pre>20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.crt PEM "rack"
20132-201292# copy ssl ftp base import WILD.vosecure.com-0810.key PEM "rack"

Then make the associations...

20132-201292# config
20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt
20132-201292(config)# ssl associate cert WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key</pre>
<h3>Now, it&#8217;s time to install it.  <span style="color:#ff0000;">Requires SSL downtime!</span></h3>
<ol>
<li>Suspend the SSL content rule</li>
<li>Suspend the SSL service</li>
<li>Suspend the SSL proxy list</li>
<li>Run the updates</li>
<li>Activate the SSL proxy list</li>
<li>Activate the SSL service</li>
<li>Activate the SSL content rule</li>
</ol>
<p><span style="font-weight:bold;">Here are the exact commands:</span></p>
<pre>20132-201292# config
20132-201292(config)# owner vosecure.com
20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl
20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# suspend

20132-201292# config
20132-201292(config)# service ssl-service
20132-201292(config-service[ssl-service])# suspend

20132-201292# config
20132-201292(config)# ssl-proxy-list ssl-proxy</pre>
<p style="color:#f00;">In the following commands, we remove the whole ssl-server so that it shows up at the bottom in one concise unit.  Otherwise, the startup-config and running-config become fragmented.</p>
<pre>20132-201292(config-ssl-proxy-list[ssl-proxy])# suspend
20132-201292(config-ssl-proxy-list[ssl-proxy])# no ssl-server 6
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsakey WILD.vosecure.com-0810.key
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 rsacert WILD.vosecure.com-0810.crt
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 vip address 192.168.1.161
20132-201292(config-ssl-proxy-list[ssl-proxy])# ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81
20132-201292(config-ssl-proxy-list[ssl-proxy])# active

20132-201292# config
20132-201292(config)# service ssl-service
20132-201292(config-service[ssl-service])# active

20132-201292# config
20132-201292(config)# owner vosecure.com
20132-201292(config-owner[vosecure.com])# content 74.205.111.161-ssl
20132-201292(config-owner-content[vosecure.com-74.205.111.161-ssl])# active

<span style="color:#f00;">Test test test.  Firefox, IE, Chrome...</span>

20132-201292# copy running-config ftp base running-config

<span style="color:#f00;">Review changes with git diff</span>

20132-201292# write memory

20132-201292# copy startup-config ftp base startup-config</pre>
<h3>And&#8230; Here is the git diff</h3>
<pre>diff --git a/load/startup-config b/load/startup-config
index 7042490..36fbbaa 100644
--- a/load/startup-config
+++ b/load/startup-config
@@ -1,4 +1,4 @@
-!Generated on 04/06/2009 16:05:48
+!Generated on 04/06/2009 21:51:02
!Active version: sg0810205

@@ -64,6 +64,8 @@ configure
<span style="color:#339966;">+  ssl associate rsakey WILD.vosecure.com-0810.key WILD.vosecure.com-0810.key
+  ssl associate cert WILD.vosecure.com-0810.crt WILD.vosecure.com-0810.crt

</span>!*********************** SSL PROXY LIST ***********************
ssl-proxy-list ssl-proxy
<span style="color:#ff6600;">-  ssl-server 6
-  ssl-server 6 rsakey vosecure.com(080421-04300)-key
-  ssl-server 6 rsacert vosecure.com(080421-04300)-cert
-  ssl-server 6 vip address 192.168.1.161
-  ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81</span>
@@ -146,6 +141,11 @@ ssl-proxy-list ssl-proxy
<span style="color:#339966;">+  ssl-server 6
+  ssl-server 6 rsakey WILD.vosecure.com-0810.key
+  ssl-server 6 rsacert WILD.vosecure.com-0810.crt
+  ssl-server 6 vip address 192.168.1.161
+  ssl-server 6 cipher rsa-with-rc4-128-sha 192.168.1.161 81</span>
active</pre>
<br /> Tagged: Cisco CSS, SSL Certificates, System Administration <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gahooa.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gahooa.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gahooa.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.gahooa.com&amp;blog=6218261&amp;post=121&amp;subd=gahooa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.gahooa.com/2009/04/06/updating-a-cert-on-the-cisco-11500-series-content-services-switches-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">gahooa</media:title>
		</media:content>
	</item>
	</channel>
</rss>
