|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectProcessStatus
public class ProcessStatus
Represents status (memory and CPU usage) information about a process.
Not all fields are available from the system directly, some fields are computed using other fields (e.g. in Linux swap is computed from difference of virtual and resident memory, exitTime is the same as timestamp, on Windows virtual memory includes swap usage which may contain redundancies). Peak information on some platforms (e.g. Linux) is updated as being sampled, so make sure the peaks are reset when a different process is sampled.
timestamp, startTime and exitTime are relative to OS-specific Epoch and should be used in relation to each other, hence no normalization is done here. A few Epoch interpretations:
Sometimes the information gathering may fail (e.g. process exits and information is no longer available), then the fields should remain untouched preserving last sample results from the last successful call.
SystemManager.fetchProcessStatus(int, ProcessStatus)
Field Summary | |
---|---|
long |
exitTime
Microseconds when this process exited since Epoch If the information is not available (process did not exit yet) then it contains the current timestamp. |
int |
pageFaultCount
Number of (major) page faults. |
long |
residentPeak
Maximum peak usage of resident memory (working set) in bytes. |
long |
residentSize
Resident memory (working set) size in bytes. |
long |
systemTime
CPU time spent on executing the process in kernel space in microseconds. |
long |
startTime
Microseconds when this process started since Epoch. |
long |
swapPeak
Maximum peak usage of swap space (memory on disk) in bytes. |
long |
swapSize
Usage of swap space (memory on disk) in bytes. |
long |
timestamp
Microseconds since Epoch until this information has been updated. |
long |
userTime
CPU time spent on executing the process tasks in micro seconds. |
long |
virtualPeak
Maximum peak virtual memory size in bytes. |
long |
virtualSize
Virtual memory size in bytes. |
Constructor Summary | |
---|---|
ProcessStatus()
|
Method Summary | |
---|---|
String |
getMemory()
Compose a user-friendly string representation about memory peaks. |
String |
getTimes()
Compose a user-friendly string representation of timing information. |
void |
printInKB()
|
void |
resetPeaks()
Resets the peak status information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int pageFaultCount
public long virtualSize
residentSize
,
swapSize
public long virtualPeak
virtualSize
public long residentSize
public long residentPeak
residentSize
public long swapSize
virtualSize
public long swapPeak
swapSize
public long userTime
public long systemTime
public long timestamp
public long startTime
public long exitTime
Constructor Detail |
---|
public ProcessStatus()
Method Detail |
---|
public void resetPeaks()
public void printInKB()
public String getTimes()
getMemory()
public String getMemory()
getTimes()
,
resetPeaks()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |