public class OSProcess extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
OSProcess.State
Process Execution States
|
Constructor and Description |
---|
OSProcess() |
Modifier and Type | Method and Description |
---|---|
long |
getBytesRead() |
long |
getBytesWritten() |
String |
getCommandLine() |
String |
getGroup() |
String |
getGroupID() |
long |
getKernelTime() |
String |
getName() |
int |
getParentProcessID() |
String |
getPath() |
int |
getPriority() |
int |
getProcessID() |
long |
getResidentSetSize() |
long |
getStartTime() |
OSProcess.State |
getState() |
int |
getThreadCount() |
long |
getUpTime() |
String |
getUser() |
String |
getUserID() |
long |
getUserTime() |
long |
getVirtualSize() |
void |
setBytesRead(long bytesRead)
Set the number of bytes the process has read from disk.
|
void |
setBytesWritten(long bytesWritten)
Set the number of bytes the process has written to disk.
|
void |
setCommandLine(String commandLine)
Sets the process command line.
|
void |
setGroup(String group)
Sets the group.
|
void |
setGroupID(String groupID)
Sets the Group ID.
|
void |
setKernelTime(long kernelTime)
Set the number of milliseconds the process has executed in kernel mode.
|
void |
setName(String name)
Set the name of the process.
|
void |
setParentProcessID(int parentProcessID)
Set the parentProcessID.
|
void |
setPath(String path)
Set the full path of the executing process.
|
void |
setPriority(int priority)
Set the priority of this process.
|
void |
setProcessID(int processID)
Set the processID.
|
void |
setResidentSetSize(long residentSetSize)
Set the Resident Set Size (RSS).
|
void |
setStartTime(long startTime)
Set the start time of the process in number of milliseconds since January
1, 1970.
|
void |
setState(OSProcess.State state)
Set the execution state of the process.
|
void |
setThreadCount(int threadCount)
Set the number of threads in this process.
|
void |
setUpTime(long upTime)
Set the number of milliseconds since the process started.
|
void |
setUser(String user)
Sets the user.
|
void |
setUserID(String userID)
Sets the User ID.
|
void |
setUserTime(long userTime)
Set the number of milliseconds the process has executed in user mode.
|
void |
setVirtualSize(long virtualSize)
Set the Virtual Memory Size (VSZ).
|
public String getName()
public String getPath()
public String getCommandLine()
public String getUser()
public String getUserID()
public String getGroup()
OperatingSystem.getProcess(int)
.
When successful, returns a comma-delimited list of groups with
access to this process, corresponding to the SIDs in
getGroupID()
.public String getGroupID()
OperatingSystem.getProcess(int)
.
When successful, returns a comma-delimited list of group SIDs
with access to this process, corresponding to the names in
getGroup()
.public OSProcess.State getState()
public int getProcessID()
public int getParentProcessID()
public int getThreadCount()
public int getPriority()
public long getVirtualSize()
public long getResidentSetSize()
public long getKernelTime()
public long getUserTime()
public long getUpTime()
public long getStartTime()
public long getBytesRead()
public long getBytesWritten()
public void setName(String name)
name
- process namepublic void setPath(String path)
path
- process pathpublic void setCommandLine(String commandLine)
commandLine
- The commandLine to set.public void setUser(String user)
user
- The user to set.public void setUserID(String userID)
userID
- The userID to set.public void setGroup(String group)
group
- The group to set.public void setGroupID(String groupID)
groupID
- The groupID to set.public void setState(OSProcess.State state)
state
- execution statepublic void setProcessID(int processID)
processID
- process IDpublic void setParentProcessID(int parentProcessID)
parentProcessID
- parent process IDpublic void setThreadCount(int threadCount)
threadCount
- number of threadspublic void setPriority(int priority)
priority
- prioritypublic void setVirtualSize(long virtualSize)
virtualSize
- virtual sizepublic void setResidentSetSize(long residentSetSize)
residentSetSize
- resident set sizepublic void setKernelTime(long kernelTime)
kernelTime
- kernel timepublic void setUserTime(long userTime)
userTime
- user timepublic void setStartTime(long startTime)
startTime
- start timepublic void setUpTime(long upTime)
upTime
- up timepublic void setBytesRead(long bytesRead)
bytesRead
- number of bytes readpublic void setBytesWritten(long bytesWritten)
bytesWritten
- number of bytes writtenCopyright © 2010–2017 oshi. All rights reserved.