<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Andreas Zenker : CMD</title><link>http://weblogs.asp.net/andreaszenker/archive/tags/CMD/default.aspx</link><description>Tags: CMD</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>The CMD crisis</title><link>http://weblogs.asp.net/andreaszenker/archive/2009/04/16/the-cmd-crisis.aspx</link><pubDate>Fri, 17 Apr 2009 02:22:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7048565</guid><dc:creator>azenker</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/andreaszenker/rsscomments.aspx?PostID=7048565</wfw:commentRss><comments>http://weblogs.asp.net/andreaszenker/archive/2009/04/16/the-cmd-crisis.aspx#comments</comments><description>&lt;P&gt;I really like being familiar with command line tools, however, in reality I often find myself searching on line for some command I know I used before but just can't seem to remember. In a past life (&lt;EM&gt;read "job"&lt;/EM&gt;) I was able to turn around and ask a fellow lead dev who seemed to have The Hitchhiker's Guide to the Galaxy and Window's command line syntax burned into his psyche in no particular order of precedence. We called him "Inspector Gadget" because, when you were looking for the odd utility, tool or command, he was your man. Alas, today I had to resort to Google (&lt;EM&gt;MS employees here read "Live Search")&lt;/EM&gt; Here are a few reminders I needed today and some new stuff I learned. Hopefully I'll remember to look here next time.&lt;/P&gt;
&lt;H3&gt;Ping - Pretty basic stuff&lt;/H3&gt;
&lt;P&gt;What I did learn, though, is that you can alter the timeout wait period using the -w [milliseconds to wait] flag.&lt;/P&gt;
&lt;P&gt;So, if you think that a longer timeout may help diagnose a slow connection you can stretch the wait to 10 seconds like so: &lt;BR&gt;&lt;FONT face=Verdana&gt;Ping 1.1.1.1 -w 10000&lt;/FONT&gt;&lt;/P&gt;
&lt;H3&gt;Tracert - up just a notch from ping&lt;/H3&gt;
&lt;P&gt;I am not a network guy by any means, but if I see slow times between two servers I want to see what lies between.&lt;/P&gt;
&lt;P&gt;You can set the same -w flag on tracert that you can on ping and lengthen the timeout if you think that may alter your results&lt;/P&gt;
&lt;P&gt;You can also limit the number of hops with the -h flag. With a lengthened timeout, say 10 seconds, and the default 30 hops, you won't be going anywhere for a while if the trace is timing out. So to lengthen the timeout but limit the hops to 10:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;tracert 1.1.1.1 -w 10000 -h 10&lt;/FONT&gt;&lt;/P&gt;
&lt;H3&gt;Printing out the results&lt;/H3&gt;
&lt;P&gt;I remembered the "&amp;gt;" flag to direct output to a text file like so:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Ping &amp;gt;mylog.txt 1.1.1.1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;What I learned that was new (to me) was that I could also append to an existing file with the "&amp;gt;&amp;gt;" flag to build up a running diagnostics log as I went. So to add a tracert to the ping results I could execute this command.&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;tracert &amp;gt;&amp;gt;mylog.txt 1.1.1.1&lt;/FONT&gt;&lt;/P&gt;
&lt;H3&gt;Some good command line syntax references&lt;/H3&gt;
&lt;P&gt;&lt;A title=http://commandwindows.com/command1.htm href="http://commandwindows.com/command1.htm" mce_href="http://commandwindows.com/command1.htm"&gt;http://commandwindows.com/command1.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title=http://www.ss64.com/nt/ href="http://www.ss64.com/nt/" mce_href="http://www.ss64.com/nt/"&gt;http://www.ss64.com/nt/&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P align=center&gt;© Copyright 2009 - Andreas Zenker&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7048565" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/andreaszenker/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://weblogs.asp.net/andreaszenker/archive/tags/CMD/default.aspx">CMD</category><category domain="http://weblogs.asp.net/andreaszenker/archive/tags/Network/default.aspx">Network</category></item></channel></rss>