monitor

package module
v0.0.0-...-5bd25b8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

monitor

监控系统CPU和内存的使用情况

描述

实时打印当前进程占用CPU和内存的比率(用户可自行设置)

引用

  • import "github.com/dongjialong2006/monitor"

使用

{

import "time"
import "github.com/dongjialong2006/monitor"


func main() {
	monitor.Watch(context.Background())
	time.Sleep(5*tiem.Second)
	
	monitor.Stop()
}

}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stop

func Stop()

func Watch

func Watch(ctx context.Context, cpu float64, mem float32)

Types

This section is empty.

Jump to

Keyboard shortcuts

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