[root@master ~]# echo stat|nc 127.0.0.1 2181
-bash: nc: 未找到命令
[root@master ~]# yum -y install nc
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.cn99.com
 * epel: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.cn99.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 nmap-ncat.x86_64.2.6.40-7.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决
============================================================================================================================================================================================================================================
 Package                                                   架构                                                   版本                                                           源                                                    大小
============================================================================================================================================================================================================================================
正在安装:
 nmap-ncat                                                 x86_64                                                 2:6.40-7.el7                                                   base                                                 201 k
事务概要
============================================================================================================================================================================================================================================
安装  1 软件包
总下载量:201 k
安装大小:414 k
Downloading packages:
nmap-ncat-6.40-7.el7.x86_64.rpm                                                                                                                                                                                      | 201 kB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : 2:nmap-ncat-6.40-7.el7.x86_64                                                                                                                                                                                           1/1 
  验证中      : 2:nmap-ncat-6.40-7.el7.x86_64                                                                                                                                                                                           1/1 


已安装:
  nmap-ncat.x86_64 2:6.40-7.el7                                                                                                                                                                                                       
完毕!

[root@master ~]# echo stat|nc master 2181   

Zookeeper version: 3.4.8--1, built on 02/06/2016 03:18 GMT
Clients:
 /192.168.50.130:55716[0](queued=0,recved=1,sent=0)
 /192.168.50.133:60736[1](queued=0,recved=1299,sent=1299)

Latency min/avg/max: 0/1/264
Received: 16579
Sent: 16582
Connections: 2
Outstanding: 0
Zxid: 0x6900005637
Mode: follower
Node count: 85
[root@master ~]# 
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐