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
- Forward 转发方式,当前是路由转发
 - Weight 权重
 - ActiveConn 当前活跃的连接数
 - 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选项是统计自该条转发规则生效以来的
- Conns (connections scheduled) 已经转发过的连接数
 - InPkts (incoming packets) 入包个数
 - OutPkts (outgoing packets) 出包个数
 - InBytes (incoming bytes) 入流量(字节)
 - 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选项是显示速率信息
- CPS (current connection rate) 每秒连接数
 - InPPS (current in packet rate) 每秒的入包个数
 - OutPPS (current out packet rate) 每秒的出包个数
 - InBPS (current in byte rate) 每秒入流量(字节)
 - OutBPS (current out byte rate) 每秒入流量(字节)
 
   
以上是 ipvsadm几个常用参数说明 的全部内容, 来源链接: utcz.com/z/515541.html

