<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3" -->
<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/"
	>

<channel>
	<title>orvl's spot</title>
	<link>http://blog.benharold.com</link>
	<description>The spot, my spot</description>
	<pubDate>Thu, 07 Aug 2008 18:06:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
	<language>en</language>
			<item>
		<title>New Pug Puppy!</title>
		<link>http://blog.benharold.com/entertainment/new-pug-puppy/</link>
		<comments>http://blog.benharold.com/entertainment/new-pug-puppy/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 03:01:26 +0000</pubDate>
		<dc:creator>orvl</dc:creator>
		
		<category><![CDATA[Entertainment]]></category>

		<category><![CDATA[black pug]]></category>

		<category><![CDATA[Dog]]></category>

		<category><![CDATA[Marley]]></category>

		<category><![CDATA[puppy]]></category>

		<guid isPermaLink="false">http://blog.benharold.com/entertainment/new-pug-puppy/</guid>
		<description><![CDATA[These are some videos I&#8217;ve taken over the past week of our new black pug puppy named Marley (Robert Nesta to be specific).  He has the same Dam and Sire as Punky, our 1 ½ year old pug; Punky&#8217;s got a new little brother!
He&#8217;s now almost 8 weeks old but he was 7 weeks [...]]]></description>
			<content:encoded><![CDATA[<p>These are some videos I&#8217;ve taken over the past week of our new black pug puppy named Marley (Robert Nesta to be specific).  He has the same Dam and Sire as Punky, our 1 ½ year old pug; Punky&#8217;s got a new little brother!<br />
He&#8217;s now almost 8 weeks old but he was 7 weeks in most of the videos.</p>
<h3>Punky with her new brother Marley</h3>
<p><a href="http://www.youtube.com/watch?v=HZu-JGTCGf8">www.youtube.com/watch?v=HZu-JGTCGf8</a><br />
Punky&#8217;s first time meeting her new brother Marley. This was filmed by my girlfriend Amanda at the breeder&#8217;s house when he was just 6 weeks old.</p>
<p></p>
<h3>Playful Pug is Playful</h3>
<p><a href="http://www.youtube.com/watch?v=ybspi6SKPF4">www.youtube.com/watch?v=ybspi6SKPF4</a><br />
Marley the black Pug puppy goin nuts with his newfound favorite toy: the mini tennisball. He&#8217;s not even 8 weeks here.</p>
<h3>Feisty Pug is Feisty</h3>
<p><a href="http://www.youtube.com/watch?v=SqVpohEf0Gw">www.youtube.com/watch?v=SqVpohEf0Gw</a><br />
Marley the black Pug being a feisty little pup playing tug of war with my bathrobe. He&#8217;s not even 8 weeks here.</p>
<h3>Little Marley at Play</h3>
<p><a href="http://www.youtube.com/watch?v=xrWwjFI7OWo">www.youtube.com/watch?v=xrWwjFI7OWo</a><br />
Marley the black Pug at 7 weeks bumbling around; getting scared by the squeaky toy, wondering why Punky&#8217;s barking, and finally having a good tussle with his older sister.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benharold.com/entertainment/new-pug-puppy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A real live Liger!</title>
		<link>http://blog.benharold.com/entertainment/a-real-live-liger/</link>
		<comments>http://blog.benharold.com/entertainment/a-real-live-liger/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 04:51:38 +0000</pubDate>
		<dc:creator>orvl</dc:creator>
		
		<category><![CDATA[Entertainment]]></category>

		<category><![CDATA[King Richard's Faire]]></category>

		<category><![CDATA[Liger]]></category>

		<guid isPermaLink="false">http://blog.benharold.com/uncategorized/a-real-live-liger/</guid>
		<description><![CDATA[Update: The video&#8217;s been removed from Metacafe because someone thinks it&#8217;s objectionable for me to display a clip of something I witnessed and found very interesting.   More to come&#8230;
Liger At King Richard&#8217;s Faire
He&#8217;s super badass.  Filmed this myself.

A Liger, by the way, is a cross between a male lion and a female [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: </strong>The video&#8217;s been removed from Metacafe because someone thinks it&#8217;s objectionable for me to display a clip of something I witnessed and found very interesting.   More to come&#8230;</p>
<p><font size="1"><a href="http://www.metacafe.com/watch/850856/liger_at_king_richards_faire/">Liger At King Richard&#8217;s Faire</a></font></p>
<p>He&#8217;s super badass.  Filmed this myself.<br />
<br />
A Liger, by the way, is a cross between a male lion and a female tiger; not the other way around.  That specific combination is the only way to achieve the extraordinary size that is common with Ligers.  A female lion and a male tiger produce a &#8220;Tigon&#8221; which usually will end up being smaller than either of it&#8217;s parent&#8217;s; sort of the opposite.  Genetics are weird.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benharold.com/entertainment/a-real-live-liger/feed/</wfw:commentRss>
		</item>
		<item>
		<title>lsof - The most powerful, versitile, and underused Unix command</title>
		<link>http://blog.benharold.com/tech/lsof-the-most-powerful-versitile-and-underused-unix-command/</link>
		<comments>http://blog.benharold.com/tech/lsof-the-most-powerful-versitile-and-underused-unix-command/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 22:30:03 +0000</pubDate>
		<dc:creator>orvl</dc:creator>
		
		<category><![CDATA[Linux / Unix]]></category>

		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://blog.benharold.com/uncategorized/lsof-the-most-powerful-versitile-and-underused-unix-command/</guid>
		<description><![CDATA[lsof
lsof is the Linux/Unix über-tool. I use it most for getting network connection related information from a system, but that&#8217;s just the beginning for this amazing and little-known application. The tool is aptly called lsof because it &#8220;lists open files&#8220;. And remember, in Unix just about everything (including a network socket) is a file.
** lsof [...]]]></description>
			<content:encoded><![CDATA[<h2><big><code>lsof</code></big></h2>
<p><code><strong>lsof</strong></code> is the Linux/Unix über-tool. I use it most for getting network connection related information from a system, but that&#8217;s just the beginning for this amazing and little-known application. The tool is aptly called lsof because it &#8220;<strong>lists open files</strong>&#8220;. And remember, in Unix just about everything (including a network socket) is a file.</p>
<p><red>** <code>lsof</code> is also the Linux/Unix command with the most switches. It has so many it has to use both pluses and minuses.</red></p>
<pre class="codeblock">usage: [-?abhlnNoOPRstUvV] [+|-c c] [+|-d s] [+D D] [+|-f[cgG]]

 [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+|-M] [-o [o]]

 [-p s] [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]</pre>
<p>As you can see, <code>lsof</code> has a truly staggering number of options. You can use it to get information about devices on your system, what a given user is touching at any given point, or even what files or network connectivity a process is using. <code>lsof</code> replaces my need for both <code>netstat</code> and <code>ps</code> entirely. It has everthing I get from those tools and much, much more.<br />
</p>
<h2>Show Your Network Connections</h2>
<h3>Show all connections with <code><larger>-i</larger></code></h3>
<p><code><strong>lsof -i</strong></code></p>
<pre class="codeblock">COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME

dhcpcd 6061 root 4u IPv4 4510
<purple>UDP *:bootpc</purple>
sshd 7703 root 3u IPv6  6499
<purple>TCP *:ssh (LISTEN)</purple>
sshd 7892 root 3u IPv6  6757
<purple>TCP 10.10.1.5:ssh-&gt;192.168.1.5:49901 (ESTABLISHED)</purple></pre>
<h3>Show only TCP (works the same for UDP)</h3>
<p><code><strong>lsof -iTCP</strong></code></p>
<pre class="codeblock">COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME

sshd 7703 root 3u IPv6 6499 <green>TCP</green> *:ssh (LISTEN)

sshd 7892 root 3u IPv6 6757 <green>TCP</green> 10.10.1.5:ssh-&gt;192.168.1.5:49901 (ESTABLISHED)</pre>
<h3><code><larger>-i :port</larger></code> shows all networking related to a given port</h3>
<p><code><strong>lsof -i <red>:22</red></strong></code></p>
<pre class="codeblock">COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME

sshd 7703 root 3u  IPv6 6499 <green>TCP</green> *:ssh (LISTEN)

sshd 7892 root 3u  IPv6 6757 <green>TCP</green> 10.10.1.5:ssh-&gt;192.168.1.5:49901 (ESTABLISHED)</pre>
<h3>To show connections to a specific host, use <code><larger>@host</larger></code></h3>
<p><code><strong>lsof -i@192.168.1.5</strong></code></p>
<pre class="codeblock">sshd 7892 root 3u IPv6 6757 <brown>TCP 10.10.1.5:ssh-&gt;192.168.1.5:49901</brown> (ESTABLISHED)</pre>
<h3>Show connections based on the host and the port using <code><larger>@host:port</larger></code></h3>
<p><code><strong>lsof -i@192.168.1.5<red>:22</red></strong></code></p>
<pre class="codeblock">sshd 7892 root 3u IPv6 6757 <brown>TCP 10.10.1.5:ssh-&gt;192.168.1.5:49901</brown> (ESTABLISHED)</pre>
<h3><code><larger>Grep</larger></code>ping for &#8220;LISTEN&#8221; shows what ports your system is waiting for connections on</h3>
<p><code><strong>lsof -i<orange>| grep LISTEN</orange></strong></code></p>
<pre class="codeblock">iTunes     400 daniel   16u  IPv4 0x4575228  0t0 TCP *:daap <green>(LISTEN)</green></pre>
<h3><larger><code>Grep</code></larger>ping for &#8220;ESTABLISHED&#8221; shows current active connections</h3>
<p><code><strong>lsof -i<orange>| grep ESTABLISHED</orange></strong></code></p>
<pre class="codeblock">firefox-b 169 daniel  49u IPv4 0t0 TCP 1.2.3.3:1863-&gt;1.2.3.4:http <green>(ESTABLISHED)</green></pre>
<p></p>
<h2>Working with Users, Processes, and Files</h2>
<p>You can also get information on various users, processes, and files on your system using <code><larger>lsof</larger></code>:</p>
<h3>Show what a given user has open using <larger><code>-u</code></larger></h3>
<p><code><strong>lsof -u daniel</strong></code></p>
<pre class="codeblock">-- snipped --

Dock 155 daniel  txt REG   14,2   2798436   823208 /usr/lib/libicucore.A.dylib

Dock 155 daniel  txt REG   14,2   1580212   823126 /usr/lib/libobjc.A.dylib

Dock 155 daniel  txt REG   14,2   2934184   823498 /usr/lib/libstdc++.6.0.4.dylib

Dock 155 daniel  txt REG   14,2    132008   823505 /usr/lib/libgcc_s.1.dylib

Dock 155 daniel  txt REG   14,2    212160   823214 /usr/lib/libauto.dylib

-- snipped --</pre>
<h3>See what files and network connections a command is using with <larger><code>-c</code></larger></h3>
<p><code><strong>lsof -c syslog-ng</strong></code></p>
<pre class="codeblock">COMMAND    PID USER   FD   TYPE     DEVICE    SIZE       NODE NAME

syslog-ng 7547 root  cwd    DIR    3,3    4096   2 /

syslog-ng 7547 root  rtd    DIR    3,3    4096   2 /

syslog-ng 7547 root  txt    REG    3,3  113524  1064970 /usr/sbin/syslog-ng

syslog-ng 7547 root  mem    REG    0,0   0 [heap]

syslog-ng 7547 root  mem    REG    3,3  105435   850412 /lib/libpthread-2.4.so

syslog-ng 7547 root  mem    REG    3,3 1197180   850396 /lib/libc-2.4.so

syslog-ng 7547 root  mem    REG    3,3   59868   850413 /lib/libresolv-2.4.so

syslog-ng 7547 root  mem    REG    3,3   72784   850404 /lib/libnsl-2.4.so

syslog-ng 7547 root  mem    REG    3,3   32040   850414 /lib/librt-2.4.so

syslog-ng 7547 root  mem    REG    3,3  126163   850385 /lib/ld-2.4.so

-- snipped --</pre>
<h3>Pointing to a file shows what&#8217;s interacting with that file</h3>
<p><code><strong>lsof /var/log/messages</strong></code></p>
<pre class="codeblock">COMMAND    PID USER   FD   TYPE DEVICE   SIZE   NODE NAME

syslog-ng 7547 root    4w   REG    3,3 217309 834024 /var/log/messages</pre>
<h3>The <larger><code>-p</code></larger> switch lets you see what a given process ID has open, which is good for learning more about unknown processes</h3>
<p><code><strong>lsof -p 10075</strong></code></p>
<pre class="codeblock">-- snipped --

sshd    10068 root  mem    REG    3,3   34808 850407 /lib/libnss_files-2.4.so

sshd    10068 root  mem    REG    3,3   34924 850409 /lib/libnss_nis-2.4.so

sshd    10068 root  mem    REG    3,3   26596 850405 /lib/libnss_compat-2.4.so

sshd    10068 root  mem    REG    3,3  200152 509940 /usr/lib/libssl.so.0.9.7

sshd    10068 root  mem    REG    3,3   46216 510014 /usr/lib/liblber-2.3

sshd    10068 root  mem    REG    3,3   59868 850413 /lib/libresolv-2.4.so

sshd    10068 root  mem    REG    3,3 1197180 850396 /lib/libc-2.4.so

sshd    10068 root  mem    REG    3,3   22168 850398 /lib/libcrypt-2.4.so

sshd    10068 root  mem    REG    3,3   72784 850404 /lib/libnsl-2.4.so

sshd    10068 root  mem    REG    3,3   70632 850417 /lib/libz.so.1.2.3

sshd    10068 root  mem    REG    3,3    9992 850416 /lib/libutil-2.4.so

-- snipped --</pre>
<h3>The <code><larger>-t</larger></code> option returns just a PID</h3>
<p><code><strong>lsof -t -c Mail</strong></code></p>
<pre class="codeblock">350</pre>
<p><code><strong>ps aux | grep Mail</strong></code></p>
<pre class="codeblock">daniel <strong>350</strong> 0.0 1.5 405980 31452 ?? S  Mon07PM 2:50.28 /Applications/Mail.app</pre>
<p></p>
<h2>Advanced Usage</h2>
<h3>Using<larger><code>-a</code></larger> allows you to combine search terms, so the query below says, &#8220;show me everything running as daniel connected to 1.1.1.1&#8243;</h3>
<p><code><strong>lsof <brown>-a</brown> <blue>-u</blue> daniel <blue>-i</blue> @1.1.1.1</strong></code></p>
<pre class="codeblock">bkdr   1893 daniel 3u  IPv6 3456 <red>TCP 10.10.1.10:1234-&gt;1.1.1.1:31337</red> (ESTABLISHED)</pre>
<h3>Using the <code><larger>-t</larger></code> and <code><larger>-c</larger></code> options together you can HUP processes</h3>
<p><code><strong>kill -HUP `lsof -t -c sshd`</strong></code></p>
<h3>You can also use the <code><larger>-t</larger></code> with <code><larger>-u</larger></code> to kill everything a user has open</h3>
<p><code><strong>kill -9 `lsof -t -u daniel`</strong></code></p>
<h3><larger><code>lsof +L<red>1</red></code></larger> shows you all open files that have a link count less than 1, often indicative of a cracker trying to hide something</h3>
<p><code><strong>lsof +L1</strong></code></p>
<pre class="codeblock">(hopefully nothing)</pre>
<h2>Conclusion</h2>
<p>This primer just scratches the surface of <larger><code>lsof</code></larger>&#8217;s functionality. For a full reference, run <larger><code>man lsof</code></larger> or check out <a href="http://www.netadmintools.com/html/lsof.man.html">the online version</a>.<br />
<h7>References</h7><br />
The <larger><code>lsof</code></larger> man page:<br />
<a href="http://www.netadmintools.com/html/lsof.man.html">http://www.netadmintools.com/html/lsof.man.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benharold.com/tech/lsof-the-most-powerful-versitile-and-underused-unix-command/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Father&#8217;s new book was reviewed in the LA Times!</title>
		<link>http://blog.benharold.com/news/my-fathers-new-book-was-reviewed-in-the-la-times/</link>
		<comments>http://blog.benharold.com/news/my-fathers-new-book-was-reviewed-in-the-la-times/#comments</comments>
		<pubDate>Wed, 12 Jul 2006 23:54:55 +0000</pubDate>
		<dc:creator>orvl</dc:creator>
		
		<category><![CDATA[Entertainment]]></category>

		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.benharold.com/?p=6</guid>
		<description><![CDATA[My Father&#8217;s latest book, Owning the Sierra Nevada: a short history of a long infatuation came off the presses at the end of June.  On this past Sunday, July 9th, the book was reviewed in the Los Angeles Times book review.  This has come as a rather big surprise because the review copy [...]]]></description>
			<content:encoded><![CDATA[<p>My Father&#8217;s latest book, <em>Owning the Sierra Nevada: a short history of a long infatuation</em> came off the presses at the end of June.  On this past Sunday, July 9th, the book was reviewed in the Los Angeles Times book review.  This has come as a rather big surprise because the review copy of the book that was sent to the LA Times was done only as a long-shot. A review from them, was&#8211;to say the least&#8211; not expected.  The LA Times is one of the biggest and most read newspapers in the country, right behind the New York Times.  Hopefully this review will spark more and more interest in the book and cause it to start flying off the shelves.  Multiple bookstores have already placed orders for copies of the book after reading the review.<br />
<br />
If you are interested in acquiring a copy (or copies) of the book you can <a href="http://www.brentharold.com">contact my Father directly via his website</a> or wait until the book shows up in a bookstore near you; hopefully sooner rather than later.</p>
<p>View a compilation of <a href="http://brentharold.com/sierra_nev.php#reviews" target="_blank">reviews for <em>Owning the Sierra Nevada</em></a>.</p>
<p style="font-size: 10px; text-align: right">technorati tags:<a href="http://technorati.com/tag/books" rel="tag">books</a>, <a href="http://technorati.com/tag/father" rel="tag">father</a>, <a href="http://technorati.com/tag/LA_times" rel="tag">LA_times</a>, <a href="http://technorati.com/tag/sierra_nevada" rel="tag">sierra_nevada</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benharold.com/news/my-fathers-new-book-was-reviewed-in-the-la-times/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Possible domain buy out!</title>
		<link>http://blog.benharold.com/news/possible-domain-buy-out-2/</link>
		<comments>http://blog.benharold.com/news/possible-domain-buy-out-2/#comments</comments>
		<pubDate>Sun, 09 Jul 2006 20:18:21 +0000</pubDate>
		<dc:creator>orvl</dc:creator>
		
		<category><![CDATA[Entertainment]]></category>

		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.benharold.com/?p=4</guid>
		<description><![CDATA[Well, last night I got home from my buddy&#8217;s 21st birthday to find that I had received the following email:
Hi Ben,
It seems we share the same name. Would you consider selling the rights to either of these domain names?
benharold.com
haroldconsulting.com
If you have a price in mind I&#8217;d love to hear it.
Thanks,
Ben Harold
Harold Consulting, Inc.
Confused at first, [...]]]></description>
			<content:encoded><![CDATA[<p>Well, last night I got home from my buddy&#8217;s 21st birthday to find that I had received the following email:</p>
<blockquote cite="Email from 'Benjamin Harold'"><p>Hi Ben,</p>
<p>It seems we share the same name. Would you consider selling the rights to either of these domain names?</p>
<p>benharold.com<br />
haroldconsulting.com</p>
<p>If you have a price in mind I&#8217;d love to hear it.</p>
<p>Thanks,<br />
Ben Harold<br />
Harold Consulting, Inc.</p></blockquote>
<p>Confused at first, I soon realized that for the first time in my life I had come in contact with someone sharing the exact same name as me.  No huge surprise I guess, it had to happen eventually.  Anyways, it seems Mr. Harold runs (or is starting) a business named &#8220;Harold Consulting&#8221; and is interested in purchasing this domain (benharold.com) for use on his business&#8217; website.<br />
<br />
In my reply, I explained to him the obvious sentimental value of owning the domain as well as the fact that I already have an established personal site setup at the domain that is highly ranked in the search engines.  Taking all that into account, I told him to make me an offer I can&#8217;t refuse ;-).  We&#8217;ll see what happens.</p>
<p><!-- technorati tags begin --></p>
<p style="font-size: 10px; text-align: right">technorati tags:<a href="http://technorati.com/tag/news" rel="tag">news</a>, <a href="http://technorati.com/tag/website" rel="tag">website</a>, <a href="http://technorati.com/tag/domain" rel="tag">domain</a>, <a href="http://technorati.com/tag/money" rel="tag">money</a>, <a href="http://technorati.com/tag/buy-out" rel="tag">buy-out</a></p>
<p><!-- technorati tags end --></p>
<p style="text-align: right; font-size: 8px">Blogged with <a href="http://www.flock.com" target="_new" title="Flock">Flock</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benharold.com/news/possible-domain-buy-out-2/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
