monitoring

package
v0.0.2-0...-83fa1ee Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiskUsage

func DiskUsage(path string) (*disk.UsageStat, error)

func GetAllMemoryStats

func GetAllMemoryStats() (stats *memory.MemoryStats, err error)

func GetMemoryUsage

func GetMemoryUsage() (vmem *mem.VirtualMemoryStat, err error)

func GetSwapDevices

func GetSwapDevices() (swapdvcs []*mem.SwapDevice, err error)

func GetSwapUsage

func GetSwapUsage() (swap *mem.SwapMemoryStat, err error)

func GetSystemInfo

func GetSystemInfo() (info *system.SystemStats, err error)

func PrintDiskUsageByPath

func PrintDiskUsageByPath(path string) (uint64, error)

func PrintPartitions

func PrintPartitions()

func ScanDirs

func ScanDirs(path string)

Types

type DiskOpRequest

type DiskOpRequest struct {
	Operation   DiskOperation
	SourceDir   string
	SearchGLOB  string
	DestDir     string
	IgnoreTypes []string
	IgnoreDirs  []string
	IgnoreFiles []string
}

func (DiskOpRequest) GetSourceDir

func (d DiskOpRequest) GetSourceDir() string

func (DiskOpRequest) IsIgnored

func (d DiskOpRequest) IsIgnored(path string) bool

func (DiskOpRequest) IsIgnoredFile

func (d DiskOpRequest) IsIgnoredFile(path string) bool

func (DiskOpRequest) IsIgnoredType

func (d DiskOpRequest) IsIgnoredType(path string) bool

func (DiskOpRequest) IsValid

func (d DiskOpRequest) IsValid() bool

func (DiskOpRequest) String

func (d DiskOpRequest) String() string

type DiskOperation

type DiskOperation int64
const (
	NOOP DiskOperation = iota
	Read
	COPY
	MOVE
	RENAME
	DELETE
)

Jump to

Keyboard shortcuts

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