procstatus

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "v1.0"

Variables

View Source
var GetProcessStatus = func(ctx context.Context) ([]*ProcessInfo, error) {

	procStats, err := process.ProcCustomPerfCollector.GetAllMetaData()
	if err != nil {
		return nil, err
	}
	return getProcessStatusFromStat(procStats), nil
}

GetProcessStatus 获取进程信息

Functions

func New

func New(globalConfig define.Config, taskConfig define.TaskConfig) define.Task

Types

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event 上报事件

func NewEvent

func NewEvent(dataid int32, version string, time int64, report *Report) *Event

func (*Event) AsMapStr

func (e *Event) AsMapStr() common.MapStr

func (*Event) GetType

func (e *Event) GetType() string

func (*Event) IgnoreCMDBLevel

func (e *Event) IgnoreCMDBLevel() bool

type Gather

type Gather struct {
	tasks.BaseTask
	// contains filtered or unexported fields
}

func (*Gather) Run

func (g *Gather) Run(ctx context.Context, e chan<- define.Event)

type ProcessInfo

type ProcessInfo struct {
	Pid      int32
	PPid     int32
	Name     string
	Cwd      string
	Exe      string
	Cmd      []string
	CmdRaw   string
	Status   string
	Username string
	Created  int64
}

type Report

type Report struct {
	// contains filtered or unexported fields
}

func (*Report) AsMapStr

func (r *Report) AsMapStr() common.MapStr

Jump to

Keyboard shortcuts

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