process

package
v2.19.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	// Pid contains process id.
	Pid_ int64 `json:"pid"`

	// Status of the worker.
	Status_ int64 `json:"status"`

	// Number of worker executions.
	NumExecs_ uint64 `json:"numExecs"`

	// Created is unix nano timestamp of worker creation time.
	Created_ int64 `json:"created"`

	// MemoryUsage holds the information about worker memory usage in bytes.
	// Values might vary for different operating systems and based on RSS.
	MemoryUsage_ uint64 `json:"memoryUsage"`

	// CPU_Percent returns how many percent of the CPU time this process uses
	CPUPercent_ float64

	// Command used in the service plugin and shows a command for the particular service
	Command_ string
	// contains filtered or unexported fields
}

State provides information about specific worker.

func WorkerProcessState

func WorkerProcessState(w worker.BaseProcess) (*State, error)

WorkerProcessState creates new worker state definition.

func (*State) CPUPercent

func (s *State) CPUPercent() float64

func (*State) Command

func (s *State) Command() string

func (*State) Created

func (s *State) Created() int64

func (*State) MemoryUsage

func (s *State) MemoryUsage() uint64

func (*State) NumExecs

func (s *State) NumExecs() uint64

func (*State) Pid

func (s *State) Pid() int64

func (*State) Status

func (s *State) Status() int64

func (*State) String

func (s *State) String() string

Jump to

Keyboard shortcuts

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