Documentation
¶
Index ¶
- Constants
- Variables
- func CreateMemoryBarGraph(length int, meminfo *linux.MemInfo) (memory, swap string)
- func CreatePercentGraph(length int, value, total float64, color string) string
- func Run(r *sshrun.Run) (err error)
- type CPUUsage
- type CPUUsageTop
- type DiskIO
- type DiskUsage
- type Graph
- type MemoryUsage
- type Monitor
- type NetworkIO
- type NetworkUsage
- type Node
- func (n *Node) CheckClientAlive() bool
- func (n *Node) Connect(r *sshrun.Run) (err error)
- func (n *Node) CreateNodeTop() (err error)
- func (n *Node) CreateTopCPUUsage() (result *TopCPUUsage)
- func (n *Node) CreateTopDiskInfomation() (result *TopDiskInfomation)
- func (n *Node) CreateTopMemoryUsage() (result *TopMemoryUsage)
- func (n *Node) CreateTopNetworkInfomation() (result *TopNetworkInfomation)
- func (n *Node) CreateTopUptime() (result *TopUptime)
- func (n *Node) GetCPUCore() (cn int, err error)
- func (n *Node) GetCPUCoreUsage() (usages []CPUUsageTop, err error)
- func (n *Node) GetCPUUsage() (usage float64, err error)
- func (n *Node) GetCPUUsageWithBrailleLine() (usage float64, brailleLine string, err error)
- func (n *Node) GetCPUUsageWithSparkline() (usage float64, sparkline string, err error)
- func (n *Node) GetDiskUsage() (diskUsages []*DiskUsage, err error)
- func (n *Node) GetIPV6() (ipv6 []sshproc.IPv6, err error)
- func (n *Node) GetIPv4() (ipv4 []sshproc.IPv4, err error)
- func (n *Node) GetKernelVersion() (version string, err error)
- func (n *Node) GetLoadAvg() (loadavg *linux.LoadAvg, err error)
- func (n *Node) GetMemInfo() (memInfo *linux.MemInfo, err error)
- func (n *Node) GetMemoryUsage() (memUsed, memTotal, swapUsed, swapTotal uint64, err error)
- func (n *Node) GetNetworkUsage() (networkUsages []*NetworkUsage, err error)
- func (n *Node) GetTaskCounts() (tasks uint64, err error)
- func (n *Node) GetUptime() (uptime *linux.Uptime, err error)
- func (n *Node) MonitoringCPUUsage()
- func (n *Node) MonitoringDiskIO()
- func (n *Node) MonitoringNetworkIO() (err error)
- func (n *Node) StartMonitoring()
- type NodeTop
- type TopCPUUsage
- type TopDiskInfomation
- type TopMemoryUsage
- type TopNetworkInfomation
- type TopUptime
- type UpdateRows
Constants ¶
View Source
const ( ColorModeNone = iota ColorModePercentage )
Variables ¶
View Source
var IOCount = 50
Functions ¶
func CreateMemoryBarGraph ¶
func CreatePercentGraph ¶
Types ¶
type CPUUsageTop ¶
type Graph ¶
type Graph struct { // Data is the data to be graphed. Data []float64 // Min and Max are the minimum and maximum values of the graph. Min float64 Max float64 // ColorMode ColorMode int }
func (*Graph) BrailleLine ¶
type MemoryUsage ¶
MemoryUsage is monitoring memory struct
type Monitor ¶
type Monitor struct { // selected server list ServerList []string // Node list Nodes []*Node // View View *mview.Application // Panel PanelCounter int Panels *mview.TabbedPanels // BaseTab(List) BaseGrid *mview.Grid sync.Mutex // contains filtered or unexported fields }
func (*Monitor) DrawUpdate ¶
func (m *Monitor) DrawUpdate()
type NetworkUsage ¶
type Node ¶
type Node struct { ServerName string // Path PathProcStat string PathProcCpuinfo string PathProcMeminfo string PathProcUptime string PathProcLoadavg string PathProcMounts string PathProcDiskStats string // DiskIO DiskIOs map[string][]*DiskIO DiskIOsLimit int DiskReadIOBytes []int64 DiskWriteIOBytes []int64 // NetworkIO NetworkIOs map[string][]*NetworkIO NetworkIOsLimit int NetworkRXBytes []uint64 NetworkRXPackets []uint64 NetworkTXBytes []uint64 NetworkTXPackets []uint64 // Process LatestProcessLists []*linux.Process // Top NodeTop *NodeTop sync.RWMutex // contains filtered or unexported fields }
Node is monitoring node struct
func (*Node) CheckClientAlive ¶
func (*Node) CreateNodeTop ¶
func (*Node) CreateTopCPUUsage ¶
func (n *Node) CreateTopCPUUsage() (result *TopCPUUsage)
func (*Node) CreateTopDiskInfomation ¶
func (n *Node) CreateTopDiskInfomation() (result *TopDiskInfomation)
func (*Node) CreateTopMemoryUsage ¶
func (n *Node) CreateTopMemoryUsage() (result *TopMemoryUsage)
func (*Node) CreateTopNetworkInfomation ¶
func (n *Node) CreateTopNetworkInfomation() (result *TopNetworkInfomation)
func (*Node) CreateTopUptime ¶
func (*Node) GetCPUCore ¶
GetCPUCore is get cpu core num
func (*Node) GetCPUCoreUsage ¶
func (n *Node) GetCPUCoreUsage() (usages []CPUUsageTop, err error)
func (*Node) GetCPUUsage ¶
func (*Node) GetCPUUsageWithBrailleLine ¶
func (*Node) GetCPUUsageWithSparkline ¶
func (*Node) GetDiskUsage ¶
func (*Node) GetKernelVersion ¶
func (*Node) GetMemoryUsage ¶
GetMemoryUsage is get memory usage. return size is byte.
func (*Node) GetNetworkUsage ¶
func (n *Node) GetNetworkUsage() (networkUsages []*NetworkUsage, err error)
func (*Node) GetTaskCounts ¶
func (*Node) MonitoringCPUUsage ¶
func (n *Node) MonitoringCPUUsage()
func (*Node) MonitoringDiskIO ¶
func (n *Node) MonitoringDiskIO()
func (*Node) MonitoringNetworkIO ¶
func (*Node) StartMonitoring ¶
func (n *Node) StartMonitoring()
type NodeTop ¶
type NodeTop struct { Grid *mview.Grid CPUUsage *TopCPUUsage MemoryUsage *TopMemoryUsage Uptimes *TopUptime DiskUsage *TopDiskInfomation NetworkUsage *TopNetworkInfomation sync.Mutex }
type TopCPUUsage ¶
func (*TopCPUUsage) Update ¶
func (t *TopCPUUsage) Update(wg *sync.WaitGroup)
type TopDiskInfomation ¶
func (*TopDiskInfomation) Update ¶
func (t *TopDiskInfomation) Update(wg *sync.WaitGroup)
type TopMemoryUsage ¶
func (*TopMemoryUsage) Update ¶
func (t *TopMemoryUsage) Update(wg *sync.WaitGroup)
type TopNetworkInfomation ¶
func (*TopNetworkInfomation) Update ¶
func (t *TopNetworkInfomation) Update(wg *sync.WaitGroup)
type UpdateRows ¶
Click to show internal directories.
Click to hide internal directories.