ipvsadm幾個參數(shù)的輸出的含義宪郊, 網(wǎng)上文章一大抄, 抄來抄去拖陆, 籠統(tǒng)的比較多弛槐, 但真要具體到某個輸出的具體含義, 這樣的文章還真是寥寥依啰,不管是DR模式還是ospf模式乎串,利用ipvsadm查看流量和連接情況都輕而易舉。
參看當(dāng)前連接情況
[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 轉(zhuǎn)發(fā)方式速警,當(dāng)前是路由轉(zhuǎn)發(fā)
- Weight 權(quán)重
- ActiveConn 當(dāng)前活躍的連接數(shù)
- InActConn 當(dāng)前不活躍的連接數(shù)
參看全部連接數(shù)和流量
[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選項是統(tǒng)計自該條轉(zhuǎn)發(fā)規(guī)則生效以來的
- Conns (connections scheduled) 已經(jīng)轉(zhuǎn)發(fā)過的連接數(shù)
- InPkts (incoming packets) 入包個數(shù)
- OutPkts (outgoing packets) 出包個數(shù)
- InBytes (incoming bytes) 入流量(字節(jié))
- OutBytes (outgoing bytes) 出流量(字節(jié))
參看速率信息
[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) 每秒連接數(shù)
- InPPS (current in packet rate) 每秒的入包個數(shù)
- OutPPS (current out packet rate) 每秒的出包個數(shù)
- InBPS (current in byte rate) 每秒入流量(字節(jié))
- OutBPS (current out byte rate) 每秒入流量(字節(jié))