Package osh :: Module 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
 
__str__(self)
Returns a string describing this Process.
source code
 
__cmp__(self, other)
Ranks Processes by PID.
source code
 
__hash__(self)
hash(x)
source code
 
pid(self)
The PID of this Process.
source code
 
parent(self)
The parent of this Process.
source code
 
descendents(self)
A list containing Process objects corresponding to the descendents of this Process, (children, grandchildren, etc.)
source code
 
state(self)
The state of this Process.
source code
 
size(self)
The VM size of this Process.
source code
 
rss(self)
The VM RSS of this Process.
source code
 
command_line(self)
The command-line used to create this Process.
source code
 
env(self)
A map describing the environment in effect during the creation of this Process.
source code
 
kill(self, signal=None)
Send the indicated signal to this process.
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Properties

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__

__str__(self)
(Informal representation operator)

source code 
Returns a string describing this Process.
Overrides: object.__str__

__hash__(self)
(Hashing function)

source code 
hash(x)
Overrides: object.__hash__
(inherited documentation)

parent(self)

source code 
The parent of this Process. Returns a Process object.