osh :: process :: Process :: Class Process
[frames] | no frames]

Class Process

source code

object --+
         |
        Process

A Process object represents a process with a particular PID. The process may or may not be running when the Process object is used. It is conceivable that the Process object does not represent the same process that was identified by the PID when the Process object was created.

Instance Methods
 
__init__(self, pid)
Creates a Process object for a given pid.
source code
 
__repr__(self)
Returns a string describing this Process.
source code
 
__cmp__(self, other)
Ranks Processes by PID.
source code
 
__hash__(self)
hash(x)
source code
 
__reduce__(self)
helper for pickle
source code
 
kill(self, signal=None)
Send the indicated signal to this process.
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce_ex__, __setattr__, __str__

Properties
  pid
The PID of this Process.
  parent
The parent of this Process.
  descendents
A list containing Process objects corresponding to the descendents of this Process, (children, grandchildren, etc.)
  state
The state of this Process.
  size
The VM size of this Process.
  rss
The VM RSS of this Process.
  commandline
The command-line used to create this Process.
  env
A map describing the environment in effect during the creation of this Process.

Inherited from object: __class__

Method Details

__init__(self, pid)
(Constructor)

source code 

Creates a Process object for a given pid. For internal use only.

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Returns a string describing this Process.

Overrides: object.__repr__

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__reduce__(self)

source code 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

Property Details

pid

The PID of this Process.

Get Method:
unreachable(self)

parent

The parent of this Process. Returns a Process object.

Get Method:
_parent(self)

descendents

A list containing Process objects corresponding to the descendents of this Process, (children, grandchildren, etc.)

Get Method:
_descendents(self)

state

The state of this Process.

Get Method:
_state(self)

size

The VM size of this Process.

Get Method:
_size(self)

rss

The VM RSS of this Process.

Get Method:
_rss(self)

commandline

The command-line used to create this Process.

Get Method:
_commandline(self)

env

A map describing the environment in effect during the creation of this Process.

Get Method:
_env(self)