gohai: github.com/DataDog/gohai/processes/gops Index | Files

package gops

import "github.com/DataDog/gohai/processes/gops"

Extract the information on running processes from gopsutil


Package Files

gops.go process_group.go process_info.go process_info_linux.go

type ByRSSDesc Uses

type ByRSSDesc struct {

func (ByRSSDesc) Less Uses

func (s ByRSSDesc) Less(i, j int) bool

type ProcessInfo Uses

type ProcessInfo struct {
    PID      int32
    PPID     int32
    Name     string
    RSS      uint64
    PctMem   float64
    VMS      uint64
    Username string

func GetProcesses Uses

func GetProcesses() ([]*ProcessInfo, error)

Return a slice of all the processes that are running

type ProcessNameGroup Uses

type ProcessNameGroup struct {
    // contains filtered or unexported fields

Represents a group of processes, grouped by name

func NewProcessNameGroup Uses

func NewProcessNameGroup() *ProcessNameGroup

func (*ProcessNameGroup) Name Uses

func (pg *ProcessNameGroup) Name() string

func (*ProcessNameGroup) PctMem Uses

func (pg *ProcessNameGroup) PctMem() float64

func (*ProcessNameGroup) Pids Uses

func (pg *ProcessNameGroup) Pids() []int32

func (*ProcessNameGroup) RSS Uses

func (pg *ProcessNameGroup) RSS() uint64

func (*ProcessNameGroup) Usernames Uses

func (pg *ProcessNameGroup) Usernames() []string

Return a slice of the usernames, sorted alphabetically

func (*ProcessNameGroup) VMS Uses

func (pg *ProcessNameGroup) VMS() uint64

type ProcessNameGroups Uses

type ProcessNameGroups []*ProcessNameGroup

func GroupByName Uses

func GroupByName(processInfos []*ProcessInfo) ProcessNameGroups

Group the processInfos by name and return a slice of ProcessNameGroup

func TopRSSProcessGroups Uses

func TopRSSProcessGroups(limit int) (ProcessNameGroups, error)

Return an ordered slice of the process groups that use the most RSS

func (ProcessNameGroups) Len Uses

func (s ProcessNameGroups) Len() int

Sort slices of process groups

func (ProcessNameGroups) Swap Uses

func (s ProcessNameGroups) Swap(i, j int)

Package gops imports 6 packages (graph) and is imported by 1 packages. Updated 2019-04-29. Refresh now. Tools for package owners.