Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Package linuxutil contains the Retina linuxutil plugin. It gathers TCP/UDP statistics and network interface statistics from the netstats and ethtool node utilities (respectively).
Package linuxutil is a generated GoMock package.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
- Constants
- func New(cfg *kcfg.Config) api.Plugin
- type ConnectionStats
- type EthtoolInterface
- type EthtoolOpts
- type EthtoolReader
- type EthtoolStats
- type IfaceStats
- type MockEthtoolInterface
- type MockEthtoolInterfaceMockRecorder
- type MockNetstatInterface
- type MockNetstatInterfaceMockRecorder
- type Netstat
- type NetstatInterface
- type NetstatOpts
- type NetstatReader
- type SocketStats
Constants ¶
const (
Name api.PluginName = "linuxutil"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionStats ¶
type ConnectionStats struct { // https://github.com/ecki/net-tools/blob/master/statistics.c#L206 TcpExt map[string]uint64 `json:"tcp_ext"` IpExt map[string]uint64 `json:"ip_ext"` MPTcpExt map[string]uint64 `json:"mptcp_ext"` // Socket stats UdpSockets SocketStats `json:"udp_sockets"` TcpSockets SocketStats `json:"tcp_sockets"` }
type EthtoolInterface ¶
type EthtoolOpts ¶
type EthtoolOpts struct {
// contains filtered or unexported fields
}
type EthtoolReader ¶
type EthtoolReader struct {
// contains filtered or unexported fields
}
func NewEthtoolReader ¶
func NewEthtoolReader(opts *EthtoolOpts, ethHandle EthtoolInterface) *EthtoolReader
type EthtoolStats ¶
type EthtoolStats struct {
// contains filtered or unexported fields
}
type IfaceStats ¶
type IfaceStats struct { Name string // Inbound stats RxBytes uint64 RxPackets uint64 RxErrs uint64 RxDrop uint64 RxFIFO uint64 RxFrame uint64 RxCompressed uint64 RxMulticast uint64 // Outbound stats TxBytes uint64 TxPackets uint64 TxErrs uint64 TxDrop uint64 TxFIFO uint64 TxColls uint64 TxCarrier uint64 TxCompressed uint64 }
type MockEthtoolInterface ¶
type MockEthtoolInterface struct {
// contains filtered or unexported fields
}
MockEthtoolInterface is a mock of EthtoolInterface interface.
func NewMockEthtoolInterface ¶
func NewMockEthtoolInterface(ctrl *gomock.Controller) *MockEthtoolInterface
NewMockEthtoolInterface creates a new mock instance.
func (*MockEthtoolInterface) Close ¶
func (m *MockEthtoolInterface) Close()
Close mocks base method.
func (*MockEthtoolInterface) EXPECT ¶
func (m *MockEthtoolInterface) EXPECT() *MockEthtoolInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockEthtoolInterfaceMockRecorder ¶
type MockEthtoolInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockEthtoolInterfaceMockRecorder is the mock recorder for MockEthtoolInterface.
func (*MockEthtoolInterfaceMockRecorder) Close ¶
func (mr *MockEthtoolInterfaceMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
type MockNetstatInterface ¶
type MockNetstatInterface struct {
// contains filtered or unexported fields
}
MockNetstatInterface is a mock of NetstatInterface interface.
func NewMockNetstatInterface ¶
func NewMockNetstatInterface(ctrl *gomock.Controller) *MockNetstatInterface
NewMockNetstatInterface creates a new mock instance.
func (*MockNetstatInterface) EXPECT ¶
func (m *MockNetstatInterface) EXPECT() *MockNetstatInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNetstatInterface) TCPSocks ¶
func (m *MockNetstatInterface) TCPSocks(accept netstat.AcceptFn) ([]netstat.SockTabEntry, error)
TCPSocks mocks base method.
func (*MockNetstatInterface) UDPSocks ¶
func (m *MockNetstatInterface) UDPSocks(accept netstat.AcceptFn) ([]netstat.SockTabEntry, error)
UDPSocks mocks base method.
type MockNetstatInterfaceMockRecorder ¶
type MockNetstatInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockNetstatInterfaceMockRecorder is the mock recorder for MockNetstatInterface.
type NetstatInterface ¶
type NetstatInterface interface { UDPSocks(accept netstat.AcceptFn) ([]netstat.SockTabEntry, error) TCPSocks(accept netstat.AcceptFn) ([]netstat.SockTabEntry, error) }
type NetstatOpts ¶
type NetstatOpts struct { // when true only includes curated list of keys CuratedKeys bool // when true will include all keys with value 0 AddZeroVal bool // get only listening sockets ListenSock bool // previous TCP socket stats PrevTCPSockStats *SocketStats }
type NetstatReader ¶
type NetstatReader struct {
// contains filtered or unexported fields
}
func NewNetstatReader ¶
func NewNetstatReader(opts *NetstatOpts, ns NetstatInterface) *NetstatReader
type SocketStats ¶
type SocketStats struct {
// contains filtered or unexported fields
}