Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Process ¶
type Process struct { // PID is the process ID. Pid string // Stat contains data from /proc/$pid/stat. Stat proc.Stat // Status containes data from /proc/$pid/status. Status proc.Status // CmdLine containes data from /proc/$pid/cmdline. CmdLine []string // Label containers data from /proc/$pid/attr/current. Label string // PidNS contains data from /proc/$pid/ns/pid. PidNS string // Huser is the effective host user of a container process. Huser string // Hgroup is the effective host group of a container process. Hgroup string }
Process includes process-related from the /proc FS.
func New ¶
New returns a new Process with the specified pid and parses the relevant data from /proc and /dev.
func (*Process) ElapsedTime ¶
ElapsedTime returns the time.Duration since process p was created.
func (*Process) SetHostData ¶
SetHostData sets all host-related data fields.
Click to show internal directories.
Click to hide internal directories.