Class DragonFlyBsdOSProcess
java.lang.Object
oshi.software.common.AbstractOSProcess
oshi.software.common.os.unix.bsd.BsdOSProcess
oshi.software.common.os.unix.dragonflybsd.DragonFlyBsdOSProcess
- All Implemented Interfaces:
OSProcess
-
Nested Class Summary
Nested classes/interfaces inherited from interface OSProcess
OSProcess.StateModifier and TypeInterfaceDescriptionstatic enumProcess and Thread Execution States -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final List<BsdPsKeyword> Orderedpscolumns queried for each process.Fields inherited from class BsdOSProcess
commandLineBackup, group, groupID, involuntaryContextSwitches, majorFaults, minorFaults, residentSetSize, user, userID, voluntaryContextSwitchesFields inherited from class AbstractOSProcess
bytesRead, bytesWritten, kernelTime, name, parentProcessID, path, priority, startTime, state, threadCount, upTime, userTime, virtualSizeModifier and TypeFieldDescriptionprotected longprotected longprotected longprotected Stringprotected intprotected Stringprotected intprotected longprotected OSProcess.Stateprotected intprotected longprotected longprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the threads of the process and their details.protected StringReturns the comma-separatedps -ocolumn list for this platform, derived fromBsdOSProcess.psKeywords().protected List<BsdPsKeyword> Returns this platform's orderedpscolumn keys, used both to build thepscommand and to parse its output positionally.protected longReturns this process's start time in epoch milliseconds, or-1to derive it from thepselapsed-time column.Methods inherited from class BsdOSProcess
getAffinityMask, getArguments, getBitness, getCommandLine, getEnvironmentVariables, getGroup, getGroupID, getInvoluntaryContextSwitches, getMajorFaults, getMinorFaults, getProcessOpenFileLimit, getResidentMemory, getStateFromOutput, getUser, getUserID, getVoluntaryContextSwitches, queryArguments, queryBitness, queryEnvironmentVariables, updateAttributes, updateAttributes, updateThreadCountModifier and TypeMethodDescriptionlongGets the process affinity mask for this process.Makes a best effort attempt to get a list of the the command-line arguments of the process.intAttempts to get the bitness (32 or 64) of the process.Gets the process command line used to start the process, including arguments if available to be determined.Makes a best effort attempt to obtain the environment variables of the process.getGroup()Gets the group under which the process is executing.Gets the group id under which the process is executing.longThe number of involuntary context switches the process has made.longGets the number of major (hard) faults the process has made which have required loading a memory page from disk.longGets the number of minor (soft) faults the process has made which have not required loading a memory page from disk.protected static longgetProcessOpenFileLimit(long processId, int index) Parses the soft or hard open-file limit for another process from/proc/<pid>/limits.longReturns the total amount of physical memory (RAM) currently mapped to the process's address space.protected static OSProcess.StategetStateFromOutput(char stateValue) Maps apssingle-character state to anOSProcess.State.getUser()Gets the user name of the process owner.Gets the user id of the process owner.longThe number of voluntary context switches the process has made.Queries this process's argument list.protected abstract intQueries this process's bitness (32 or 64), or0if unknown.Queries this process's environment variables.booleanAttempts to update process attributes.protected booleanupdateAttributes(Map<BsdPsKeyword, String> psMap) Populates this process's attributes from a parsedpsrow.protected voidMethods inherited from class AbstractOSProcess
getBytesRead, getBytesWritten, getKernelTime, getName, getParentProcessID, getPath, getPriority, getProcessCpuLoadBetweenTicks, getProcessCpuLoadCumulative, getProcessID, getStartTime, getState, getThreadCount, getUpTime, getUserTime, getVirtualSize, toStringModifier and TypeMethodDescriptionlongGets the bytes read by the process.longGets the bytes written by the process.longGets kernel/system (privileged) time used by the process.getName()Gets the name of the process, often the executable program.intGets the process ID of this process's parent.getPath()Gets the full filesystem path of the executing process.intGets the priority of this process.doublegetProcessCpuLoadBetweenTicks(OSProcess priorSnapshot) Gets CPU usage of this process since a previous snapshot of the same process, provided as a parameter.doubleGets cumulative CPU usage of this process.intGets the process ID.longGets the process start time.getState()Gets the process state.intGets the number of threads being executed by this process.longGets up time / elapsed time since the process started.longGets user time used by the process.longGets the Virtual Memory Size (VSZ).toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface OSProcess
getContextSwitches, getCurrentWorkingDirectory, getHardOpenFileLimit, getOpenFiles, getPrivateResidentMemory, getSoftOpenFileLimitModifier and TypeMethodDescriptiondefault longA snapshot of the context switches the process has done, equal to the sum ofOSProcess.getVoluntaryContextSwitches()andOSProcess.getInvoluntaryContextSwitches()on platforms that provide the split.Makes a best effort attempt to obtain the current working directory for the process.longGets the hard limit for open file handles (or network connections) that belong to the given process.longGets the number of open file handles (or network connections) that belongs to the process.default longReturns an estimate of the portion of physical memory (RAM) uniquely attributed to this process.longGets the soft limit for open file handles (or network connections) of the given process.
-
Field Details
-
PS_KEYWORDS
Orderedpscolumns queried for each process. Shared by the DragonFlyBsdOSProcess subclasses (JNA/FFM) and the DragonFly OperatingSystem classes so the column list and parsing stay in lockstep.COMMANDmust remain last. -
PS_COMMAND_ARGS
-
-
Constructor Details
-
DragonFlyBsdOSProcess
protected DragonFlyBsdOSProcess(int pid)
-
-
Method Details
-
psKeywords
Description copied from class:BsdOSProcessReturns this platform's orderedpscolumn keys, used both to build thepscommand and to parse its output positionally.- Specified by:
psKeywordsin classBsdOSProcess- Returns:
- the ordered column keys
-
psCommandArgs
Description copied from class:BsdOSProcessReturns the comma-separatedps -ocolumn list for this platform, derived fromBsdOSProcess.psKeywords().- Specified by:
psCommandArgsin classBsdOSProcess- Returns:
- the
pscolumn argument
-
queryStartTimeMillis
protected long queryStartTimeMillis()Description copied from class:BsdOSProcessReturns this process's start time in epoch milliseconds, or-1to derive it from thepselapsed-time column. The default derives from elapsed time; platforms with an absolute source (DragonFly's/proc) override this.- Overrides:
queryStartTimeMillisin classBsdOSProcess- Returns:
- the start time in epoch milliseconds, or
-1to derive from elapsed time
-
getThreadDetails
-