funcs

package
v0.0.0-...-ee89fdb Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var USES = map[string]struct{}{
	"PruneCalled":        struct{}{},
	"LockDroppedIcmps":   struct{}{},
	"ArpFilter":          struct{}{},
	"TW":                 struct{}{},
	"DelayedACKLocked":   struct{}{},
	"ListenOverflows":    struct{}{},
	"ListenDrops":        struct{}{},
	"TCPPrequeueDropped": struct{}{},
	"TCPTSReorder":       struct{}{},
	"TCPDSACKUndo":       struct{}{},
	"TCPLoss":            struct{}{},
	"TCPLostRetransmit":  struct{}{},
	"TCPLossFailures":    struct{}{},
	"TCPFastRetrans":     struct{}{},
	"TCPTimeouts":        struct{}{},
	"TCPSchedulerFailed": struct{}{},
	"TCPAbortOnMemory":   struct{}{},
	"TCPAbortOnTimeout":  struct{}{},
	"TCPAbortFailed":     struct{}{},
	"TCPMemoryPressures": struct{}{},
	"TCPSpuriousRTOs":    struct{}{},
	"TCPBacklogDrop":     struct{}{},
	"TCPMinTTLDrop":      struct{}{},
}

Functions

func AgentMetrics

func AgentMetrics() []*model.MetricValue

func BuildMappers

func BuildMappers()

根据调用指令类型和是否容易被挂起而分类(通过不同的goroutine去执行,避免相互之间的影响)

func CheckCollector

func CheckCollector()

func CoreNetMetrics

func CoreNetMetrics(ifacePrefix []string) []*model.MetricValue

采集根据配置文件过滤后的网卡数据

func CounterValue

func CounterValue(metric string, val interface{}, tags ...string) *model.MetricValue

计数器类型

func CpuGuest

func CpuGuest() float64

func CpuIdle

func CpuIdle() float64

func CpuIowait

func CpuIowait() float64

func CpuIrq

func CpuIrq() float64

func CpuMetrics

func CpuMetrics() []*model.MetricValue

func CpuNice

func CpuNice() float64

func CpuPrepared

func CpuPrepared() bool

func CpuSoftIrq

func CpuSoftIrq() float64

func CpuSteal

func CpuSteal() float64

func CpuSystem

func CpuSystem() float64

func CpuUser

func CpuUser() float64

func CurrentCpuSwitches

func CurrentCpuSwitches() uint64

func DeviceMetrics

func DeviceMetrics() (L []*model.MetricValue)

func DiskIOMetrics

func DiskIOMetrics() (L []*model.MetricValue)

func DuMetrics

func DuMetrics() (L []*model.MetricValue)

func GaugeValue

func GaugeValue(metric string, val interface{}, tags ...string) *model.MetricValue

原值类型

func IODelta

func IODelta(device string, f func([2]*nux.DiskStats) uint64) uint64

func IOMsecRead

func IOMsecRead(arr [2]*nux.DiskStats) uint64

func IOMsecTotal

func IOMsecTotal(arr [2]*nux.DiskStats) uint64

func IOMsecWeightedTotal

func IOMsecWeightedTotal(arr [2]*nux.DiskStats) uint64

func IOMsecWrite

func IOMsecWrite(arr [2]*nux.DiskStats) uint64

func IOReadMerged

func IOReadMerged(arr [2]*nux.DiskStats) uint64

func IOReadRequests

func IOReadRequests(arr [2]*nux.DiskStats) uint64

func IOReadSectors

func IOReadSectors(arr [2]*nux.DiskStats) uint64

func IOStatsForPage

func IOStatsForPage() (L [][]string)

func IOStatsMetrics

func IOStatsMetrics() (L []*model.MetricValue)

func IOWriteMerged

func IOWriteMerged(arr [2]*nux.DiskStats) uint64

func IOWriteRequests

func IOWriteRequests(arr [2]*nux.DiskStats) uint64

func IOWriteSectors

func IOWriteSectors(arr [2]*nux.DiskStats) uint64

func KernelMetrics

func KernelMetrics() (L []*model.MetricValue)

func LoadAvgMetrics

func LoadAvgMetrics() []*model.MetricValue

采集负载数据

func MemMetrics

func MemMetrics() []*model.MetricValue

func NetMetrics

func NetMetrics() []*model.MetricValue

func NetstatMetrics

func NetstatMetrics() (L []*model.MetricValue)

func NewMetricValue

func NewMetricValue(metric string, val interface{}, dataType string, tags ...string) *model.MetricValue

func PortMetrics

func PortMetrics() (L []*model.MetricValue)

func ProcMetrics

func ProcMetrics() (L []*model.MetricValue)

func ShouldHandleDevice

func ShouldHandleDevice(device string) bool

func SocketStatSummaryMetrics

func SocketStatSummaryMetrics() (L []*model.MetricValue)

执行shell指令采集socket信息

func TS

func TS(arr [2]*nux.DiskStats) uint64

func UdpMetrics

func UdpMetrics() []*model.MetricValue

func UpdateCpuStat

func UpdateCpuStat() error

上锁, 修改history数组,最新数据放到第一个位置

func UpdateDiskStats

func UpdateDiskStats() error

func UrlMetrics

func UrlMetrics() (L []*model.MetricValue)

Types

type FuncsAndInterval

type FuncsAndInterval struct {
	Fs       []func() []*model.MetricValue
	Interval int
}

间隔internal时间执行fs中的函数

Jump to

Keyboard shortcuts

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