<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
	
	<channel>
		<title>The Blog of Ben Rockwood</title>
		<link>http://www.cuddletech.com</link>
		<description>use unix or die.</description>
		<language>en</language>
		<managingEditor>benr@cuddletech.com</managingEditor>
                <copyright>Copyright 2008</copyright>
		<generator>Pivot Pivot - 1.30 RC2: 'Rippersnapper'</generator>
		<pubDate>Thu, 24 Jul 2008 21:24:15 +0000</pubDate>
		<ttl>60</ttl>
		
		
		
		
		<item>
			<title>WARGAMES IN THEATER TONIGHT ONLY!!!!!!!!</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=954</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=954#comm</comments>
                        <description><![CDATA[ <p>
This is very important, WarGames, the most important geek film ever made, is in theaters <b>TONIGHT</b> at 7:30pm.  ONE SHOWING ONLY.
</p>
<img src="http://gorro.student.utwente.nl/films/images/WarGames3.jpg">
<p>
This film has been hugely influential for me, and many others.  That awesome unbuttoned shirt over tshirt look that we emulate to this day, decades of trying to get text-to-voice to sound like the film (which was an actor reading the lines word by word in reverse), and who didn't fall in love with Ally Sheedy!!!
</p>
<img src="http://www.imsai.net/images/war_image/212A.jpg">
<p>
Don't be dumb!!!  Go!  Tonight!  7:30PM!!!
</p>
<img src="http://www.nikgupta.com/images/wargames-1.jpg" width="500"> ]]></description>
			<guid isPermaLink="false">954@http://www.cuddletech.com/</guid>
			<category>cuddletech</category>
			<pubDate>Thu, 24 Jul 2008 21:24:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>DTrace IP Provider... Oh no you didn't....</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=953</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=953#comm</comments>
                        <description><![CDATA[ <p>
In my previous post about the IP Provider I got the following comment: <i>"There is nothing unpleasant about the wonderfulness that is tcpdump! You’ll need to put a lot of work in to match tcpdump’s usefulness with Dtrace…"</i>
</p>
<p>
That just sounds like a challenge.  Bring it on!  Can <i>snoop</i> or <i>tcpdump</i> do this?
</p>
<pre>
root@ultra ~$ ./ip_whosent.d 
Packet sent to 192.168.100.4: 88 byte packet on behalf of ssh (PID: 1075)
Packet sent to 192.168.100.4: 88 byte packet on behalf of ssh (PID: 1075)
Packet sent to 208.67.222.222: 56 byte packet on behalf of nscd (PID: 152)
Packet sent to 208.67.222.222: 71 byte packet on behalf of nscd (PID: 152)
Packet sent to 208.67.222.222: 56 byte packet on behalf of nscd (PID: 152)
Packet sent to 72.14.207.99: 52 byte packet on behalf of firefox-bin (PID: 1944)
Packet sent to 8.12.32.9: 52 byte packet on behalf of thunderbird-bin (PID: 1133)
Packet sent to 8.12.32.9: 54 byte packet on behalf of thunderbird-bin (PID: 1133)
Packet sent to 8.12.32.9: 87 byte packet on behalf of thunderbird-bin (PID: 1133)
Packet sent to 8.12.32.9: 58 byte packet on behalf of thunderbird-bin (PID: 1133)
Packet sent to 8.12.32.9: 64 byte packet on behalf of thunderbird-bin (PID: 1133)
Packet sent to 8.12.32.9: 65 byte packet on behalf of thunderbird-bin (PID: 1133)
Packet sent to 208.67.219.230: 644 byte packet on behalf of firefox-bin (PID: 1944)
Packet sent to 208.67.219.230: 637 byte packet on behalf of firefox-bin (PID: 1944)
Packet sent to 72.14.207.99: 660 byte packet on behalf of firefox-bin (PID: 1944)
Packet sent to 208.67.219.230: 52 byte packet on behalf of firefox-bin (PID: 1944)
Packet sent to 208.67.219.230: 664 byte packet on behalf of firefox-bin (PID: 1944)
Packet sent to 8.12.32.9: 48 byte packet on behalf of thunderbird-bin (PID: 1133)
Packet sent to 72.14.207.99: 40 byte packet on behalf of firefox-bin (PID: 1944)
^C
</pre>
<p>
Here is the script:
</p>
<pre>
#!/usr/sbin/dtrace -qs 



ip:ip:*:send
/execname != "sched"/
{ 
        printf("Packet sent to %s: %d byte packet on behalf of %s (PID: %d)n", 
                        args[2]->ip_daddr, args[4]->ipv4_length, execname, pid ); 
}
</pre>
<p>
Oh but wait....... how about a full call stack on each sent packet?  Just add a new line to the above script: stack();
</p>
<pre>
root@ultra ~$ ./ip_sentstack.d 
Packet sent to 72.14.207.99: 84 byte packet on behalf of ping (PID: 2020)

              ip`ip_wput_ire+0x21f5
              ip`ire_send+0x1c9
              ip`ire_add_then_send+0x2b9
              ip`ip_newroute+0xa0a
              ip`ip_output_options+0x18c7
              ip`icmp_wput+0x44a
              unix`putnext+0x22b
              genunix`strput+0x1ad
              genunix`kstrputmsg+0x261
              sockfs`sosend_dgram+0x26e
              sockfs`sotpi_sendmsg+0x4a8
              sockfs`sendit+0x160
              sockfs`sendto+0x8e
              sockfs`sendto32+0x2d
              unix`sys_syscall32+0x101
</pre>
<p>
Or check out one of the examples <a href="http://wikis.sun.com/display/DTrace/ip+Provider">on the IP Provider wiki page</a> (this is almost certainly by Brendan Gregg):
</p>
<pre>
# ./ipio.d
 CPU  DELTA(us)          SOURCE               DEST      INT  BYTES
   1     598913    10.1.100.123 ->   192.168.10.75  ip.tun0     68
   1         73   192.168.1.108 ->     192.168.5.1     nge0    140
   1      18325   192.168.1.108 <-     192.168.5.1     nge0    140
   1         69    10.1.100.123 <-   192.168.10.75  ip.tun0     68
   0     102921    10.1.100.123 ->   192.168.10.75  ip.tun0     20
   0         79   192.168.1.108 ->     192.168.5.1     nge0     92
</pre>
<p>
Here is the script:
</p>
<pre>
#!/usr/sbin/dtrace -s

#pragma D option quiet
#pragma D option switchrate=10hz

dtrace:::BEGIN
{
        printf(" %3s %10s %15s    %15s %8s %6sn", "CPU", "DELTA(us)",
            "SOURCE", "DEST", "INT", "BYTES");
        last = timestamp;
}

ip:::send
{
        this->elapsed = (timestamp - last) / 1000;
        printf(" %3d %10d %15s -> %15s %8s %6dn", cpu, this->elapsed,
            args[2]->ip_saddr, args[2]->ip_daddr, args[3]->ill_name,
            args[2]->ip_plength);
        last = timestamp;
}

ip:::receive
{
        this->elapsed = (timestamp - last) / 1000;
        printf(" %3d %10d %15s <- %15s %8s %6dn", cpu, this->elapsed,
            args[2]->ip_daddr, args[2]->ip_saddr, args[3]->ill_name,
            args[2]->ip_plength);
        last = timestamp;
}
</pre>
<p>
Can DTrace decrypt IPsec ESP payloads?  No.  Ok, so tcpdump isn't dead yet, but the capabilities offered by DTrace are far deeper.  I've got a ton of ideas more that I could put here, but don't have time atm.  DTrace for the win!</p> ]]></description>
			<guid isPermaLink="false">953@http://www.cuddletech.com/</guid>
			<category>OpenSolaris</category>
			<pubDate>Wed, 23 Jul 2008 09:01:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>DTrace IP Provider</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=952</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=952#comm</comments>
                        <description><![CDATA[ <p>
Recently introduced (snv_92) is the first piece of the DTrace Network Providers, <a href="http://www.opensolaris.org/jive/thread.jspa?threadID=63731&tstart=30">the DTrace IP Provider</a>.  Here is a taste:
</p>
<pre>
root@ultra include$ dtrace -qn 'ip:ip:*:receive{ printf("Packet recieved from %s: %d byte packetn", args[2]->ip_saddr, args[4]->ipv4_length ); }'
Packet recieved from 74.125.15.85: 40 byte packet
Packet recieved from 74.125.15.85: 40 byte packet
Packet recieved from 8.11.47.20: 88 byte packet
Packet recieved from 8.11.47.20: 216 byte packet
Packet recieved from 8.11.47.20: 200 byte packet
Packet recieved from 8.11.47.20: 136 byte packet
Packet recieved from 8.11.47.20: 104 byte packet
^C
</pre>
<p>
Pretty soon <i>snoop</i> and <i>tcpdump</i> will be nothing more than unpleasant memories. :)
</p>
<p>
A big thank you to the DTrace Team!!!</p> ]]></description>
			<guid isPermaLink="false">952@http://www.cuddletech.com/</guid>
			<category>cuddletech</category>
			<pubDate>Tue, 22 Jul 2008 01:43:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Solaris IPsec: Shared Key Transport Mode</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=951</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=951#comm</comments>
                        <description><![CDATA[ <p>
In this entry we'll build on our <a href="http://cuddletech.com/blog/pivot/entry.php?id=950">our IPsec Basics</a> discussed last time and actually create an IPsec connection.
</p>
<p>
IPsec can be used for direct system-to-system access known as "transport mode" or to create a virtual pipeline into which everything is encrypted, known as  "tunnel mode".  We're going to look at transport mode, which is an excellent solution for encrypting otherwise unencrypted protocols, such as SNMPv1/2 or telnet.
</p>
<p>
When encrypting and decrypting data we need keys.  This can be done using PKI certificates or IKE generated one-time keys, but in this examples for simplicity sake we'll create our own "static" keys which will be used on both ends of the connection, thus said to be "pre-shared".
</p>
<h3>Creating Keys</h3>
<p>
Using the <i>ipsecalgs</i> command we can see the available algorithms, including DES, 3DES, AES, Blowfish, SHA and MD5.  Different alogithms require different key lengths, for instance 3DES requires a 192 bit key, whereas Blowfish can use a key anywhere from 32bits up to 448 bits.  
</p>
<p>
For interoperability reasons (such as OSX or Linux), you may with to create keys that are both ASCII and hex.  This is done by choosing a string and converting it to hex.  To know how long a string should be, divide the number of bits required by 8, this is the number of ASCII chars you need.  The hex value of that ASCII string will be double the number of ASCII chars.   Using the <b>od</b> utility we can convert ASCII-to-hex.  Here I'll create 2 keys, one for AH which is a SHA1 160bit key (20 ASCII chars) and another for ESP which is a Blowfish 256bit key (32 ASCII chars):
</p>
<pre>
benr@ultra ~$ echo "my short ah password" | od -t x1
0000000 6d 79 20 73 68 6f 72 74 20 61 68 20 70 61 73 73
0000020 77 6f 72 64 0a
0000025
benr@ultra ~$ echo "this is my long blowfish esp pas" | od -t x1
0000000 74 68 69 73 20 69 73 20 6d 79 20 6c 6f 6e 67 20
0000020 62 6c 6f 77 66 69 73 68 20 65 73 70 20 70 61 73
0000040 0a
0000041
</pre>
<p>
To ensure proper length, I like using a little text-rule like you see below in <b>vi</b>:
</p>
<pre>
         1         2    2    3 3       4         5         6   6     7  
1234567890 234567890 234567890 234567890 234567890 234567890 234567890
--------------------------------------------------------------------------------------------------------------------
my short ah password
6d792073686f72742061682070617373776f7264

this is my long blowfish esp pas
74686973206973206d79206c6f6e6720626c6f77666973682065737020706173
</pre>
<p>
If you don't require interoperability by knowing the ASCII equivilent, just grab a random set of hex chars (<i>head /dev/random | od -t x1</i>).
</p>
<p>
Now that we have a key, lets use it.
</p>
<h3>Configuring IPsec Policies</h3>
<p>
IPsec policies are rules that the IP stack uses to determine what action should be taken.  Actions include:
</p>
<ul>
<li>bypass: Do nothing, skip the remaining rules if datagram matches.
<li>drop: Drop if datagram matches.
<li>permit: Allow if datagram matches, otherwise discard. (Only for inbound datagrams.)
<li>ipsec: Use IPsec if the datagram matches.
</ul>
<p>
As you can see, this sounds similar to a firewall rule, and to some extent can be used that way, but you ultimately find IPFilter much better suited to that task.  When you plan your IPsec environment consider which rules are appropriate in which place.
</p>
<p>
IPsec policies are defined in the <b>/etc/inet/ipsecinit.conf</b> file, which can be loaded/reloaded using the <i>ipsecconf</i> command.  Lets look at a sample configuration:
</p>
<pre>
benr@ultra inet$ cat /etc/inet/ipsecinit.conf 
##
##  IPsec Policy File:
##

# Ignore SSH
{ lport 22 dir both } bypass { }

# IPsec Encrypt telnet Connections to 8.11.80.5
{ raddr 8.11.80.5 rport 23 } ipsec { encr_algs blowfish encr_auth_algs sha1 sa shared }
</pre>
<p>
Our first policy explicitly bypasses connections in and out ("dir both", as in direction) for the local port 22 (SSH).  Do I need this here?  No, but I include it as an example.  You can see the format, the first curly block defines the filter, the second curly block defines parameters, the keyword in between is the action.
</p>
<p>
The second policy is what we're interested in, its action is <b>ipsec</b>, so if the filter in the first curly block matches we'll use IPsec.  "raddr" defines a remote address and "rport" defines a remote port, therefore this policy applies only to outbound connections where we're telnet'ing (port 23) to 8.11.80.5.  The second curly block defines parameters for the action, in this case we define the <b>encryption algorithm</b> (Blowfish), <b>encryption authentication algorithm</b> (SHA1), and state that the <b>Security Association</b> is "shared".  This is a full ESP connection, meaning we're encrypting and encapsulating the full packet, if we were doing AH (authentication only) we would only define "auth_algs".  
</p>
<p>
Now, on the remote side of the connection (8.11.80.5) we create a similar policy, but rather than "raddr" and "rport" we use "laddr" (local address) and "lport" (local port).  We could even go so far as to specify the remote address such that only the specified host would use IPsec to the node.  Here's that configuration:
</p>
<pre>
##  IPsec Policy File:
##

# Ignore SSH
{ lport 22 dir both } bypass { }

# IPsec Encrypt telnet Connections to 8.11.80.5
{ laddr 8.11.80.5 lport 23 } ipsec { encr_algs blowfish encr_auth_algs sha1 sa shared }
</pre>
<p>
To load the new policy file you can refresh the ipsec/policy SMF service like so: <b>svcadm refresh ipsec/policy</b>.  I recommend avoiding the <i>ipsecconf</i> command except to (without arguments) display the active policy configuration.
</p>
<p>
So we've defined policies that will encrypt traffic from one node to another, but we're not done yet!  We need to define a Security Association that will association keys with our policy.
</p>
<h3>Creating Security Associations</h3>
<p>
Security Associations (SAs) can be manually created by either using the <i>ipseckeys</i> command or directly editing the <b>/etc/inet/secret/ipseckeys</b> file, I recommend the latter, I personally find the <i>ipseckeys</i> shell very intimidating.
</p>
<p>
Lets look at a sample file and then discuss it:
</p>
<pre>
add esp spi 1000 src 8.15.11.17 dst 8.11.80.5 auth_alg sha1 authkey 6d792073686f72742061682070617373776f7264 encr_alg blowfish encrkey 6d792073686f72742061682070617373
add esp spi 1001 src 8.11.80.5 dst 8.15.11.17 auth_alg sha1 authkey 6d792073686f72742061682070617373776f7264 encr_alg blowfish encrkey 6d792073686f72742061682070617373
</pre>
<p>
It looks more intimidating that it is.  Each line is "add"ing a new static Security Association, both are for ESP.  The <b>SPI</b> is the "Security Parameters Index", is a simple numeric value that represents the SA, nothing more, pick any value you like.  The src and dst define the addresses to which this SA applies, note that you have two SA's here, one for each direction.  Finally, we define the encryption and authentication algorithms and full keys.
</p>
<p>
I hope that looking at this makes it more clear how policies and SA's fit together.  If the IP stack matches a datagram against a policy who's action is "ipsec", it takes the packet and looks for an SA who's address pair matches, and then uses those keys for the action encryption.
</p>
<p>
Note that if someone obtains your keys your hosed.  If you pre-shared keys in this way, change the keys from time-to-time or consider using IKE which can negotiate keys (and thus SAs) on your behalf.
</p>
<p>
To apply your new SA's, flush and then load using the <i>ipseckeys</i> command:
</p>
<pre>
$ ipseckey flush
$ ipseckey -f /etc/inet/secret/ipseckeys
</pre>
<h3>Is it working?  How to Test</h3>
<p>
All this is for nothing if you don't verify that the packets are actually encrypted.   Using <b>snoop</b>, you should see packets like this:
</p>
<pre>
$ snoop -d e1000g0
Using device e1000g0 (promiscuous mode)
ETHER:  ----- Ether Header -----
ETHER:  
ETHER:  Packet 1 arrived at 9:52:4.58883
ETHER:  Packet size = 90 bytes
ETHER:  Destination = xxxxxxxxxxx, 
ETHER:  Source      = xxxxxxxxxx, 
ETHER:  Ethertype = 0800 (IP)
ETHER:  
IP:   ----- IP Header -----
IP:   
IP:   Version = 4
IP:   Header length = 20 bytes
IP:   Type of service = 0x00
IP:         xxx. .... = 0 (precedence)
IP:         ...0 .... = normal delay
IP:         .... 0... = normal throughput
IP:         .... .0.. = normal reliability
IP:         .... ..0. = not ECN capable transport
IP:         .... ...0 = no ECN congestion experienced
IP:   Total length = 72 bytes
IP:   Identification = 36989
IP:   Flags = 0x4
IP:         .1.. .... = do not fragment
IP:         ..0. .... = last fragment
IP:   Fragment offset = 0 bytes
IP:   Time to live = 61 seconds/hops
IP:   Protocol = 50 (ESP)
IP:   Header checksum = ab9c
IP:   Source address = XXXXXXXXX
IP:   Destination address = XXXXXXXXXXXX
IP:   No options
IP:   
ESP:  ----- Encapsulating Security Payload -----
ESP:  
ESP:  SPI = 0x3e8
ESP:  Replay = 55
ESP:     ....ENCRYPTED DATA....
</pre>
<p>
And there you go.  You can no encrypt communication transparently in the IP stack.  Its a little effort to get going, but once its running your done... just remember to rotate those keys every so often!
</p>
<h3>Why do I care about this again?</h3>
<p>
In this modern era where SSH is the standard for communication its easy to get jaded.  Either you can communicate via SSH or easily create a tunnel to get the job done.  But lets face it, SSH is massively overused, and in many cases SSH tunneling is just downright ghetto.  With IPsec we can as easily encrypt 100 ports as 1, whereas with SSH thats very ugly.  Furthermore, there are many instances in which you want a secure communications channel thats as transparent as possible, such as a network database connection that doesn't offer native encryption or perhaps an SCM or even SNMPv1/2. 
</p>
<p>
While most applications today provide some type of encryption capability it surprising how few people leverage them unless they are the default.  In situations where its difficult or impractical to use encryption in the application, IPsec can be a really sweet solution.</p> ]]></description>
			<guid isPermaLink="false">951@http://www.cuddletech.com/</guid>
			<category>cuddletech</category>
			<pubDate>Sat, 19 Jul 2008 00:56:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Solaris IPsec: Basics</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=950</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=950#comm</comments>
                        <description><![CDATA[ <p>
<p>
IPsec is a technology widely known.  Created for IPv6 and backported to IPv4, it adds a security layer into the IP stack.  Prior to IPsec we needed to encrypt data before sending it down the stack and then decrypt it on the other side once it came back out using technologies like SSH or SSL/TLS.  IPsec simplifies this by transparently handling encrypt/decrypt as well as header authentication.  
</p>
<p>
But for all its intended simplicity and transparency it is to the administrator anything but.  If you google around you find piles of email on various lists of those who tried to get IPsec working and gave up in frustration and instead used <a href="http://www.openvpn.net">OpenVPN</a>, on both Linux and Solaris.
</p>
<p>
Part of the reason IPsec is so complex to manage is the number of technologies that all must work together properly in order to get something functional.  This includes acronyms like AH, ESP, IKE, DH, RSA, SA, SAD, etc.  In many respects its similar to the frustration encountered the first time you approach LDAP and are overwhelmed with OU=, CN=, DN=, etc.  Just like LDAP, with a little practice you get it sorted out and start making ground.  We'll start high level and zoom in... please please, read this before just copying examples!  (I know you won't, but it'll save you time.)
</p>
<p>
IPsec is fundamentally similar to a firewall, in that you specify <b>IPsec Policies</b> that determines how datagrams are handled.  If a policy matches a datagram its handled... if no policy matches it acts like normal.  
</p>
<p>
Thats where the firewall analogy stops, like a firewall the policy says what to do and when to do it.... but we need to know something else for encrypting or decrypting data, we also need to know <i>how</i> to do it.   The information that explains the <i>how</i> is known as a <b>Security Association</b> (SA).  This is maintained in a special database named, unremarkably, the <b>Security Association Database</b> (SAD or SADB, depending on who you ask, same thing though). 
</p>
<p>
It's the SA that actually contains the keys used for encrypting, decrypting and authenticating IPsec datagrams.  So a packets goes through the stack, a policy says "If the datagram source is 1.2.3.4 and the destination is 5.6.7.8 use IPsec."   Now that the stack knows to use IPsec to encrypt, it goes looking in the SADB for an SA that contains the keys.  There is a lot of duplication here because they are independent things, so you specify the authentication algorithm, encryption algorithm, source and destination addresses in <i>both</i> the IPsec policy <i>and</i> the SA.  Its strange at first. :)
</p>
<p>
Now, just as IPsec is supposed to make life simple and transparent, so is IKE (Internet Key Exchange).  An IKE daemon runs on both sides of a connection and negotiates SA's for you.  This provides a variety of benefits, but simplicity isn't exactly one of them because you still need to configure IKE rules which are similar to SA's.  In other words, you can't just create an IPsec policy, and then enable IKE and be done.
</p>
<p>
Before we get into the examples, lets looks at the various files and commands involved:
</p>
<pre>
Files:

    * IPsec:
          o /etc/inet/ipsecinit.conf: IPsec Policy Definitions
          o /etc/inet/secret/ipseckeys: IPsec SA Definitions 
    * IKE:
          o /etc/inet/ike/config: IKE Global Configuation and Rules
          o /etc/inet/secret/ike.preshared: File containing Preshared Key Definitions
          o /etc/inet/secret/ike.privatekeys/: Directory containing IKE Private Keys
          o /etc/inet/ike/publickeys/: Directory containing IKE Public Keys
          o /etc/inet/ike/crls/: Directory containing IKE Certificates 

Commands:

    * IPsec:
          o ipsecconf: Load or Display IPsec Policy Configuration
          o ipsekkey: Manually manipulate IPsec Security Association Database (SADB)
          o ipsecalgs: Display available IPsec ESP/AH Algorithms 
    * IKE:
          o in.iked: IKE Daemon
          o ikeadm: Manipulate IKE parameters and state (flush, add, get, set, ...)
          o ikecert: Manipulate IKE's on-filesystem public-key certificate databases 
</pre>
<p>
The simplest configuration would be to "pre-share" keys, meaning create a key and manually put it on both systems.  In my next blog entry we'll step through actually creating an IPsec policy, creating keys, creating Security Associations, and testing an IPsec connection.</p> ]]></description>
			<guid isPermaLink="false">950@http://www.cuddletech.com/</guid>
			<category>cuddletech</category>
			<pubDate>Sat, 19 Jul 2008 00:19:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Explore Your Storage with FileBench</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=949</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=949#comm</comments>
                        <description><![CDATA[ <p>
<a href="http://sourceforge.net/projects/filebench/">FileBench</a> is one of the most powerful and flexible benchmarking tools around.  Your typical tool like Bonnie++ or IOzone tend to take some discrete operation and do it multiple times at differing block sizes (8K file in 1K blocks, 8K file in 2K blocks, etc).  These commonly used benchmarks are known as "micro-benchmarks".  Using them tends to be controversial and can be confusing, leading to claims like "My new Seagate disk gets 800MB/s!!!"  In order to make them useful you need to use DirectIO or preform operations that are larger than you installed RAM to avoid "cache effect".
</p>
<p>
By contrast, FileBench is better described as an "application simulator" or as I prefer to call it, a "workload generator".  Whereas most benchmarks may use only a single file, FileBench creates <b>filesets</b> prior to actually running a workload.  In this way, it can pre-create thousands of files in hundreds of directories with file of varying sizes (all with in given ranges) on which to actually test.  This gives you much more realistic ideas of what performance may actually look like in production.
</p>
<p>
FileBench workloads are actually scripts in the "F" language which define <b>flowops</b>, such as createfile, deletefile, fsync, closefile, etc.  This means that you can effectively model bazaar or unusual scenarios, like creating thousands of new files, writing 1 byte, and closing each.  Furthermore, because we're working on a much larger scale, we can leave caching enabled to see how caching helps or hurts a workload.
</p>
<p>
All that said, FileBench is somewhat non-intuative and is in a lot of flux now.  These things are slowly being worked out, and I myself am trying to chip in, but there is a lot of polish to be slapped on this thing.
</p>
<p>
To get started with FileBench, <a href="http://sourceforge.net/projects/filebench/">download the latest version</a>.  Packages are available for Solaris (X86 & SPARC), as well as source.  Please note that if you install on SPARC or in a Zone the "isaexec" links will fail... in that case, just copy the appropriate binaries (amd64/ or sparc/) into /opt/filebench/bin.  Furthermore, please note that the "amd64/" is a farce, FileBench is distributed 32bit X86, not 64bit. (That'll be fixed soon.)
</p>
<h3>Running a Single Workload</h3>
<p>
In <b>/opt/filebench/bin/(platform/)</b> you will find a binary called "go_filebench", this is Filebench itself.  Invoking it will start an interactive shell.  Here you can load a workload to run.  The workloads are found in <b>/opt/filebench/workloads</b>.  The workloads are "F" script files that you can look at and modify to fit your specific need.  Each workload has variables associated with it that determine where to run the benchmark (the directory or filesystem you wish to test), number of files, filesize, thread count, etc.  We can either create a custom workload with the variable values we want, or we can modify them in the interactive shell prior to run. 
</p>
<p>
Lets take a simple example.  In this case I've decided to run the "varmail" workload on "/pool/test" (a ZFS dataset):
</p>
<pre>
root@ultra ~$ /opt/filebench/bin/amd64/go_filebench 
FileBench Version 1.3.3
filebench> load varmail
 8429: 4.475: Varmail Version 2.1 personality successfully loaded
 8429: 4.475: Usage: set $dir=<dir>
 8429: 4.475:        set $filesize=<size>    defaults to 16384
 8429: 4.476:        set $nfiles=<value>     defaults to 1000
 8429: 4.476:        set $nthreads=<value>   defaults to 16
 8429: 4.476:        set $meaniosize=<value> defaults to 16384
 8429: 4.476:        set $readiosize=<size>  defaults to 1048576
 8429: 4.476:        set $meandirwidth=<size> defaults to 1000000
 8429: 4.476: (sets mean dir width and dir depth is calculated as log (width, nfiles)
 8429: 4.476:  dirdepth therefore defaults to dir depth of 1 as in postmark
 8429: 4.476:  set $meandir lower to increase depth beyond 1 if desired)
 8429: 4.476:  
 8429: 4.476:        run runtime (e.g. run 60)
filebench> set $dir=/pool/test
filebench> run 60
 8429: 39.650: Creating/pre-allocating files and filesets
 8429: 39.656: Fileset bigfileset: 1000 files, avg dir = 1000000, avg depth = 0.5, mbyte                  
s=15
 8429: 39.657: Creating fileset bigfileset...
 8429: 46.876: Preallocated 812 of 1000 of fileset bigfileset in 8 seconds
 8429: 46.876: waiting for fileset pre-allocation to finish
 8429: 46.876: Starting 1 filereader instances
 8430: 47.883: Starting 16 filereaderthread threads
 8429: 50.893: Running...
 8429: 111.443: Run took 60 seconds...
 8429: 111.445: Per-Operation Breakdown
closefile4                382ops/s   0.0mb/s      0.0ms/op        5us/op-cpu
readfile4                 382ops/s   6.3mb/s      0.0ms/op       28us/op-cpu
openfile4                 382ops/s   0.0mb/s      0.0ms/op       29us/op-cpu
closefile3                382ops/s   0.0mb/s      0.0ms/op        6us/op-cpu
fsyncfile3                382ops/s   0.0mb/s     19.8ms/op       31us/op-cpu
appendfilerand3           382ops/s   3.0mb/s      0.0ms/op       43us/op-cpu
readfile3                 382ops/s   6.3mb/s      0.0ms/op       28us/op-cpu
openfile3                 382ops/s   0.0mb/s      0.0ms/op       29us/op-cpu
closefile2                382ops/s   0.0mb/s      0.0ms/op        6us/op-cpu
fsyncfile2                382ops/s   0.0mb/s     20.8ms/op       34us/op-cpu
appendfilerand2           382ops/s   3.0mb/s      0.0ms/op       32us/op-cpu
createfile2               382ops/s   0.0mb/s      0.1ms/op       71us/op-cpu
deletefile1               382ops/s   0.0mb/s      0.0ms/op       44us/op-cpu

 8429: 111.445: 
IO Summary:      300414 ops 4961.5 ops/s, (763/763 r/w)  18.6mb/s,    145us cpu/op,  10.2ms latency
 8429: 111.445: Shutting down processes
filebench> quit
</pre>
<p>
Here I loaded the "varmail" workload (actual file is "/opt/filebench/workloads/varmail.f") and set the directory to run in as my test directory.  The rest of the defaults I leave alone.  In the output we see that first it created a fileset, in this case it created 1000 files in 1 directory, each file with a random size.... here's a look:
</p>
<pre>
root@ultra 00000001$ ls -lh | more
total 11M
-rw-r--r-- 1 root root 3.7K Jul 18 15:31 00000001
-rw-r--r-- 1 root root 7.6K Jul 18 15:31 00000002
-rw-r--r-- 1 root root  11K Jul 18 15:31 00000003
-rw-r--r-- 1 root root 5.6K Jul 18 15:31 00000004
-rw-r--r-- 1 root root  13K Jul 18 15:31 00000005
-rw-r--r-- 1 root root 1.4K Jul 18 15:31 00000006
-rw-r--r-- 1 root root  16K Jul 18 15:31 00000007
-rw-r--r-- 1 root root  921 Jul 18 15:31 00000008
-rw-r--r-- 1 root root 8.2K Jul 18 15:31 00000009
-rw-r--r-- 1 root root  15K Jul 18 15:31 00000010
-rw-r--r-- 1 root root  11K Jul 18 15:31 00000011
-rw-r--r-- 1 root root 7.2K Jul 18 15:31 00000012
-rw-r--r-- 1 root root 7.9K Jul 18 15:31 00000013
-rw-r--r-- 1 root root 2.7K Jul 18 15:31 00000014
-rw-r--r-- 1 root root 1.1K Jul 18 15:31 00000015
</pre>
<p>
By tweeking the variables we can increase the spread.
</p>
<p>
Finally, in the output we see that the workload ran for the time (in seconds) that we specified and then dumped out both op specific and aggregate stats.  For instance, we can easily see in the output that its fsync's that are the most time consuming operation.
</p>
<h3>Running Multiple Workloads with BenchPoint</h3>
<p>
Instead of running just a single workload we commonly want to run several.  This might be different workloads or even the same workload repeatedly but with different settings.  We can do that with BenchPoint (currently named: "/opt/filebench/bin/filebench"; confusing I know.)
</p>
<p>
BenchPoint is actually a PERL framework around the FileBench ("go_filebench") binary.  It utilizes a <b>profile</b> that defines all the workloads we with to run as well as all the variable settings for those.  It then uses some additional scripts to handle special operations (such as exporting/importing ZFS pools after each run) and stats collection (such as watching vmstat during a run).
</p>
<p>
To get started, go into the <b>/opt/filebench/config/</b> directory and look at the various <b>*.prof</b> files.  When you see one you like, copy it to some other location, such as /tmp.  <i>Do not use the profiles in config/ as is!!! Customize them somewhere else!!!</i>  Now edit to taste, changing the global $dir to the location you wish to execute the workloads, etc.
</p>
<p>
Now that we have a customized profile, lets give it a run:
</p>
<pre>
root@ultra config$ cp filemicro.prof /tmp/benr_filemicro.prof
root@ultra config$ cd /tmp
root@ultra tmp$ vi benr_filemicro.prof 
...
root@ultra tmp$ more benr_filemicro.prof 
# ident "@(#)filemicro.prof     1.2     08/03/31 SMI"

DEFAULTS {
        runtime = 60;
        dir = /pool/test/;
        stats = /tmp/stats;
        filesystem = nofs;
        description = "FileMicro Testing";
}
</pre>
<p>
Please note, I'm using ZFS but I specified the above filesystem as "nofs"... thats because if you specify "zfs" benchpoint will export/import the zpool prior to each workload... if you do not want this, specify anything other than "zfs".
</p>
<p>
Now lets run this profile.  Please note, you need to be in the local directory with your custom profile and you must omit the ".prof" suffix.
</p>
<pre>
root@ultra tmp$ /opt/filebench/bin/filebench benr_filemicro      
parsing profile for config: createandalloc
Running /tmp/stats/ultra-nofs-benr_filemicro-Jul_18_2008-15h_50m_11s/createandalloc/thisrun.f
FileBench Version 1.3.3
 8458: 0.021: FileMicro-Create Version 2.1 personality successfully loaded
 8458: 0.021: Creating/pre-allocating files and filesets
 8458: 0.021: File largefile: mbytes=0
 8458: 0.021: Creating file largefile...
 8458: 0.021: Preallocated 1 of 1 of file largefile in 1 seconds
 8458: 0.021: waiting for fileset pre-allocation to finish
 8458: 0.022: Running '/opt/filebench/scripts/fs_flush nofs /pool/test/'
filesystem type is: nofs, no action required, so exiting
 8458: 0.031: Change dir to /tmp/stats/ultra-nofs-benr_filemicro-Jul_18_2008-15h_50m_11s/createandalloc
 8458: 0.031: Starting 1 filecreater instances
 8461: 1.035: Starting 1 filecreaterthread threads
 8458: 4.045: Running...
 8458: 5.055: Run took 1 seconds...
 8458: 5.055: Per-Operation Breakdown
finish                    507ops/s   0.0mb/s      0.0ms/op        2us/op-cpu
append-file               508ops/s 507.0mb/s      1.6ms/op     1615us/op-cpu

 8458: 5.055: 
IO Summary:        513 ops 508.0 ops/s, (0/508 r/w) 507.0mb/s,   1666us cpu/op,   1.6ms latency
 8458: 5.055: Stats dump to file 'stats.createandalloc.out'
 8458: 5.055: in statsdump stats.createandalloc.out
 8458: 5.055: Shutting down processes
Generating html for /tmp/stats/ultra-nofs-benr_filemicro-Jul_18_2008-15h_50m_11s
file = /tmp/stats/ultra-nofs-benr_filemicro-Jul_18_2008-15h_50m_11s/createandalloc/stats.createandalloc.out

parsing profile for config: createandallocsync
Running /tmp/stats/ultra-nofs-benr_filemicro-Jul_18_2008-15h_50m_11s/createandallocsync/thisrun.f
FileBench Version 1.3.3
 8469: 0.012: FileMicro-Create Version 2.1 personality successfully loaded
....
</pre>
<p>
The key to success with FileBench isn't in the stats that it outputs, but rather by stats you can gather during its load.  Use tools like <b>zpool iostat</b>, <b>iostat</b>, <b>vmstat</b>, or even DTrace.
</p>
<p>
FileBench also includes several handy utilities to assist in your benchmarking, but I'll discuss those separately in the future.
</p>
<p>
For more info on FileBench try these links:
</p>
<ul>
<li><a href="http://www.solarisinternals.com/wiki/index.php/FileBench">FileBench page on Solaris Internals Wiki</a>
<li><a href="http://opensolaris.org/os/community/performance/filebench/">FileBench page on OpenSolaris.org</a>
<li><a href="http://sourceforge.net/projects/filebench/">Official Home on SourceForge</a>
</ul> ]]></description>
			<guid isPermaLink="false">949@http://www.cuddletech.com/</guid>
			<category>OpenSolaris</category>
			<pubDate>Fri, 18 Jul 2008 20:51:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Thoughts on &quot;Open Storage&quot;</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=947</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=947#comm</comments>
                        <description><![CDATA[ <p>
Some marketing terms come along that make you stop and think.  Sun is pushing Open Storage, pairing up terms like "revolution", and you have to ask: Whats really new here?  I suppose you have to step back and consider that all industries are not the same and what one customer considers "catching up with reality", another customer considers "a fresh new approach". 
</p>
<p>
When I think about what Sun concept of Open Storage really boils down to it is this: servers aren't just storage clients.  If you think about the direction Fibre Channel and even iSCSI solutions were going, the drive was to push more and more of the storage management and access into array controllers such that servers are clients only.  I think I told the story in this blog some time ago when I stormed out of HDS's data center when I realized you required a Windows server to manage the array.  Storage should be autonomous!
</p>
<p>
But things have changed.  When I stormed out of HDS I was managing an environment of large SPARC systems that had 1 or 2 internal disks just for the OS, or small 1U X86 servers with just enough local disk for the OS and apps.  With the increasing availability of high performance multi-core CPU's 2U's are more attractive and local disk storage is commonly managed by a dedicated RAID card with onboard cache of up to 512MB.  When you have racks full of 2U systems that each have more than 2.5TB of RAID6 and a write-back cache to boot in each machine... its time to think differently.  Filesystems like Lustre or even pNFS (parallel NFS) look very attractive to the enterprise.... yet again, HPC technology trickles down to the enterprise market.
</p>
<p>
While the push from Sun has just started publicly this year, there has been signs of this for a long time, especially when Jonathan declared many moons ago that all proprietary OS's would have to go, which at the time was shocking given that all the storage arrays ran various embedded or specialized OS's.  So, it should be noted that this would seem to be the fulfillment of something Sun has been working toward for quite some time, unified under a single banner of "Open Storage".
</p>
<p>
The implications could really change the landscape though.  Traditionally in large enterprise storage  you spend a lot of time working with vendors, testing configurations, listening to presos, etc.  It was a very hands-off world.  This new push would mean that Storage Administrators are going to spend less time making purchasing decisions and more time learning how to install, manage, and optimize their deployments.  When "secure storage" goes from checking a box to configuring IPsec things get sticky.   But that also provides new opportunities for administrators and vendors alike.  In fact, <a href="http://www.theregister.co.uk/2007/04/03/sun_fishworks/">that reminds me of something....</a> :)
</p>
<p>
So the real question is, how will "traditional" storage vendors like HDS and EMC respond?  If you don't have a server business getting behind the idea of buying servers and JBOD's isn't terribly attractive.  That suggests that in 3 years companies like Dell, Sun, IBM, and HP will rule the storage world leaving EMC to supply a dying market while it continues to cash in on its acquisitions like VMware and RSA.
</p>
<p>
So, like I said in the beginning.... "Open Storage" is either something mind-numbingly obvious or something radically new, depending on where you sit.</p> ]]></description>
			<guid isPermaLink="false">947@http://www.cuddletech.com/</guid>
			<category>OpenSolaris</category>
			<pubDate>Fri, 11 Jul 2008 01:35:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Sun Introduces New &quot;Open&quot; Storage Array Line: J4000</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=946</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=946#comm</comments>
                        <description><![CDATA[ <p>
Sun's recently been on an "Open Storage" kick.  They define this as using "industry standard components" together with "open source software".  Frankly, the pitch sounds pretty similar to the one Sun has had for the last 2 decades of "open standards" products... the new tact is really just pitching the cost savings of specifically depending on open source software freeing you (potentially) from high licensing costs.
</p>
<p>
So, there are 3 arrays, we'll look at them each.
</p>
<img src="http://www.sun.com/images/k3/k3_j4200-array_2.jpg" width="450">
<p>
The <a href="http://www.sun.com/storagetek/disk_systems/expansion/4200/">Sun Storage J4200 array</a>  is an single or dual controller external SAS JBOD and offers 3 SAS ports per controller.   It supports "Hardware Raid", but notice that its "(with RAID HBA)", so there is no hardware RAID happening on the controllers (the same goes for similar solutions from Dell).  This unit is 2U and features 12 3.5" drives.  While the interconnect is SAS, you can use either SAS or SATA drives.  The cheapest setup is single controller with 2 250GB disks, for $3,140.00.  If you customize one with a fairly normal config of dual controllers, 12x 500GB SATA drives (7200RPM), plus 1 cable, 1 HBA, and a rail kit you come up to around $9,000 with a raw capacity of 6TB.
</p>
<img src="http://www.sun.com/images/k3/k3_j4400-array_1.jpg" width="450">
<p>
The <a href="http://www.sun.com/storagetek/disk_systems/expansion/4400/">Sun Storage J4400 Array</a> is the same basic array but with more disk capacity.  You still don't get hardware RAID in the controllers, only on the "RAID HBA".  The chassis accommodates up to 24 drives in 4U, and starts at $7,410.00, although that price is single controller with 12x 73GB SAS drives.  A reasonably stocked config with 24x 500GB SATA drives, dual controllers, dual HBA's, cables, and rack kit come to just over $20,000 with a raw capacity of 12TB.
</p>
<img src="http://www.sun.com/images/k3/k3_j4500-array_3.jpg" width="450">
<p>
Lastly, the one many people have been waiting for... the <a href="http://www.sun.com/storagetek/disk_systems/expansion/4500/">Sun Storage J4500 Array</a>.  This is a Thumper but notice whats wrong in the picture above?  The server component is replaced with SAS controllers.  This is a 48 disk in 4U storage array in the traditional sense, not a hybrid server.  The unit does not feature independently replaceable controllers, but otherwise shares in the basic vibe of its siblings in the lineup.  "Four 3 Gb/sec SAS ports per tray", however 2 are server ports and 2 are expansion (daisy chain) ports.  Prices start at $32,960.00 for a 48x 500GB SATA setup (24TB raw), and go up to $60,960.00 for a 24x 1TB SATA setup (48TB raw).  SAS disks are not an option in the unit, and you will have to use a "RAID HBA" for "hardware RAID".
</p>
<p>
One thing I'll note is that they are branded "Sun Storage", rather than "StorageTek".  I did find one or two "Sun StorageTek J4000" references around but very few and they looked like mistakes.   I'm supportive. :)
</p>
<p>
In general, I think its good to see Sun pushing new storage product.  Does it differentiate enough from the offerings in its line?  I dunno.  Clearly Sun is addressing the demise of Fibre Channel is a large segment of the market, but competition in that space is with Dell and the like and very competitive.  For instance, a Dell MD1000 configured like the J4200 above (12x 500GB SATA, dual controller standard, single HBA, cable, rack kit, etc) is $7,000... versus $9,000 for a J4200 with only a single controller.  Which is better?  That comes down to the HBA actually, and I'm terrified (RAID 1E?  I only see that on Adaptec) the HBA is an Adaptec controller rebranded as StorageTek.  The Dell PERC HBA's (LSI MegaSAS) are the best around, hands down.
</p>
<p>
What Sun has that Dell, or anyone else, doesn't have is the software.  Lustre is now Sun, ZFS is Sun, SAMFS/QFS are Sun, not to mention HoneyComb and Sun's work on pNFS.  Sun has the storage software unlike any other vendor in the industry.  I can only hope that Sun is pushing the "Open Storage" to raise awareness, not of something new, but what its been dedicated to for some time as part of OpenSolaris.  If that awareness rises and low barrier to entry gets customers excited they may, hopefully, be willing to pay more money because they'll have support for hardware and software from a single vendor.  Lets hope. ;)</p> ]]></description>
			<guid isPermaLink="false">946@http://www.cuddletech.com/</guid>
			<category>Sun</category>
			<pubDate>Fri, 11 Jul 2008 00:56:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Christianity</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=945</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=945#comm</comments>
                        <description><![CDATA[ <p>
I commonly refer to my faith in blogs and writing but never directly spoken regarding it.  This is largely because there have been very few good resources out there for Christians, at least that I was aware of, to actually refer people to, and I don't like leaving people hanging.  I'm always happy to have a "Tell me about Jesus" discussion with people interested, but I realize a lot of people are jaded when it comes to Christianity due to "bad experiences" directly or indirectly.  Christianity isn't about people being perfect, its about acknowledging what we already know in our hearts, that we're sinners, even if we don't know what that really means, and understanding it and our need for a savior, Jesus Christ, God become flesh to die for our sins thus fulfilling the Old Testament bringing us into grace.  God gave us free will... don't ever let someone push you around, judge for yourself, clearly, with an open heart and mind based on the Bible, not on people, all have fallen short.
</p>
<p>
Every so often Penny Arcade does a Jesus comic... I commonly find myself being amused and offended at the same time, and thats always a winning combo.  Here's my favorite example:
</p>
<a href="http://penny-arcade.com/images/2008/20080618.jpg"><img src="http://penny-arcade.com/images/2008/20080618.jpg" width="450"></a>
<p>
Whats funny is how much theology is in there.  Namely, "We just..." expresses trinitarian belief.  (God is 1 God in 3 Persons: God the Father, God the Son, God the Holy Spirit... in Genesis Chapter 1 you can see reference to all 3, and any debate should be handled by looking at Gen 1:26 "Then God said, “Let us make man[8] in our image, after our likeness."... fascinating topic of study.)
</p>
<p>
The other thing I like about the strip is that it has the right attitude.  We are told that "Fear of the Lord is the beginning of wisdom"... which stands to reason, if you want to know wisdom understand the creator of all things and realize His power and authority.  Yet we're also called into a personal relationship with Jesus, our savior, and the indwelling Holy Spirit.  People get too legalistic about Christianity... you don't leave God in the church on sunday, you're constantly in relationship to Him, even if your ignoring Him.
</p>
<p>
One evidence of our relationship with Jesus, whether we believe or not, is our .conscience  There are universal right and wrongs regardless of culture.  Sure, you can numb yourself to it or be taught otherwise, but there are instinctual "thats wrong" feelings in our hearts.  The Bible tells us that the law of God is inscribed in our hearts.  Before you listen to a preacher, look at your own heart and what it tells you and see if the Bible lines up with that.
</p>
<p>
I don't believe in Jesus Christ as my savior because I want to go to heaven or because it makes me a good person or something... I believe because when I pair up whats in my heart with all the explanations and writings available the Bible is the only book that jives with reality.  There is unity and organization both physically and philosophically all throughout nature, common themes, which is why we can explain complex philosophical concepts by illustration in nature.  A single intellectual creator explains that.  Many religions tell me what I can become, but Jesus describes what I am, why I am that way, and how I can change it if I choose.  And Jesus gives me a choice and clearly outlines the consequences of either decision.  The Bible outlines how God has interacted with man in different ways over time and why they didn't work... "Just give me a sign and I'll believe!", and He did that and it didn't make a difference, "Just give me some easy rules to follow and I'll believe!", and He did that and it didn't make a difference.  It all leads up to Jesus and grace.  We don't deserve crap, but He created us and loves us all, no matter what... we are present in life with a choice, Him or not Him.  Simple, beautiful, wonderful.  Thats something I can get behind.
</p>
<p>
I've always been discourage in the modern American church, which is dominated by old, legalistic, men.  But Jesus was 30 when we started his mission... the apostles were all young as well.  So why are young men relegated to youth pastors in the modern church?  I think its a big reason that Christianity has such a bad rap in America and churches are dying left and right.   I'm young, I'm aggressive, I love Jesus... so was Peter!  When they came to take Jesus Peter busts out his sword and starts chopping!  It was the wrong thing to do, but I can get behind that kind of thinking.  Thomas was an apostle, but he didn't believe that Jesus truly was God until he actually saw Jesus resurrected with nail marks... did Jesus love him?  Ya, totally.  Doubt isn't a sin... explore faith and test it.
</p>
<p>
When I was a kid I'd get into trouble because I listened to heavy metal.  I was supposed to listen to pop or light rock.  What I thought was interesting was that my parents wanted me to listen to "normal music" which was all about sex, love, self interest, especially in the 80's.  Even though death metal focused on Satan, that was more Christian to me than Paula Abdul... Satan is real, their talking about Satan and how we wants to destroy us all and inflict suffering... Slayer seemed more biblical than Whitesnake. :)
</p>
<p>
When Open Source came along it jived for me because it parallels Christianity.  Community and working together and evangelizing... these are integral Christian concepts that I immediately got.  God has called me to be a SysAdmin and He instructs us to love our brother as ourselves, helping one-another in love and charity... why do you think I write so much? :)
</p>
<p>
God has faithfully guided me through my entire life, and I trust Him implicitly.  He's proven it time and time again.  I get a raise, a month later a new bill comes in.  I get a bonus, 2 weeks later the car breaks down.  I get downsized and before the day is out I have an offer to start immediately.  I commonly say that "God opens doors for people... but I'm not very bright, so He just kicks me through 'em."  When adversity or change happens I don't get scared that I'm screwed... I look for what God is doing.  With my new house... a friend tells me about the cheap foreclosures in Tracy and we start researching it, one week later we get our 60-day notice to leave our rental in Fremont, 2 weeks later we find the right house, 3 weeks later we close escrow, 1 week later we're moved in, and we have just enough time to clean out the old place before we have to give it back.  Now, if you take these sorts of things and call them random chance or coincidence than your faith in chaos is stronger than my faith in Jesus. :)
</p>
<p>
I'm not perfect.... definitely not.  I've probly got more problem than any of you reading this.  I'm a sinner and I know it...  but I want to change, and Jesus explains how, through faith and repentance.  Heaven is great and all, but frankly I'm concerned about how to live <i>now</i>... Christianity is about both now and forever at the same time.
</p>
<p>
I won't post any more about Christianity directly in this blog because I'm aggregated fairly widely and don't want to get yanked for being off topic, but its important to me and now seemed like the time to share a bit.
</p>
<p>
If you are interested in Christianity, either as a fellow believe or as someone who's just checking things out, I <b>highly</b> recommend you check out <a href="http://www.marshillchurch.org">Mars Hill Church</a> (Mark Driscoll's church in Seattle, not Rob Bell's church in Michigan).  They just finished a 13 part "Doctrine: What Christians Should Believe" series which is totally awesome!!  No fluff, just great information for a great <i>young</i> preacher.  
</p>
<embed src="http://www.marshillchurch.org/sermonseries/MHC_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=http://www.marshillchurch.org/sermonseries/mhflvskin_2&streamName=http://assets.marshillchurch.org/media/2008/03/30/20080330_trinity-god-is_small_video.flv&autoPlay=false&autoRewind=true" quality="high" scale="noscale" width="360" height="200" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
<p>
To see a short introduction before jumping in, <a href="http://www.marshillchurch.org/sermonseries/doctrine/preview.aspx">Watch the Preview to the Doctrine Series</a>.
</p>
<p>
I highly encourage you to look through the <a href="http://www.marshillchurch.org/sermonseries/">various sermon series, all in video</a>.  Plus, you can subscribe to the Video Podcast on iTunes.  Mars Hill is the first church I've seen that actually feels like an apostolic church, young new believers with real questions.  Want to find a church that actually talks about sex?  Answers questions like "Is oral sex ok?"... seriously, amazing church for real people with real questions and real interest.  Check it out!
</p>
<p>
If you're already a Christian, but you've fallen away from your walk, there are lots of great ways to get re-engaged and centered.  One thing that helps me is attacking the Bible in new ways.  Try a new translation!  I still love the King James Tranlation (KJV AV), but also have found that NKJV, ESV and NASB (NASB being the most literal translation available) are really wonderful and accurate.  Remember, the KJV is not the word of God, its an english translation of it... don't let people shoe-horn you into a single translation.   I do, however, advise staying away from paraphrases such as "The Message" except for cross-reference.  Seriously, ESV is easy to read and accurate.
</p>
<p>
Another great resource is audio bibles.  Its hard to sit down and read an entire book without getting hung up on phrases or specific stories.  Get a <i>broad</i> view of the scriptures!!  I've found that when you just listen to the New Testament from beginning to end you walk away with a very different vibe than when you just work on given passages.  I use this one:
</p>
<a href="http://www.amazon.com/James-Earl-Jones-Reads-Bible/dp/1591509742/ref=pd_bbs_sr_2?ie=UTF8&s=books&qid=1215643124&sr=8-2"><img src="http://ecx.images-amazon.com/images/I/51yZbxwLkOL._SL500_AA240_.jpg"></a>
<p>
I prefer to refer to this as "The Bible as read by Darth Vader". :)
</p>
<p>
Lastly... for new Christians and old alike, I offer one important piece of advice that I myself have struggled with in the past.  Focus on Jesus!  Christianity is about... duh... Christ.  When you focus on "god", which god?  Its impersonal and abstract, and the Bible is anything but impersonal or abstract.  Jesus is God, Jesus is alive, Jesus loves you and died for your sin.  Whether you believe that or not, focus on Jesus, not "god".  Pray, calling out to Jesus by name, and talk to Him... see what happens.</p> ]]></description>
			<guid isPermaLink="false">945@http://www.cuddletech.com/</guid>
			<category>cuddletech</category>
			<pubDate>Wed, 09 Jul 2008 19:41:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Cuddle Labs Update</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=943</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=943#comm</comments>
                        <description><![CDATA[ <p>
Cuddletech Labs has been slowed to a crawl lately as we move from Fremont to Tracy to our new home.  For those who are interested, here's a personal update... Nova is 4, Glenn is 2 going on 3 in July, and Tamarah and I are blessed with our third child on the way (current names are Conrad or Eve, depending on gender).  The house in Fremont is a rental, we moved to it from an apartment in Fremont just before Nova was born.  We're moving because we were evicted, given 60 day notice.  We were led to a week prior start taking a look at the massive number of foreclosed properties our in Tracy, given that any properties in the Bay Area even as far out as Livermore are $500,000 and up, and most under $600,000 are run down in bad neighborhoods... out in Tracy there are tons of nice, new properties foreclosed for $300,000 and under.  Its 45 minutes away from Fremont, and thus the Silicon Valley, with no traffic, 2 hours plus in heavy traffic, but I'm blessed to work for Joyent were I work from home.  The Lord has blessed us and we quickly found a prime property that needed a little work but was in an ideal area with a unique and excellent floorplan.  We closed and took keys on Wed and immediate started fixing things and moving in.  At present we have about 20% of our stuff moved.  We hoped to have a lot more progress, but moving with 2 young children and a pregnant wife isn't easy... we down shifted from an aggressive move  schedule into a more relaxed one, given that our 60 day notice ends on the 13th of July.  
</p>
<p>
It sucks that we're forced to leave Fremont, and it sucks that we'll be so far away... but we're insanely blessed none the less, given that we now own our first home which is significantly nicer than our current rental, we're still living in California and close to the Silicon Valley rather than having to leave the state like so many other native Californian's have, and a new locale means new experiences, new friends, a new church, and opportunities.  We've leaned on the Lord 110% and He's had our backs the whole way, everything just happened easily and quickly and we're thankful for His provision, yet again.
</p>
<p>
A change of scenery is always a useful thing.  I'm busy atm learning about tile, caulking, and plumbing, but hope to get down to more interesting things soon so that I can get some fun content into this blog.</p> ]]></description>
			<guid isPermaLink="false">943@http://www.cuddletech.com/</guid>
			<category>cuddletech</category>
			<pubDate>Mon, 30 Jun 2008 07:56:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Ode to Dads</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=942</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=942#comm</comments>
                        <description><![CDATA[ <p>
There are a great number among us who have a job more important to us than tech... we're fathers and husbands.
</p>
<img src="http://cuddletech.com/img/NovaDell_400.jpg">
<p>
I've been privileged to know several of the great dads in the Sun/OpenSolaris ranks.  Dr. Stephen Hahn, Jeff Bonwick, Bill Moore, Paul Armstrong (Google), and Chris Baker are all absolutely first rate fathers, aside from being brilliant technologists.  I am immensely thankful for the opportunity to know not just these great men but also their families. 
</p>
<p>
To all the fathers out there, a happy fathers day.</p> ]]></description>
			<guid isPermaLink="false">942@http://www.cuddletech.com/</guid>
			<category>OpenSolaris</category>
			<pubDate>Mon, 16 Jun 2008 00:36:00 -0000</pubDate>
		</item>
		
		
		
		<item>
			<title>Possible iPhone 2.0 Leak</title>
			<link>http://cuddletech.com/blog/pivot/entry.php?id=941</link>
			<comments>http://cuddletech.com/blog/pivot/entry.php?id=941#comm</comments>
                        <description><![CDATA[ <p>
My Moto RAZR was recently lost/stolen (I left it on a table in a resturaunt, 5 minutes later it was no where to be found and a call suggested the SIM card was yanked), but I haven't really dispaired.  I've been very interested in iPhone 2.0 but needed clarification on what features it would have, namely I want 3G, GPS, and a better camera.  This leak <a href="http://www.techcrunch.com/2008/06/07/is-this-the-new-iphone/">found on CrunchGear</a> suggests that it'll be even better than that!  Apparently the iPhone will include a front-facing camera for iChat AV!  Tamarah and I are big fans of iChat AV, we talk nightly via it when I'm on the road.  If this is in fact included I'll not only buy one for myself but also for Tamarah.
</p>
<p>
Of course, there is always debates over leaks... is it real or faked, who knows, but it makes me hope none-the-less.  If I could get one with 32GB at $499 I'll be a very happy camper.  In the mean time I'm restricted to my Joyent BlackBerry.</p>
<p>
UPDATE: <a href="http://www.apple.com">And its here!</a>  No word about iChat AV, but the price has been greatly reduced, GPS and 3G are there.  I'll be getting one as soon as it releases! :)</p> ]]></description>
			<guid isPermaLink="false">941@http://www.cuddletech.com/</guid>
			<category>cuddletech</category>
			<pubDate>Mon, 09 Jun 2008 00:08:00 -0000</pubDate>
		</item>
		
		
		
	</channel>
</rss>
