ipvsadm示例说明

 

 

ipvsadm几个参数的输出的含义, 网上文章一大抄, 抄来抄去, 笼统的比较多, 但真要具体到某个输出的具体含义, 这样的文章还真是寥寥,不管是DR模式还是ospf模式,利用ipvsadm查看流量和连接情况都轻而易举。

参看当前连接情况

[root@my-LVS01 ~]# ipvsadm -Ln
IP Virtual Server version 1.2.1 (size=1048576)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 10.100.5.98:6030 wrr
-> 10.100.5.86:6030 Route 5 5 0
-> 10.100.5.87:6030 Route 5 17 0
-> 10.100.5.88:6030 Route 5 17 0

  1. Forward 转发方式,当前是路由转发
  2. Weight 权重
  3. ActiveConn 当前活跃的连接数
  4. InActConn 当前不活跃的连接数

参看全部连接数和流量

[root@my-LVS01 ~]# ipvsadm -Ln --stats
IP Virtual Server version 1.2.1 (size=1048576)
Prot LocalAddress:Port Conns InPkts OutPkts InBytes OutBytes
-> RemoteAddress:Port
TCP 10.100.5.98:6030 113786 19495479 0 2110M 0
-> 10.100.5.86:6030 12883 1679941 0 181747K 0
-> 10.100.5.87:6030 40269 10218905 0 1105M 0
-> 10.100.5.88:6030 40240 7403127 0 804275K 0

--stats选项是统计自该条转发规则生效以来的

  1. Conns (connections scheduled) 已经转发过的连接数
  2. InPkts (incoming packets) 入包个数
  3. OutPkts (outgoing packets) 出包个数
  4. InBytes (incoming bytes) 入流量(字节)
  5. OutBytes (outgoing bytes) 出流量(字节)

参看速率信息

[root@my-LVS01 ~]# ipvsadm -Ln --rate
IP Virtual Server version 1.2.1 (size=1048576)
Prot LocalAddress:Port CPS InPPS OutPPS InBPS OutBPS
-> RemoteAddress:Port
TCP 10.100.5.98:6030 0 2 0 193 0
-> 10.100.5.86:6030 0 0 0 54 0
-> 10.100.5.87:6030 0 1 0 65 0
-> 10.100.5.88:6030 0 1 0 73 0

--rate选项是显示速率信息

  1. CPS (current connection rate) 每秒连接数
  2. InPPS (current in packet rate) 每秒的入包个数
  3. OutPPS (current out packet rate) 每秒的出包个数
  4. InBPS (current in byte rate) 每秒入流量(字节)
  5. OutBPS (current out byte rate) 每秒入流量(字节)
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值