mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-21 02:55:49 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
<h3 id="安装pssh">安装pssh</h3>
|
||||
<p>在CentOS系统环境下,介绍yum的安装和源码安装的方式:</p>
|
||||
<p><strong>yum方法</strong></p>
|
||||
<pre><code>yum install pssh</code></pre>
|
||||
<pre><code class="language-bash">yum install pssh</code></pre>
|
||||
<p><strong>编译安装</strong></p>
|
||||
<pre><code>wget http://parallel-ssh.googlecode.com/files/pssh-2.3.1.tar.gz
|
||||
<pre><code class="language-bash">wget http://parallel-ssh.googlecode.com/files/pssh-2.3.1.tar.gz
|
||||
tar xf pssh-2.3.1.tar.gz
|
||||
cd pssh-2.3.1/
|
||||
python setup.py install</code></pre>
|
||||
<h3 id="选项">选项</h3>
|
||||
<pre><code>--version:查看版本
|
||||
<pre><code class="language-bash">--version:查看版本
|
||||
--help:查看帮助,即此信息
|
||||
-h:主机文件列表,内容格式”[user@]host[:port]”
|
||||
-H:主机字符串,内容格式”[user@]host[:port]”
|
||||
@@ -30,7 +30,7 @@ python setup.py install</code></pre>
|
||||
-P:打印出服务器返回信息</code></pre>
|
||||
<h3 id="实例">实例</h3>
|
||||
<p>获取每台服务器的uptime:</p>
|
||||
<pre><code># pssh -h ip.txt -i uptime
|
||||
<pre><code class="language-bash"># pssh -h ip.txt -i uptime
|
||||
[1] 11:15:03 [SUCCESS] Mar.mars.he
|
||||
11:15:11 up 4 days, 16:25, 1 user, load average: 0.00, 0.00, 0.00
|
||||
[2] 11:15:03 [SUCCESS] Jan.mars.he
|
||||
@@ -38,7 +38,7 @@ python setup.py install</code></pre>
|
||||
[3] 11:15:03 [SUCCESS] Feb.mars.he
|
||||
11:15:12 up 4 days, 16:26, 2 users, load average: 0.08, 0.02, 0.01</code></pre>
|
||||
<p>查看每台服务器上mysql复制IO/SQL线程运行状态信息:</p>
|
||||
<pre><code># pssh -h IP.txt -i "/usr/local/mysql/bin/mysql -e 'show slave status \G'"|grep Running:
|
||||
<pre><code class="language-bash"># pssh -h IP.txt -i "/usr/local/mysql/bin/mysql -e 'show slave status \G'"|grep Running:
|
||||
Slave_IO_Running: yes
|
||||
Slave_SQL_Running: Yes
|
||||
Slave_IO_Running: Yes
|
||||
@@ -46,7 +46,7 @@ python setup.py install</code></pre>
|
||||
Slave_IO_Running: Yes
|
||||
Slave_SQL_Running: Yes</code></pre>
|
||||
<p>保存每台服务器运行的结果:</p>
|
||||
<pre><code># pssh -h IP.txt -i -o /tmp/pssh/ uptime
|
||||
<pre><code class="language-bash"># pssh -h IP.txt -i -o /tmp/pssh/ uptime
|
||||
[1] 11:19:47 [SUCCESS] Feb.mars.he
|
||||
11:19:55 up 4 days, 16:31, 2 users, load average: 0.02, 0.03, 0.00
|
||||
[2] 11:19:47 [SUCCESS] Jan.mars.he
|
||||
@@ -54,7 +54,7 @@ python setup.py install</code></pre>
|
||||
[3] 11:19:47 [SUCCESS] Mar.mars.he
|
||||
11:19:56 up 4 days, 16:30, 1 user, load average: 0.00, 0.00, 0.00</code></pre>
|
||||
<p>我们来看一下/tmp/pssh/下的文件及其内容</p>
|
||||
<pre><code># ll /tmp/pssh/
|
||||
<pre><code class="language-bash"># ll /tmp/pssh/
|
||||
总用量 12
|
||||
-rw-r--r--. 1 root root 70 12月 1 11:19 Feb.mars.he
|
||||
-rw-r--r--. 1 root root 70 12月 1 11:19 Jan.mars.he
|
||||
|
||||
Reference in New Issue
Block a user