Package oshi.software.os.unix.aix
Class AixOSThread
- java.lang.Object
-
- oshi.software.common.AbstractOSThread
-
- oshi.software.os.unix.aix.AixOSThread
-
- All Implemented Interfaces:
OSThread
@ThreadSafe public class AixOSThread extends AbstractOSThread
OSThread implementation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface oshi.software.os.OSThread
OSThread.ThreadFiltering
-
-
Field Summary
Fields Modifier and Type Field Description private long
contextSwitches
private long
kernelTime
private int
priority
private long
startMemoryAddress
private long
startTime
private OSProcess.State
state
private int
threadId
private long
upTime
private long
userTime
-
Constructor Summary
Constructors Constructor Description AixOSThread(int pid, int tid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getContextSwitches()
A snapshot of the context switches the thread has done.long
getKernelTime()
Kernel (privileged) time used by the thread.int
getPriority()
Priority of the thread, the meaning of which is dependent on the OS.long
getStartMemoryAddress()
The memory address above which this thread can run.long
getStartTime()
The start time of the thread.OSProcess.State
getState()
Gets the execution state of the task/thread.int
getThreadId()
The thread id.long
getUpTime()
Elapsed/up-time of the thread.long
getUserTime()
User time used by the thread.boolean
updateAttributes()
Attempts to updates process attributes.-
Methods inherited from class oshi.software.common.AbstractOSThread
getOwningProcessId, getThreadCpuLoadBetweenTicks, getThreadCpuLoadCumulative, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface oshi.software.os.OSThread
getMajorFaults, getMinorFaults, getName
-
-
-
-
Field Detail
-
threadId
private int threadId
-
state
private OSProcess.State state
-
startMemoryAddress
private long startMemoryAddress
-
contextSwitches
private long contextSwitches
-
kernelTime
private long kernelTime
-
userTime
private long userTime
-
startTime
private long startTime
-
upTime
private long upTime
-
priority
private int priority
-
-
Method Detail
-
getThreadId
public int getThreadId()
Description copied from interface:OSThread
The thread id. The meaning of this value is OS-dependent.- Returns:
- Returns the id of the thread.
-
getState
public OSProcess.State getState()
Description copied from interface:OSThread
Gets the execution state of the task/thread.- Returns:
- Returns the execution state of the task/thread.
-
getStartMemoryAddress
public long getStartMemoryAddress()
Description copied from interface:OSThread
The memory address above which this thread can run.- Returns:
- The start address.
-
getContextSwitches
public long getContextSwitches()
Description copied from interface:OSThread
A snapshot of the context switches the thread has done. Since the context switches could be voluntary and non-voluntary, this gives the sum of both.Not available on AIX.
- Returns:
- sum of both voluntary and involuntary context switches.
-
getKernelTime
public long getKernelTime()
Description copied from interface:OSThread
Kernel (privileged) time used by the thread.- Returns:
- Returns the number of milliseconds the task/thread has executed in kernel/system mode.
-
getUserTime
public long getUserTime()
Description copied from interface:OSThread
User time used by the thread.- Returns:
- Returns the number of milliseconds the task/thread has executed in user mode.
-
getUpTime
public long getUpTime()
Description copied from interface:OSThread
Elapsed/up-time of the thread.- Returns:
- Returns the number of milliseconds since the task/thread started.
-
getStartTime
public long getStartTime()
Description copied from interface:OSThread
The start time of the thread.- Returns:
- Returns the start time of the task/thread in number of milliseconds since January 1, 1970.
-
getPriority
public int getPriority()
Description copied from interface:OSThread
Priority of the thread, the meaning of which is dependent on the OS.- Returns:
- priority.
-
updateAttributes
public boolean updateAttributes()
Description copied from interface:OSThread
Attempts to updates process attributes. Returns false if the update fails, which will occur if the process no longer exists. Not implemented for macOS, as thread ID is simply an index and not unique.- Returns:
true
if the update was successful, false if the update failed. In addition, on a failed update the thread state will be changed toOSProcess.State.INVALID
.
-
-