Documentation ¶
Overview ¶
ps provides an API for finding and listing processes in a platform-agnostic way.
NOTE: If you're reading these docs online via GoDocs or some other system, you might only see the Unix docs. This project makes heavy use of platform-specific implementations. We recommend reading the source if you are interested.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Types ¶
type UnixProcess ¶
type UnixProcess struct {
// contains filtered or unexported fields
}
func (*UnixProcess) Enabled ¶
func (p *UnixProcess) Enabled() bool
func (*UnixProcess) Executable ¶
func (p *UnixProcess) Executable() string
func (*UnixProcess) PPid ¶
func (p *UnixProcess) PPid() int
func (*UnixProcess) Pid ¶
func (p *UnixProcess) Pid() int
func (*UnixProcess) Refresh ¶
func (p *UnixProcess) Refresh(whitelist []string) error
Refresh reloads all the data associated with this process.
func (*UnixProcess) Running ¶
func (p *UnixProcess) Running() bool