mylvs

package
v0.0.0-...-1107578 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IpVsConnReg *regexp.Regexp = regexp.MustCompile(`size=(\d+)`)
	LvsPortReg  *regexp.Regexp = regexp.MustCompile(`^\d+$`)
)

Functions

func CheckIfLvsRunning

func CheckIfLvsRunning(psLvsCmd string, checkLvsCfgCmd string, timeout uint32) bool

func GetIrpCpuCounts

func GetIrpCpuCounts(cmd string, timeout uint32) int64

func GetLvsConnection

func GetLvsConnection(sts *LvsStat, cmd string, timeout uint32)

func GetLvsNetStat

func GetLvsNetStat(sts *LvsStat, cmd string, timeout uint32)

func GetNetConfig

func GetNetConfig(ifaces []string, cfgs []string, cmdFmt string, timeout uint32) map[string]map[string]int8

func GetNetLROGRO

func GetNetLROGRO(ifacePrefix []string, timeout uint32) map[string]map[string]int8

Types

type LvsStat

type LvsStat struct {
	VhostStats map[string]*VhostStat
	IpVsConn   int64
}

type RealSeverStat

type RealSeverStat struct {
	Ip         string
	Port       string
	Weight     string
	ActiveConn int64
	InactConn  int64
	CPS        int64
	InPPS      int64
	OutPPS     int64
	InBPS      int64
	OutBPS     int64
}

type VhostStat

type VhostStat struct {
	Vip         string
	Port        string
	LB          string //负载均衡算法
	ActiveConn  int64
	InactConn   int64
	CPS         int64
	InPPS       int64
	OutPPS      int64
	InBPS       int64
	OutBPS      int64
	RealServers map[string]*RealSeverStat
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL