Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProcessTree ¶
GetProcessTree returns a tree with process ancestral hierarchy
func OrderedBy ¶
func OrderedBy(less ...lessFunc) *multiSorter
OrderedBy returns a Sorter that sorts using the less functions, in order. Call its Sort method to sort the data.
func PrintProcessTree ¶
func PrintProcessTree()
PrintProcessTree prints a tree of processes with their ancestral hierarchy
Types ¶
type Process ¶
type Process struct { Pid int Name string Ppid int Stat Stat User string Cmdline string Cput float64 Cpup float64 Memp float32 }
Process represents a process
func GetProcessStats ¶
GetProcessStats returns a list of processes with their respective info
func (*Process) ExternalStats ¶
ExternalStats get stats from the gopsutil
func (*Process) GetStatus ¶
GetStatus parses the status file of a process and gets the process's UID and VmRSS
func (*Process) GetUserName ¶
GetUserName returns info about the real user of a process
func (*Process) IsGhostProcess ¶
type Stat ¶
type Stat struct { State string Pgrp int Session int TtyNr int Tpgid int Flags uint Minflt int Cminflt int Majflt int Cmajflt int Utime int Stime int Cutime int64 Cstime int64 Priority int64 Nice int64 NumThreads int64 Itrealvalue int64 Starttime int64 Vsize int Rss int64 Rsslim uint64 Signal int Blocked int Sigignore int Sigcatch int Nswap int Cnswap int ExitSignal int Processor int RtPriority uint Policy uint DelayacctBlkioTicks uint64 GuestTime int CguestTime int64 StartData int EndData int StartBrk int ArgStart int ArgEnd int EnvStart int EnvEnd int ExitCode int }
Stat represents all of the info found about a process
Click to show internal directories.
Click to hide internal directories.