| 
 | ||||||||
| 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 | exitTimeMicroseconds when this process exited since Epoch If the information is not available (process did not exit yet) then it contains the current timestamp. | 
|  int | pageFaultCountNumber of (major) page faults. | 
|  long | residentPeakMaximum peak usage of resident memory (working set) in bytes. | 
|  long | residentSizeResident memory (working set) size in bytes. | 
|  long | systemTimeCPU time spent on executing the process in kernel space in microseconds. | 
|  long | startTimeMicroseconds when this process started since Epoch. | 
|  long | swapPeakMaximum peak usage of swap space (memory on disk) in bytes. | 
|  long | swapSizeUsage of swap space (memory on disk) in bytes. | 
|  long | timestampMicroseconds since Epoch until this information has been updated. | 
|  long | userTimeCPU time spent on executing the process tasks in micro seconds. | 
|  long | virtualPeakMaximum peak virtual memory size in bytes. | 
|  long | virtualSizeVirtual 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, 
swapSizepublic long virtualPeak
virtualSizepublic long residentSize
public long residentPeak
residentSizepublic long swapSize
virtualSizepublic long swapPeak
swapSizepublic 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 | |||||||