sysinfo

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCPULoad

func GetCPULoad(s *HealthInfo)

GetCPULoad will analyze the cpu load of this node and write the data into the given LocalDataDto.

func GetHardwareData

func GetHardwareData(w http.ResponseWriter)

GetHardwareData writes some statistics about this hardware into the given http response writer.

Types

type HealthInfo

type HealthInfo struct {
	TotalMemory          uint64   `protobuf:"varint,1,opt,name=totalMemory,proto3" json:"totalMemory,omitempty"`
	AvailableMemory      uint64   `protobuf:"varint,2,opt,name=availableMemory,proto3" json:"availableMemory,omitempty"`
	CpuLoad1             float64  `protobuf:"fixed64,3,opt,name=cpuLoad1,proto3" json:"cpuLoad1,omitempty"`
	CpuLoad5             float64  `protobuf:"fixed64,4,opt,name=cpuLoad5,proto3" json:"cpuLoad5,omitempty"`
	CpuLoad15            float64  `protobuf:"fixed64,5,opt,name=cpuLoad15,proto3" json:"cpuLoad15,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func GetNodeDetails

func GetNodeDetails() (data HealthInfo)

GetNodeDetails returns all currently known information about this node.

func (*HealthInfo) Descriptor

func (*HealthInfo) Descriptor() ([]byte, []int)

func (*HealthInfo) GetAvailableMemory

func (m *HealthInfo) GetAvailableMemory() uint64

func (*HealthInfo) GetCpuLoad1

func (m *HealthInfo) GetCpuLoad1() float64

func (*HealthInfo) GetCpuLoad15

func (m *HealthInfo) GetCpuLoad15() float64

func (*HealthInfo) GetCpuLoad5

func (m *HealthInfo) GetCpuLoad5() float64

func (*HealthInfo) GetTotalMemory

func (m *HealthInfo) GetTotalMemory() uint64

func (*HealthInfo) ProtoMessage

func (*HealthInfo) ProtoMessage()

func (*HealthInfo) Reset

func (m *HealthInfo) Reset()

func (*HealthInfo) String

func (m *HealthInfo) String() string

func (*HealthInfo) XXX_DiscardUnknown

func (m *HealthInfo) XXX_DiscardUnknown()

func (*HealthInfo) XXX_Marshal

func (m *HealthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HealthInfo) XXX_Merge

func (m *HealthInfo) XXX_Merge(src proto.Message)

func (*HealthInfo) XXX_Size

func (m *HealthInfo) XXX_Size() int

func (*HealthInfo) XXX_Unmarshal

func (m *HealthInfo) XXX_Unmarshal(b []byte) error

type HostInfo

type HostInfo struct {
	HostName             string           `protobuf:"bytes,1,opt,name=HostName,proto3" json:"HostName,omitempty"`
	OsName               string           `protobuf:"bytes,2,opt,name=osName,proto3" json:"osName,omitempty"`
	OsVersion            string           `protobuf:"bytes,3,opt,name=osVersion,proto3" json:"osVersion,omitempty"`
	NumCores             uint32           `protobuf:"varint,4,opt,name=numCores,proto3" json:"numCores,omitempty"`
	FileSystems          []*PartitionInfo `protobuf:"bytes,5,rep,name=fileSystems,proto3" json:"fileSystems,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func GetHostInfo

func GetHostInfo() (hostInfo HostInfo)

func (*HostInfo) Descriptor

func (*HostInfo) Descriptor() ([]byte, []int)

func (*HostInfo) GetFileSystems

func (m *HostInfo) GetFileSystems() []*PartitionInfo

func (*HostInfo) GetHostName

func (m *HostInfo) GetHostName() string

func (*HostInfo) GetNumCores

func (m *HostInfo) GetNumCores() uint32

func (*HostInfo) GetOsName

func (m *HostInfo) GetOsName() string

func (*HostInfo) GetOsVersion

func (m *HostInfo) GetOsVersion() string

func (*HostInfo) ProtoMessage

func (*HostInfo) ProtoMessage()

func (*HostInfo) Reset

func (m *HostInfo) Reset()

func (*HostInfo) String

func (m *HostInfo) String() string

func (*HostInfo) XXX_DiscardUnknown

func (m *HostInfo) XXX_DiscardUnknown()

func (*HostInfo) XXX_Marshal

func (m *HostInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HostInfo) XXX_Merge

func (m *HostInfo) XXX_Merge(src proto.Message)

func (*HostInfo) XXX_Size

func (m *HostInfo) XXX_Size() int

func (*HostInfo) XXX_Unmarshal

func (m *HostInfo) XXX_Unmarshal(b []byte) error

type PartitionInfo

type PartitionInfo struct {
	MountPath            string   `protobuf:"bytes,1,opt,name=MountPath,proto3" json:"MountPath,omitempty"`
	Size                 uint64   `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Free                 uint64   `protobuf:"varint,3,opt,name=free,proto3" json:"free,omitempty"`
	FsType               string   `protobuf:"bytes,4,opt,name=fsType,proto3" json:"fsType,omitempty"`
	Device               string   `protobuf:"bytes,5,opt,name=device,proto3" json:"device,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func GetDiskSizeInfo

func GetDiskSizeInfo(thisPath string) (disk PartitionInfo)

GetDiskSizeInfo returns the disk info for a given linux path

func (*PartitionInfo) Descriptor

func (*PartitionInfo) Descriptor() ([]byte, []int)

func (*PartitionInfo) GetDevice

func (m *PartitionInfo) GetDevice() string

func (*PartitionInfo) GetFree

func (m *PartitionInfo) GetFree() uint64

func (*PartitionInfo) GetFsType

func (m *PartitionInfo) GetFsType() string

func (*PartitionInfo) GetMountPath

func (m *PartitionInfo) GetMountPath() string

func (*PartitionInfo) GetSize

func (m *PartitionInfo) GetSize() uint64

func (*PartitionInfo) ProtoMessage

func (*PartitionInfo) ProtoMessage()

func (*PartitionInfo) Reset

func (m *PartitionInfo) Reset()

func (*PartitionInfo) String

func (m *PartitionInfo) String() string

func (*PartitionInfo) XXX_DiscardUnknown

func (m *PartitionInfo) XXX_DiscardUnknown()

func (*PartitionInfo) XXX_Marshal

func (m *PartitionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PartitionInfo) XXX_Merge

func (m *PartitionInfo) XXX_Merge(src proto.Message)

func (*PartitionInfo) XXX_Size

func (m *PartitionInfo) XXX_Size() int

func (*PartitionInfo) XXX_Unmarshal

func (m *PartitionInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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