Documentation ¶
Overview ¶
packaeg gxprocess is used to get process info of "/proc"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinuxProcess ¶
type LinuxProcess struct {
// contains filtered or unexported fields
}
LinuxProcess is an Linux-specific Process information.
func NewLinuxProcess ¶
func NewLinuxProcess(pid int) (*LinuxProcess, error)
func (*LinuxProcess) Executable ¶
func (p *LinuxProcess) Executable() string
func (*LinuxProcess) PPid ¶
func (p *LinuxProcess) PPid() int
func (*LinuxProcess) Pid ¶
func (p *LinuxProcess) Pid() int
func (*LinuxProcess) Refresh ¶
func (p *LinuxProcess) Refresh() error
Refresh reloads all the data associated with this process.
type Process ¶
type Process interface { // Pid is the process ID for this process. Pid() int // PPid is the parent process ID for this process. PPid() int // Executable name running this process. This is not a path to the // executable. Executable() string }
Process is the generic interface that is implemented on every platform and provides common operations for processes.
func FindProcess ¶
FindProcess looks up a single process by pid.
Process will be nil and error will be nil if a matching process is not found.
func Processes ¶
Processes returns all processes.
This of course will be a point-in-time snapshot of when this method was called. Some operating systems don't provide snapshot capability of the process table, in which case the process table returned might contain ephemeral entities that happened to be running when this was called.