<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Ops运维 | Mr`kang Blog｜小豆子]]></title> 
<link>https://www.cnmysql.com/index.php</link> 
<description><![CDATA[关注服务器运维技术、DB优化、Docker虚拟化、自动化运维、工作积累]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Ops运维 | Mr`kang Blog｜小豆子]]></copyright>
<item>
<link>https://www.cnmysql.com/post//</link>
<title><![CDATA[python简单的多进程管理服务器]]></title> 
<author>kangyang &lt;kangyang315@qq.com&gt;</author>
<category><![CDATA[Python]]></category>
<pubDate>Mon, 04 Aug 2014 06:43:14 +0000</pubDate> 
<guid>https://www.cnmysql.com/post//</guid> 
<description>
<![CDATA[ 
	<span style="font-size: 12px;"><span style="font-family: 宋体;"><br/><div class="code">import multiprocessing<br/>import time,os,math<br/><br/><br/>def func(msg):<br/>&nbsp;&nbsp;&nbsp;&nbsp;output=os.popen(&quot;ssh %s hostname&quot; %(msg)).read()<br/>&nbsp;&nbsp;&nbsp;&nbsp;print output<br/><br/><br/>if __name__ ==&quot;__main__&quot;:<br/>&nbsp;&nbsp;&nbsp;&nbsp;flist=open(&#039;b&#039;).readlines()<br/>&nbsp;&nbsp;&nbsp;&nbsp;pool =multiprocessing.Pool(processes=7)<br/>&nbsp;&nbsp;&nbsp;&nbsp;for i in flist:<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg=i.replace(&#039;&#92;n&#039;,&#039;&#039;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pool.apply_async(func, (msg, ))<br/>&nbsp;&nbsp;&nbsp;&nbsp;pool.close()<br/>&nbsp;&nbsp;&nbsp;&nbsp;pool.join()<br/>&nbsp;&nbsp;&nbsp;&nbsp;print&quot;Sub-process(es) done.&quot;</div><br/>b文件是个IP列表<br/>一个IP一行即可<br/></span></span>
]]>
</description>
</item><item>
<link>https://www.cnmysql.com/post//#blogcomment</link>
<title><![CDATA[[评论] python简单的多进程管理服务器]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.cnmysql.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>