|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rhq.core.system.ProcessInfo
public class ProcessInfo
Encapsulates information about a known process.
Field Summary | |
---|---|
protected String |
baseName
|
protected String[] |
commandLine
|
protected Map<String,String> |
environmentVariables
|
protected String |
name
|
protected long |
pid
|
protected org.hyperic.sigar.ProcCpu |
procCpu
|
protected org.hyperic.sigar.ProcCred |
procCred
|
protected org.hyperic.sigar.ProcCredName |
procCredName
|
protected org.hyperic.sigar.ProcExe |
procExe
|
protected org.hyperic.sigar.ProcFd |
procFd
|
protected org.hyperic.sigar.ProcMem |
procMem
|
protected org.hyperic.sigar.ProcState |
procState
|
protected org.hyperic.sigar.ProcTime |
procTime
|
Constructor Summary | |
---|---|
protected |
ProcessInfo()
|
|
ProcessInfo(long pid)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
Two ProcessInfo objects are equal if their pids are the same. |
AggregateProcessInfo |
getAggregateProcessTree()
Returns an object that provides aggregate information on this process and all its children. |
String |
getBaseName()
Similar to getName() , this is a convenience method that returns the first command line argument, which
is the name of the program that the process is executing. |
String[] |
getCommandLine()
|
org.hyperic.sigar.ProcCpu |
getCpu()
|
org.hyperic.sigar.ProcCred |
getCredentials()
|
org.hyperic.sigar.ProcCredName |
getCredentialsName()
|
String |
getEnvironmentVariable(String name)
Retrieves a specific environment property if it exists, null otherwise. |
Map<String,String> |
getEnvironmentVariables()
|
org.hyperic.sigar.ProcExe |
getExecutable()
|
org.hyperic.sigar.ProcFd |
getFileDescriptor()
|
org.hyperic.sigar.ProcMem |
getMemory()
|
String |
getName()
Convenience method that returns the first command line argument, which is the name of the program that the process is executing. |
long |
getParentPid()
|
long |
getPid()
|
org.hyperic.sigar.ProcState |
getState()
|
org.hyperic.sigar.ProcTime |
getTime()
|
int |
hashCode()
A process' pid makes it unique - this returns the getPid() itself. |
boolean |
isRunning()
|
void |
refresh()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected long pid
protected String name
protected String baseName
protected String[] commandLine
protected Map<String,String> environmentVariables
protected org.hyperic.sigar.ProcState procState
protected org.hyperic.sigar.ProcExe procExe
protected org.hyperic.sigar.ProcTime procTime
protected org.hyperic.sigar.ProcMem procMem
protected org.hyperic.sigar.ProcCpu procCpu
protected org.hyperic.sigar.ProcFd procFd
protected org.hyperic.sigar.ProcCred procCred
protected org.hyperic.sigar.ProcCredName procCredName
Constructor Detail |
---|
protected ProcessInfo()
public ProcessInfo(long pid) throws SystemInfoException
SystemInfoException
Method Detail |
---|
public void refresh() throws SystemInfoException
SystemInfoException
public long getPid()
public String getName()
getBaseName()
,
getCommandLine()
public String getBaseName()
getName()
, this is a convenience method that returns the first command line argument, which
is the name of the program that the process is executing. However, this is only the relative filename of the
program, which does not include the full path to the program (e.g. this would return "sh" if the name of the
process is "/usr/bin/sh").
getName()
,
getCommandLine()
public String[] getCommandLine()
public Map<String,String> getEnvironmentVariables()
@Nullable public String getEnvironmentVariable(@NotNull String name)
null
otherwise.
name
- the name of the property to find
public long getParentPid() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcState getState() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcExe getExecutable() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcTime getTime() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcMem getMemory() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcCpu getCpu() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcFd getFileDescriptor() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcCred getCredentials() throws SystemInfoException
SystemInfoException
public org.hyperic.sigar.ProcCredName getCredentialsName() throws SystemInfoException
SystemInfoException
public boolean isRunning() throws SystemInfoException
SystemInfoException
public AggregateProcessInfo getAggregateProcessTree()
public int hashCode()
getPid()
itself.
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
ProcessInfo
objects are equal if their pids
are the same.
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |