<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No-Life.com</title>
	<atom:link href="http://www.no-life.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.no-life.com</link>
	<description>because what else do you have to do?</description>
	<lastBuildDate>Sat, 18 Feb 2012 04:08:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The science of Network Troubleshooting</title>
		<link>http://www.no-life.com/2012/02/the-science-of-network-troubleshooting/</link>
		<comments>http://www.no-life.com/2012/02/the-science-of-network-troubleshooting/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 04:08:51 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.no-life.com/?p=48</guid>
		<description><![CDATA[Stumbled upon this great link on troubleshooting from NANOG mailing lists, and had to pass it on to anybody who hasn&#8217;t read it, especially the incident with Mary. Brings me back to the tech support days. http://packetlife.net/blog/2010/mar/10/the-science-of-network-troubleshooting/]]></description>
			<content:encoded><![CDATA[<p>Stumbled upon this great link on troubleshooting from NANOG mailing lists, and had to pass it on to anybody who hasn&#8217;t read it, especially the incident with Mary. Brings me back to the tech support days.</p>
<p><a href="http://packetlife.net/blog/2010/mar/10/the-science-of-network-troubleshooting/">http://packetlife.net/blog/2010/mar/10/the-science-of-network-troubleshooting/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.no-life.com/2012/02/the-science-of-network-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetCat cheatsheet</title>
		<link>http://www.no-life.com/2011/07/netcat-cheatsheet/</link>
		<comments>http://www.no-life.com/2011/07/netcat-cheatsheet/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 13:40:04 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[netcat]]></category>

		<guid isPermaLink="false">http://www.no-life.com/?p=14</guid>
		<description><![CDATA[Excellent cheatsheet of netcat uses. http://h.ackack.net/cheat-sheets/netcat]]></description>
			<content:encoded><![CDATA[<p>Excellent cheatsheet of netcat uses.<br />
<a title="http://h.ackack.net/cheat-sheets/netcat" href="http://h.ackack.net/cheat-sheets/netcat" target="_blank"> http://h.ackack.net/cheat-sheets/netcat</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.no-life.com/2011/07/netcat-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Debugging tools</title>
		<link>http://www.no-life.com/2011/04/linux-debugging-tools/</link>
		<comments>http://www.no-life.com/2011/04/linux-debugging-tools/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 18:02:49 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[tools linux]]></category>

		<guid isPermaLink="false">http://www.no-life.com/?p=12</guid>
		<description><![CDATA[A couple tools any Linux user should know about, and their frequent uses: The essentials which I won&#8217;t cover: ls, grep, sed, awk, cat, less, head, tail, .. I&#8217;m sure there are others. These should automatically just be extensions of your brain &#8212; you need to be intimately familiar with them to be productive on [...]]]></description>
			<content:encoded><![CDATA[<p>A couple tools any Linux user should know about, and their frequent uses:</p>
<p>The essentials which I won&#8217;t cover:</p>
<p>ls, grep, sed, awk, cat, less, head, tail, ..</p>
<p>I&#8217;m sure there are others. These should automatically just be extensions of your brain &#8212; you need to be intimately familiar with them to be productive on a command line.  If you aren&#8217;t, I suggest you search around the net, there are thousands of tutorials to bring you up to speed on each one individually, and then you can progress to chaining them together.</p>
<p>On to the real meat of this post:</p>
<p><strong>netstat</strong><br />
This really should be included above, but it does have some special uses for application debugging. Useful flags:<br />
<em> netstat -anlp | grep PID</em></p>
<p><strong>nc</strong><br />
Netcat has become the multi-tool of connection testing, for what we used to use &#8220;telnet&#8221; to establish simple tcp outbound connections, nc can now provide that, plus a listening mode to receive incoming connections. This is especially useful for validating firewall configurations before your applications ever get installed. Plus, combining nc with chained commands such as tar or gzip can make for some very quick file transfer mechanisms (bypassing ssh/scp&#8217;s performance limitations). Common uses:<br />
<em>nc host port</em> &#8212; Connect outbound to a host:port<em><br />
nc -l 8080</em> &#8212; Listen for a connection on 8080 and exit when closed.<em> </em></p>
<p><strong>lsof<br />
</strong>Handy way to list the open files/handles/sockets from a process. Common flags:<br />
<em>lsof -nPp PID</em></p>
<p><strong>strace</strong><br />
Awesome utility to monitor the system calls an application makes. Having problems debugging an app that doesn&#8217;t seem to read your configs? Or hangs every 30 seconds? Fire up strace and attach to the pid, to find out that it&#8217;s reading the wrong path, or connecting to a downed service! Want to find the longest or most frequent running system calls? No problem! The volume of info and ease of use strace provides makes it an essential part of your toolkit. Common flags:<br />
<em> strace -cp PID</em><br />
Will give you a nice table that counts the syscalls and sorts them, as well as the time spent executing.<br />
<em> strace -ttTp PID</em><br />
Spits out the timing down to the microsecond of system calls.<br />
Add -f to follow forked processes as well (handy for things like apache pre-fork, or any similar threaded/forking application). Make sure to use -o FILE to write out your output, it can move pretty quick!</p>
<p><strong>gdb</strong><br />
The glorious debugger. If you are here, it&#8217;s probably because you have a poorly behaving app, that is core dumping. strace can only go so far.. you want to find the problem code, and kick it back to the developers. GDB will help here. We can attach to a process (which will pause it), then continue the process, and have the application perform whatever causes the core dump. At that point, GDB should spit back the problem line, and hopefully provide you a window into the problem. Common use:<br />
<em> gdb [binary name] [PID]</em><br />
Issue &#8220;<em>c</em>&#8221; to continue the app. Generate your problem/seg fault, and observe the console output.<br />
Beej has a pretty slick guide to gdb: <a title="http://beej.us/guide/bggdb/" href="http://beej.us/guide/bggdb/" target="_blank">http://beej.us/guide/bggdb/</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.no-life.com/2011/04/linux-debugging-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blag this!</title>
		<link>http://www.no-life.com/2010/07/blag-this/</link>
		<comments>http://www.no-life.com/2010/07/blag-this/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 02:56:23 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.no-life.com/?p=9</guid>
		<description><![CDATA[Just getting started.. hold on to your hats.]]></description>
			<content:encoded><![CDATA[<p>Just getting started.. hold on to your hats.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.no-life.com/2010/07/blag-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

