Class FreeBsdOSThread
java.lang.Object
oshi.software.common.AbstractOSThread
oshi.software.common.os.unix.bsd.BsdOSThread
oshi.software.common.os.unix.freebsd.FreeBsdOSThread
- All Implemented Interfaces:
OSThread
OSThread implementation
-
Nested Class Summary
Nested classes/interfaces inherited from interface OSThread
OSThread.ThreadFilteringModifier and TypeInterfaceDescriptionstatic final classConstants which may be used to filter Thread lists -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final List<BsdPsThreadKeyword> Orderedpsthread columns.Fields inherited from class BsdOSThread
contextSwitches, kernelTime, majorFaults, minorFaults, name, priority, startMemoryAddress, startTime, state, threadId, upTime, userTimeModifier and TypeFieldDescriptionprotected longprotected longprotected longprotected longprotected Stringprotected intprotected longprotected longprotected OSProcess.Stateprotected intprotected longprotected long -
Constructor Summary
ConstructorsConstructorDescriptionFreeBsdOSThread(int processId, int threadId) FreeBsdOSThread(int processId, Map<BsdPsThreadKeyword, String> threadMap) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns thepscommand (without the trailing-p <pid>) used to enumerate this process's threads when refreshing a single thread.protected List<BsdPsThreadKeyword> Returns this platform's orderedpsthread column keys, used to parse thread rows positionally.Methods inherited from class BsdOSThread
getContextSwitches, getKernelTime, getMajorFaults, getMinorFaults, getName, getPriority, getStartMemoryAddress, getStartTime, getState, getThreadId, getUpTime, getUserTime, updateAttributes, updateAttributesModifier and TypeMethodDescriptionlongA snapshot of the context switches the thread has done.longKernel (privileged) time used by the thread.longThe number of major (hard) faults the thread has made which have required loading a memory page from disk.longThe number of minor (soft) faults the thread has made which have not required loading a memory page from disk.getName()The name of the thread.intPriority of the thread, the meaning of which is dependent on the OS.longThe memory address above which this thread can run.longThe start time of the thread.getState()Gets the execution state of the task/thread.intThe thread id.longElapsed/up-time of the thread.longUser time used by the thread.booleanAttempts to updates process attributes.protected booleanupdateAttributes(Map<BsdPsThreadKeyword, String> threadMap) Populates this thread's attributes from a parsedpsthread row.Methods inherited from class AbstractOSThread
getOwningProcessId, getThreadCpuLoadBetweenTicks, getThreadCpuLoadCumulative, toStringModifier and TypeMethodDescriptionintThe owning process of this thread.doublegetThreadCpuLoadBetweenTicks(OSThread priorSnapshot) Gets CPU usage of this thread since a previous snapshot of the same thread, provided as a parameter.doubleGets cumulative CPU usage of this thread.toString()
-
Field Details
-
PS_THREAD_KEYWORDS
Orderedpsthread columns. Shared with FreeBsdOSProcess's thread enumeration so the column list and parsing stay in lockstep.PRImust remain last (the row-complete sentinel). -
PS_THREAD_COLUMNS
-
-
Constructor Details
-
FreeBsdOSThread
-
FreeBsdOSThread
public FreeBsdOSThread(int processId, int threadId)
-
-
Method Details
-
psThreadKeywords
Description copied from class:BsdOSThreadReturns this platform's orderedpsthread column keys, used to parse thread rows positionally.- Specified by:
psThreadKeywordsin classBsdOSThread- Returns:
- the ordered thread column keys
-
psThreadCommand
Description copied from class:BsdOSThreadReturns thepscommand (without the trailing-p <pid>) used to enumerate this process's threads when refreshing a single thread.- Specified by:
psThreadCommandin classBsdOSThread- Returns:
- the
pscommand prefix
-