monitor

package
v0.0.0-...-e7e6c5a Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Control

func Control(ctx context.Context, t *asynq.Task) error

Control monitor task

func GetMonitorLog

func GetMonitorLog() []map[string]any

GetMonitorLog Retrieve monitoring logs

func Init

func Init()

Types

type Monitor

type Monitor struct {
	OsName      string // OS
	BootTime    string // Startup time
	LogSize     uint64 // The size of the log directory
	LogSizeF    string
	UploadSize  uint64 // The size of the upload directory
	UploadSizeF string
	TmpSize     uint64 // The size of the cache directory.
	TmpSizeF    string
}

func GetMonitorInfo

func GetMonitorInfo() *Monitor

GetMonitorInfo Retrieve monitoring information

type MonitorData

type MonitorData struct {
	CpuPercent     float64
	MemPercent     float64
	ThreadCount    int
	GoroutineCount int
	Timestamp      int64
}

func GetMonitorData

func GetMonitorData() *MonitorData

GetMonitorData Retrieve monitoring data

Jump to

Keyboard shortcuts

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