mon

package
v0.95.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "mon",
	Short: "Simple VM monitoring tool",
	Run: func(c *cobra.Command, args []string) {
		for {
			config, err := mon.ReadMonConfig(FlagConfigFile)
			if err != nil {
				log.Fatalf("Error reading config file: %v", err)
			}
			mon.Mon(config)
			if FlagSleepTime <= 0 {
				log.Println("Invalid sleep time, using default of 10 seconds")
				time.Sleep(10 * time.Second)
			} else {
				log.Printf("Sleeping for %d minutes", FlagSleepTime)
				time.Sleep(time.Duration(FlagSleepTime) * time.Minute)
			}
		}
	},
}
View Source
var FlagConfigFile string
View Source
var FlagSleepTime int

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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