org.bootchart.common

Class Process

public class Process extends Object implements Comparable

Process encapsulation.
Field Summary
booleanactive
Whether the process is active.
ListchildList
A list of children Processes.
Stringcmd
Command line.
Stringdesc
Process decription (e.g.
longduration
Process duration in milliseconds.
Processparent
Parent process.
intpid
Process ID.
intppid
Parent process ID.
Listsamples
A list of process statistics samples.
DatestartTime
Process start time.
static intSTATE_RUNNING
Running state.
static intSTATE_SLEEPING
Sleeping state.
static intSTATE_STOPPED
Stopped or traced.
static intSTATE_UNDEFINED
Undefined state.
static intSTATE_WAITING
Uninterruptible sleep.
static intSTATE_ZOMBIE
Zombie state (defunct).
Constructor Summary
Process(int pid, String cmd)
Created a new process.
Method Summary
intcompareTo(Object o)
booleanequals(Object o)
inthashCode()
StringtoString()
Returns a string representation of the process.

Field Detail

active

public boolean active
Whether the process is active. A process is active if it contains at least one non-sleeping sample. Idle processes are optionally filtered out.

childList

public List childList
A list of children Processes.

cmd

public String cmd
Command line.

desc

public String desc
Process decription (e.g. PID and command, script stack trace, etc.).

duration

public long duration
Process duration in milliseconds.

parent

public Process parent
Parent process.

pid

public int pid
Process ID.

ppid

public int ppid
Parent process ID.

samples

public List samples
A list of process statistics samples.

startTime

public Date startTime
Process start time.

STATE_RUNNING

public static final int STATE_RUNNING
Running state.

STATE_SLEEPING

public static final int STATE_SLEEPING
Sleeping state.

STATE_STOPPED

public static final int STATE_STOPPED
Stopped or traced.

STATE_UNDEFINED

public static final int STATE_UNDEFINED
Undefined state.

STATE_WAITING

public static final int STATE_WAITING
Uninterruptible sleep.

STATE_ZOMBIE

public static final int STATE_ZOMBIE
Zombie state (defunct).

Constructor Detail

Process

public Process(int pid, String cmd)
Created a new process.

Parameters: pid process ID cmd command line

Method Detail

compareTo

public int compareTo(Object o)

equals

public boolean equals(Object o)

hashCode

public int hashCode()

toString

public String toString()
Returns a string representation of the process.

Returns: string representation