<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>Here&apos;s A Nickel, Kid</title>
   <link rel="alternate" type="text/html" href="http://www.seppuku.net/blog/" />
   <link rel="self" type="application/atom+xml" href="http://www.seppuku.net/blog/atom.xml" />
   <id>tag:www.seppuku.net,2010:/blog//2</id>
   <updated>2009-02-12T04:30:51Z</updated>
   
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.23-en</generator>


<entry>
   <title>Wrangling Solaris Zone Consoles</title>
   <link rel="alternate" type="text/html" href="http://www.seppuku.net/blog/2009/02/wrangling_solaris_zone_console.html" />
   <id>tag:www.seppuku.net,2009:/blog//1.7</id>
   
   <published>2009-02-11T17:44:51Z</published>
   <updated>2009-02-12T04:30:51Z</updated>
   
   <summary>After running with several zones in production for a while, I wanted a better way to log things like console messages, since some things will still occasionally spit them out. For a little bit I tried using screen with a...</summary>
   <author>
      <name>Ivan Richwalski</name>
      
   </author>
   
      <category term="SysAdmin" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.seppuku.net/blog/">
      <![CDATA[After running with several zones in production for a while, I wanted a better way to log things like console messages, since some things will still occasionally spit them out. For a little bit I tried using [screen](http://www.gnu.org/software/screen/ "GNU screen") with a bunch of open windows running <code>zlogin</code> to each zone.  But settled on using [conserver](http://conserver.com/) since it's very well suited for handling access to multiple consoles.

You can download both my sample config file and SMF manifest [here](http://seppuku.net/src/conserver-zones/).

At first I looked into the method that <code>zlogin</code> itself uses when connecting to the zone console, which talks over a unix domain socket to <code>zoneadmd</code> after a short handshake.  But that has a couple issues, one of which is that it's not a supported interface, and could change at some point in the future.  Also if the <code>zoneadmd</code> is not yet running, <code>zlogin</code> handles starting it, which establishes the console socket:

    default zlogin {
        type exec;
        host localhost;
        exec /usr/sbin/zlogin -CE &;
        execsubst &=cs;
    }
    console web { include zlogin-bigbox; }

Instead I stuck with using <code>zlogin</code> itself, using -E to disable being able to escape out of the <code>zlogin</code> command.  Now <code>conserver</code> launches <code>zlogin</code> and keeps control of the zone's console as long as it is running.  It does have a few extra processes around, since there's a shell forked for each zone, which then runs <code>zlogin</code>.

The SMF manifest supports authorizations, so a non-root user can manage the service.  I've been creating my own authorizations seperate from the solaris.* namespace.  The trick is adding "toplevel.*,toplevel.grant" to root's auths in <code>/etc/user_attr</code>:

    # tail -4 /etc/security/auth_attr
    seppuku.:::All Seppuku Authorizations::
    seppuku.grant:::Grant All Seppuku Authorizations::
    seppuku.smf.manage.conserver:::Manage Console Server Service::
    seppuku.smf.modify.conserver:::Modify Console Server Properties::
    # usermod -A seppuku.smf.manage.conserver ivan

One possible addition would be to run the service as a seperate user with a new RBAC profile that allows that user to run <code>zlogin</code> only.  The default Solaris "Zone Management" profile also allows the use of <code>zonecfg</code> and <code>zoneadm</code>.

]]>
      
   </content>
</entry>

<entry>
   <title><![CDATA[&quot;Fixing&quot; Cable Modem Lockups]]></title>
   <link rel="alternate" type="text/html" href="http://www.seppuku.net/blog/2008/11/fixing_cable_modem_lockups.html" />
   <id>tag:www.seppuku.net,2008:/blog//1.6</id>
   
   <published>2008-11-17T21:54:02Z</published>
   <updated>2008-11-17T23:06:37Z</updated>
   
   <summary>For quite a while now, we&apos;d been having issues with the modem for our Time Warner Business Class service locking up, and needing to be power cycled to get back online. I&apos;ve tried to track down what causes it, but...</summary>
   <author>
      <name>Ivan Richwalski</name>
      
   </author>
   
      <category term="SysAdmin" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.seppuku.net/blog/">
      <![CDATA[For quite a while now, we'd been having issues with the modem for our Time Warner Business Class service locking up, and needing to be power cycled to get back online.  I've tried to track down what causes it, but haven't been able to reproduce the exact same conditions. It's not related to the overall traffic load, since the modem seemed as likely to freeze in the middle of the night on a weekend as it would during normal business hours on a weekday.

By polling the SNMP counters from our switch once a minute, I can see an increase in broadcast packets around the same time the modem would freeze, but that's about as deep as I've gotten.  
After going through another round of multiple calls to the help line, and eventually getting a tech sent out again to replace the modem ( the 4th in 2 years ), I figured there had to be a better way than having to run across town to pull the plug.

I did some searching and reading up, then went to ebay and picked up a couple X10 control modules.  For the actual switches, I got 2 <a href="http://kbase.x10.com/wiki/AM466">AM 466 Appliance Modules</a>, with the second unit on hand if I wanted to control the power on something else.  Then to talk to them from the servers, an <a href="http://kbase.x10.com/wiki/CM11A">X10 CM11A</a> computer interface module.  The CM11A plugs into a serial port, and is driven by a <a href="http://www.heyu.org/">Heyu</a>.

While Heyu provides lots of nice automation features if I wanted to control lights and such, all I really needed was just a way to command the modules on and off.  I used the script from this <a href="http://ralf.alfray.com/photos/Misc/DSL-X10/">X10 DSL</a> page as the base for my own, which attempts to do a simple DNS lookup from the local RoadRunner DNS servers.  If it fails to get a response from both DNS servers, it will cycle the power on the modem.

So far things have been up and running for almost a month, and the script has reset the cable modem about half a dozen times, and saved me a lot of annoyance and pain.  I need to clean the script up and make it a smarter, along with write up a manifest file to get it running under SMF in Solaris.  When that's done I'll put it up, I'm sure it'll be useful to others.
]]>
      
   </content>
</entry>

<entry>
   <title><![CDATA[Why they don&apos;t let me do web design]]></title>
   <link rel="alternate" type="text/html" href="http://www.seppuku.net/blog/2007/09/why_they_dont_let_me_do_web_de.html" />
   <id>tag:www.seppuku.net,2007:/blog//1.5</id>
   
   <published>2007-09-24T22:38:16Z</published>
   <updated>2008-08-15T08:46:00Z</updated>
   
   <summary>I was talking to someone about doing some website work lately. While my part of the work is mainly focused on the back end ( php, some xml/xsl, and a bit of ajax ), I was trying to explain how...</summary>
   <author>
      <name>Ivan Richwalski</name>
      
   </author>
   
      <category term="Programming" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.seppuku.net/blog/">
      <![CDATA[I was talking to someone about doing some website work lately.  While my part of the work is mainly focused on the back end ( php, some xml/xsl, and a bit of ajax ), I was trying to explain how it would be tied together on the front end to make a nice, fast loading, single page product ordering wizard.  And it's kind of hard explaining how the interface will look, what parts of the html will dynamically change, and how that all ties to the structure of the HTML; and other output from the php I'll be writing.  So, I got out a simple online drawing tool, and sketched this out:

<img src="/images/ivan-webdesign.jpg">

Broken down, it's one large containing DIV.  An upper DIV which holds a series of tabs relating to the product options.  Below that, a main content area, divided into 2 sections.  An options selection area on the left, and a product preview on the right.

As <a href="http://incompetech.com/">Kevin</a> likes to say, "It makes sense in my head."

Ivan.]]>
      
   </content>
</entry>

<entry>
   <title>iPhone visits incompetech</title>
   <link rel="alternate" type="text/html" href="http://www.seppuku.net/blog/2007/05/iphone_visits_incompetech.html" />
   <id>tag:www.seppuku.net,2007:/blog//1.3</id>
   
   <published>2007-05-27T04:13:30Z</published>
   <updated>2008-08-15T08:46:56Z</updated>
   
   <summary>I saw the iPhone used to browse MacRumors.com story yesterday, and figured I&apos;d check the logs for incompetech.com, since it gets plenty of traffic. There were several hits, and after cutting out the css and images, here&apos;s what&apos;s left: May...</summary>
   <author>
      <name>Ivan Richwalski</name>
      
   </author>
   
      <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.seppuku.net/blog/">
      <![CDATA[I saw the <a href="http://www.macrumors.com/2007/05/25/iphone-used-to-browse-macrumors-com/">iPhone used to browse MacRumors.com</a> story yesterday, and figured I'd check the logs for <a href="http://incompetech.com/">incompetech.com</a>, since it gets plenty of traffic.

There were several hits, and after cutting out the css and images, here's what's left:

May  2  9:19 (Apple IP #1) "Mozilla/5.0 (iPhone; U; PPC like Mac OS X; en)
    AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A001a Safari/419.3"<br>
May 18 16:26 (Apple IP #1) "Mozilla/5.0 (iPhone; U; PPC like Mac OS X; en)
    AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A001a Safari/419.3"<br>
May 18 16:35 (Apple IP #2) "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
    AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A530a Safari/419.3"<br>
May 19 03:36 (Comcast IP) "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
    AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A530a Safari/419.3"<br>
May 21 05:25 (Comcast IP) "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)
    AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A533a Safari/419.3"<br>

Interesting things that I noticed:

The very 1st request on May 2nd fetched only 1 page, no images or css.

All the 1st hits gave no referer information, but after fetching the html page, the following requests for css and images listed the right referring page.  Not sure how they picked incompetech, but I guess it's good to know it's on somebody's list.

Looks like the Mobile/* string could be a build identifier, which has been advancing along as bugs are fixed and sites are retested.  It could possibly be a hardware identifier, for keeping track of the prototype units.

Finally, what's the story with the "PPC like"/"CPU like" change? The iPhone was first noticed by <a href="http://my.mowser.com/profiles/blog/show?id=700984:BlogPost:643">Russell Beattie at mowser.com</a> on May 9th, with "PPC like" in the User-agent string.  But other sites posting later in May show the switch to "CPU like".  I don't know if that means the iPhone is running some sort of low power/embeded PowerPC chip, and Apple's trying to obscure things a bit.  Or if it was some unchanged strings left over from porting WebKit/Safari onto whatever hardware the iPhone runs?

In about a month it'll finally be available, so there may be more details coming soon.  Especially how open it will be for third party application development, which would be a real sticking point for me.  One thing that made my Palm Vx great was all the handy little apps and utilities which I used as often as any of the bundled PalmOS apps.]]>
      
   </content>
</entry>

<entry>
   <title>International Graph Paper Day</title>
   <link rel="alternate" type="text/html" href="http://www.seppuku.net/blog/2007/04/international_graph_paper_day.html" />
   <id>tag:www.seppuku.net,2007:/blog//1.2</id>
   
   <published>2007-04-25T05:19:39Z</published>
   <updated>2008-08-15T08:48:05Z</updated>
   
   <summary>In an event not much heralded around the world, Kevin declared April 22nd to be &quot;International Graph Paper Day&quot;. The reason for this declaration was the unveiling of the newly revitalized graph paper section for Incompetech.com. I&apos;ve been working on...</summary>
   <author>
      <name>Ivan Richwalski</name>
      
   </author>
   
      <category term="Programming" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.seppuku.net/blog/">
      <![CDATA[In an event not much heralded around the world, <a href="http://incompetech.com/">Kevin</a> declared April 22nd to be "International Graph Paper Day".  The reason for this declaration was the unveiling of the newly revitalized <a href="http://incompetech.com/graphpaper/">graph paper section</a> for Incompetech.com.

I've been working on the project for quite a while, so here's my behind the scenes view of things.

]]>
      <![CDATA[By "revitalized", I mean in the sense of "Bulldoze the old run down tenement buildings and build new high rise condos".  All the old graph paper generators had evolved over the years, starting from the first one that Kevin made the night he needed some graph paper, but it was late and all the office supply stores were closed.  Since then, as people asked for other formats, they were added by copying one of the existing scripts and making the needed changes.  This resulted in a lot of duplicated code, not just in the scripts, but several copies of the perl based PDF library they used.

With the rewrite, all the scripts are using <a href="http://search.cpan.org/search?query=PDF%3A%3AAPI2&mode=module">PDF::API2</a>, along with a module for many of the functions that used to be duplicated in all the scripts.  Now the graph paper scripts are a little bit smaller, with better error checking, and even smaller output PDFs since PDF::API2 does compression ( the old Pdf library didn't ). To make things faster, everything is running inside Apache with mod_perl, vs. the old ones running as CGI scripts.

To the user, the pages look largely unchanged, with the exception of the new javascript based color picker.  In the past when I pointed people to the graph paper generators, the complaint I heard most often was about the odd way of selecting a color. The old way ( specifying the Red/Green/Blue as numbers between 0 and 1 ) was not intuitive, unless you  really knew (0.9,0.8,0.125) was that right shade of golden yellow.  It was this way because that was how the old PDF library took its color input, and was quick and easy to code back on that night when Kevin just needed a couple sheets of lined graph paper.

The new color picker is based off of the ColorJack <a href="http://www.colorjack.com/plugin/">DHTML Color Picker</a>, with some minor changes and a couple bug fixes I caught while figuring out it worked.  I'll take a look at my changes and see about getting them back to the author, but I just looked at the site while making this post, and see it's been updated with a newer version.

The final key to making everything a smooth transition was making sure that people coming to the old URLs would end up at the new URL.  That was just a bunch of work, digging through Apache's access_log, digging up all the URLs that people were using, and redirecting them from the old to the new location.  In the end, the list ended up with 90 paths to redirect, using "301 Moved Permanently" so search engines will pick up on the new path.

Now that the big update is complete, that section of the site will easier to manage in the future, and adding new graph paper formats should be a lot easier than it had been.  I know Kevin has a couple requests in the queue that he'd been holding off on until this was all done.
]]>
   </content>
</entry>

<entry>
   <title>First Post, Finally</title>
   <link rel="alternate" type="text/html" href="http://www.seppuku.net/blog/2007/04/first_post_finally.html" />
   <id>tag:www.seppuku.net,2007:/blog//1.1</id>
   
   <published>2007-04-23T05:45:44Z</published>
   <updated>2008-08-15T08:49:24Z</updated>
   
   <summary>I&apos;ve been thinking off and on about putting up a blog. Ok, actually for probably closer to a year. Finally, after much delay, I just dove into it tonight and got things running. I don&apos;t have some sort of grand...</summary>
   <author>
      <name>Ivan Richwalski</name>
      
   </author>
   
      <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.seppuku.net/blog/">
      I&apos;ve been thinking off and on about putting up a blog.  Ok, actually for probably closer to a year.

Finally, after much delay, I just dove into it tonight and got things running.  I don&apos;t have some sort of grand plan on what will appear here, but I&apos;ll use it to keep up with various things I&apos;ve been working on, especially regarding OpenSolaris, Unix, system administration and programming in general.

      
   </content>
</entry>

</feed>