Class Process

java.lang.Object
org.bootchart.common.Process
All Implemented Interfaces:
Comparable

public class Process extends Object implements Comparable
Process encapsulation.
  • Field Details

    • STATE_UNDEFINED

      public static final int STATE_UNDEFINED
      Undefined state.
      See Also:
    • STATE_RUNNING

      public static final int STATE_RUNNING
      Running state.
      See Also:
    • STATE_SLEEPING

      public static final int STATE_SLEEPING
      Sleeping state.
      See Also:
    • STATE_WAITING

      public static final int STATE_WAITING
      Uninterruptible sleep.
      See Also:
    • STATE_STOPPED

      public static final int STATE_STOPPED
      Stopped or traced.
      See Also:
    • STATE_ZOMBIE

      public static final int STATE_ZOMBIE
      Zombie state (defunct).
      See Also:
    • pid

      public int pid
      Process ID.
    • cmd

      public String cmd
      Command line.
    • desc

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

      public Date startTime
      Process start time.
    • duration

      public long duration
      Process duration in milliseconds.
    • parent

      public Process parent
      Parent process.
    • ppid

      public int ppid
      Parent process ID.
    • childList

      public List childList
      A list of children Processes.
    • samples

      public List samples
      A list of process statistics samples.
    • 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.
  • Constructor Details

    • Process

      public Process(int pid, String cmd)
      Created a new process.
      Parameters:
      pid - process ID
      cmd - command line
  • Method Details

    • toString

      public String toString()
      Returns a string representation of the process.
      Overrides:
      toString in class Object
      Returns:
      string representation
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object