public class ProcessInfo
extends java.lang.Object
There are also convenience methods that can be used to print out a process table in a monospace font (for example, on the console).
Constructor and Description |
---|
ProcessInfo(int pid,
int parentPid,
java.lang.String command,
java.lang.String name,
java.lang.String owner,
long userMillis,
long systemMillis,
long residentBytes,
long totalBytes) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCommand()
The command that was originally used to start this process.
|
java.lang.String |
getName()
The name of this process.
|
java.lang.String |
getOwner()
The name of the owner of this process.
|
int |
getParentPid()
The id of the parent process of this parent
|
int |
getPid()
The id of this process
|
long |
getResidentBytes()
The number of bytes used by this process that are currently in physical
memory.
|
long |
getSystemMillis()
The number of milliseconds that this process has been running
on the CPUs in kernel mode.
|
long |
getTotalBytes()
The total size of this process in bytes.
|
long |
getUserMillis()
The number of milliseconds that this process has been running
on the CPUs in user mode.
|
static java.lang.String |
header()
Prints out a header that can be used along with
toString()
(assuming you use a monospace font). |
java.lang.String |
toString()
A one-line string representation of some of the information in this object
that can be used to print out a single line in a process table.
|
public ProcessInfo(int pid, int parentPid, java.lang.String command, java.lang.String name, java.lang.String owner, long userMillis, long systemMillis, long residentBytes, long totalBytes)
public int getPid()
public int getParentPid()
public java.lang.String getCommand()
public java.lang.String getName()
public java.lang.String getOwner()
public long getUserMillis()
public long getSystemMillis()
public long getResidentBytes()
public long getTotalBytes()
public static java.lang.String header()
toString()
(assuming you use a monospace font).public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009 ThoughtWorks. All Rights Reserved.