| java.lang.Object org.cougaar.tools.server.system.ProcessStatus
ProcessStatus | final public class ProcessStatus implements Serializable(Code) | | A status summary of a running process, which may or may
not be a Java Virtual Machine, which includes references
to parent/child processes and basic process information.
Some of this information is Operating System specific,
such as the ability to track memory/cpu usage.
|
Field Summary | |
final public static int | MARK_CHILD This ProcessStatus has the "marked" ProcessStatus as a
parent or (great+)grandparent. | final public static int | MARK_NONE Marking disabled or there is no relation with this
ProcessStatus and the self-"marked" ProcessStatus. | final public static int | MARK_PARENT This ProcessStatus contains the "marked" ProcessStatus as
a child or (great+)grandchild. | final public static int | MARK_SELF This ProcessStatus is the single "marked" ProcessStatus. | final public static String[] | MARK_STRINGS |
Method Summary | |
public List | getChildren() Get an immutable list of children ProcessStatus
processes. | public String | getCommand() Get the command. | public int | getMark() Get the "mark" of this process in relation to the process
that has the "MARK_SELF" tag.
This is a utility method for recursively tagging the
process tree. | public String | getMarkAsString() Get the mark as a readable String. | public ProcessStatus | getParent() Get the parent process's ProcessStatus of
this process.
Most ProcessStatus data structures will have
a non-null getParent(). | public long | getParentProcessIdentifier() Get the parent's process id. | public long | getProcessIdentifier() Get the process id. | public long | getStartTime() Get the start time in milliseconds. | public String | getUserName() Get the user name. | public void | mark() Mark this ProcessStatus with "MARK_SELF",
it's parents and (grand+)parents with "MARK_PARENT", and
all it's children and (grand+)children with "MARK_CHILD". | public String | toString() | public String | toString(boolean showFullDetails) | public void | unmark() Mark this ProcessStatus as "MARK_NONE".
This is useful when preparing to call mark(). |
MARK_CHILD | final public static int MARK_CHILD(Code) | | This ProcessStatus has the "marked" ProcessStatus as a
parent or (great+)grandparent.
See Also: ProcessStatus.getMark() |
MARK_NONE | final public static int MARK_NONE(Code) | | Marking disabled or there is no relation with this
ProcessStatus and the self-"marked" ProcessStatus.
See Also: ProcessStatus.getMark() |
MARK_PARENT | final public static int MARK_PARENT(Code) | | This ProcessStatus contains the "marked" ProcessStatus as
a child or (great+)grandchild.
See Also: ProcessStatus.getMark() |
getChildren | public List getChildren()(Code) | | Get an immutable list of children ProcessStatus
processes.
|
getCommand | public String getCommand()(Code) | | Get the command.
The result may contain whitespace and other control characters.
|
getMark | public int getMark()(Code) | | Get the "mark" of this process in relation to the process
that has the "MARK_SELF" tag.
This is a utility method for recursively tagging the
process tree. For example, the result of a
ProcessStatusReader could mark the JVM as the
"MARK_SELF", it's parent processes as "MARK_PARENT", and
all child processes as "MARK_CHILD". This facilitates
the later display of this information.
See Also: ProcessStatus.mark() |
getParent | public ProcessStatus getParent()(Code) | | Get the parent process's ProcessStatus of
this process.
Most ProcessStatus data structures will have
a non-null getParent(). The important exceptions
are:
- the root
(getParentProcessIdentifier() == 0).
- a trimmed listing, where not all ProcessStatus
entries are gathered.
See Also: ProcessStatus.getParentProcessIdentifier() |
getProcessIdentifier | public long getProcessIdentifier()(Code) | | Get the process id.
|
getStartTime | public long getStartTime()(Code) | | Get the start time in milliseconds.
|
getUserName | public String getUserName()(Code) | | Get the user name.
|
mark | public void mark()(Code) | | Mark this ProcessStatus with "MARK_SELF",
it's parents and (grand+)parents with "MARK_PARENT", and
all it's children and (grand+)children with "MARK_CHILD".
This does not set unrelated ProcessStatus data
structures to "MARK_NONE" -- see unmark().
See Also: ProcessStatus.getMark() See Also: ProcessStatus.unmark() |
toString | public String toString(boolean showFullDetails)(Code) | | |
unmark | public void unmark()(Code) | | Mark this ProcessStatus as "MARK_NONE".
This is useful when preparing to call mark(). Note
that for a clean "mark()" all ProcessStatus data structures
must be first "unmark()"ed.
|
|
|