public class ProcessInfo extends 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,
String command,
String name,
String owner,
long userMillis,
long systemMillis,
long residentBytes,
long totalBytes) |
Modifier and Type | Method and Description |
---|---|
String |
getCommand()
The command that was originally used to start this process.
|
String |
getName()
The name of this process.
|
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 String |
header()
Prints out a header that can be used along with
toString()
(assuming you use a monospace font). |
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 int getPid()
public int getParentPid()
public String getCommand()
public String getName()
public String getOwner()
public long getUserMillis()
public long getSystemMillis()
public long getResidentBytes()
public long getTotalBytes()
public static String header()
toString()
(assuming you use a monospace font).public String toString()
Copyright © 2009 ThoughtWorks. All Rights Reserved.