<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Telnet: shell script to issue commands to telnet session.</title>
	<atom:link href="http://crazytoon.com/2009/01/03/telnet-shell-script-to-issue-commands-to-telnet-session/feed/" rel="self" type="application/rss+xml" />
	<link>http://crazytoon.com/2009/01/03/telnet-shell-script-to-issue-commands-to-telnet-session/</link>
	<description>Enterprise level solutions, LAMP, Linux, Apache, MySQL, PHP, Perl, Windows, Cache, Optimization</description>
	<lastBuildDate>Mon, 16 Apr 2012 22:54:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aaron Bish</title>
		<link>http://crazytoon.com/2009/01/03/telnet-shell-script-to-issue-commands-to-telnet-session/comment-page-1/#comment-1041</link>
		<dc:creator>Aaron Bish</dc:creator>
		<pubDate>Mon, 12 Sep 2011 19:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/?p=159#comment-1041</guid>
		<description>#  Wait for the reply and then hang up:
#  echo “stats” &#124; nc -w1 localhost 11211
That produces an error, since the &#039;&quot;&#039; confuses memcached.  The following does work:
echo stats &#124; nc -w1 localhost 11211</description>
		<content:encoded><![CDATA[<p>#  Wait for the reply and then hang up:<br />
#  echo “stats” | nc -w1 localhost 11211<br />
That produces an error, since the &#8216;&#8221;&#8216; confuses memcached.  The following does work:<br />
echo stats | nc -w1 localhost 11211</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Schmidt</title>
		<link>http://crazytoon.com/2009/01/03/telnet-shell-script-to-issue-commands-to-telnet-session/comment-page-1/#comment-808</link>
		<dc:creator>Nathan Schmidt</dc:creator>
		<pubDate>Thu, 08 Jan 2009 20:21:45 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/?p=159#comment-808</guid>
		<description>Wait for the reply and then hang up:

echo &quot;stats&quot; &#124; nc -w1 localhost 11211</description>
		<content:encoded><![CDATA[<p>Wait for the reply and then hang up:</p>
<p>echo &#8220;stats&#8221; | nc -w1 localhost 11211</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunny Walia</title>
		<link>http://crazytoon.com/2009/01/03/telnet-shell-script-to-issue-commands-to-telnet-session/comment-page-1/#comment-807</link>
		<dc:creator>Sunny Walia</dc:creator>
		<pubDate>Thu, 08 Jan 2009 20:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/?p=159#comment-807</guid>
		<description>It allows telnet session to be opened before sending the command.  I had some problems on some of the servers without sleep.  In some cases, I even had to jack it up to .8 so it had enough time: 


&lt;blockquote&gt;[root@localhost /]# (echo stats) &#124; telnet localhost 11211         
Trying 127.0.0.1...
Connected to localhost.
Escape character is &#039;^]&#039;.
Connection closed by foreign host.
[root@localhost /]# (sleep .5;echo stats) &#124; telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is &#039;^]&#039;.
STAT pid 28466
STAT uptime 23892687
STAT time 1231444944
STAT version 1.2.5
STAT pointer_size 32
STAT rusage_user 0.120007
STAT rusage_system 0.064004
STAT curr_items 0
STAT total_items 0
STAT bytes 0
STAT curr_connections 2
STAT total_connections 9
STAT connection_structures 3
STAT cmd_get 0
STAT cmd_set 0
STAT get_hits 0
STAT get_misses 0
STAT evictions 0
STAT bytes_read 35
STAT bytes_written 1894
STAT limit_maxbytes 268435456
STAT threads 1
END
Connection closed by foreign host.&lt;/blockquote&gt;

And since you mentioned the nc command, I will update the post with that command as well. Thanks.</description>
		<content:encoded><![CDATA[<p>It allows telnet session to be opened before sending the command.  I had some problems on some of the servers without sleep.  In some cases, I even had to jack it up to .8 so it had enough time: </p>
<blockquote><p>[root@localhost /]# (echo stats) | telnet localhost 11211<br />
Trying 127.0.0.1&#8230;<br />
Connected to localhost.<br />
Escape character is &#8216;^]&#8217;.<br />
Connection closed by foreign host.<br />
[root@localhost /]# (sleep .5;echo stats) | telnet localhost 11211<br />
Trying 127.0.0.1&#8230;<br />
Connected to localhost.<br />
Escape character is &#8216;^]&#8217;.<br />
STAT pid 28466<br />
STAT uptime 23892687<br />
STAT time 1231444944<br />
STAT version 1.2.5<br />
STAT pointer_size 32<br />
STAT rusage_user 0.120007<br />
STAT rusage_system 0.064004<br />
STAT curr_items 0<br />
STAT total_items 0<br />
STAT bytes 0<br />
STAT curr_connections 2<br />
STAT total_connections 9<br />
STAT connection_structures 3<br />
STAT cmd_get 0<br />
STAT cmd_set 0<br />
STAT get_hits 0<br />
STAT get_misses 0<br />
STAT evictions 0<br />
STAT bytes_read 35<br />
STAT bytes_written 1894<br />
STAT limit_maxbytes 268435456<br />
STAT threads 1<br />
END<br />
Connection closed by foreign host.</p></blockquote>
<p>And since you mentioned the nc command, I will update the post with that command as well. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsled</title>
		<link>http://crazytoon.com/2009/01/03/telnet-shell-script-to-issue-commands-to-telnet-session/comment-page-1/#comment-805</link>
		<dc:creator>jsled</dc:creator>
		<pubDate>Thu, 08 Jan 2009 01:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://crazytoon.com/?p=159#comment-805</guid>
		<description>What&#039;s the point of the sleep command?

You might want to look into netcat (nc) as a telnet alternative; it has a whole section of its manpage about &quot;why not just use telnet to connect to  arbitrary  ports?&quot;.

Cheers</description>
		<content:encoded><![CDATA[<p>What&#8217;s the point of the sleep command?</p>
<p>You might want to look into netcat (nc) as a telnet alternative; it has a whole section of its manpage about &#8220;why not just use telnet to connect to  arbitrary  ports?&#8221;.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
</channel>
</rss>

