OSProcessImpl

class OSProcessImpl(    val name: String,     val path: String,     val commandLine: String,     val arguments: List<String>,     val environmentVariables: Map<String, String>,     val currentWorkingDirectory: String,     val user: String,     val userId: String,     val group: String,     val groupId: String,     val state: State,     val processId: Int,     val parentProcessId: Int,     val threadCount: Int,     val priority: Int,     val virtualSize: Long,     val residentSetSize: Long,     val kernelTime: Long,     val userTime: Long,     val startTime: Long,     val bytesRead: Long,     val bytesWritten: Long,     val openFiles: Long,     val softOpenFileLimit: Long,     val hardOpenFileLimit: Long,     val processCpuLoadCumulative: Double,     val processCpuLoadBetweenTicks: Double,     val bitness: Int,     val affinityMask: Long,     val updateAttributes: Boolean,     val threadDetails: List<OSThread>,     val minorFaults: Long,     val majorFaults: Long,     val contextSwitches: Long) : OSProcess

OSProcessImpl The implementation of the OSProcess interface. This class provides details about a specific process in the operating system, including its name, ID, state, resource usage, and various performance metrics.

Author

N7ghtm4r3

Parameters

name

The name of the process (e.g., "java", "nginx").

path

The path to the executable of the process.

commandLine

The full command line that was used to start the process.

arguments

The arguments passed to the process when it was started.

environmentVariables

A map of environment variables used by the process.

currentWorkingDirectory

The current working directory of the process.

user

The user running the process.

userId

The ID of the user running the process.

group

The group associated with the process.

groupId

The ID of the group associated with the process.

state

The state of the process (e.g., running, sleeping).

processId

The unique identifier for the process.

parentProcessId

The process ID of the parent process.

threadCount

The number of threads in the process.

priority

The priority of the process.

virtualSize

The virtual memory size of the process, in bytes.

residentSetSize

The resident set size of the process, in bytes (physical memory used).

kernelTime

The amount of time the process has spent in kernel mode, in milliseconds.

userTime

The amount of time the process has spent in user mode, in milliseconds.

startTime

The time when the process started, in milliseconds since the Unix epoch.

bytesRead

The number of bytes read by the process.

bytesWritten

The number of bytes written by the process.

openFiles

The number of open files used by the process.

softOpenFileLimit

The soft limit on the number of files the process can open.

hardOpenFileLimit

The hard limit on the number of files the process can open.

processCpuLoadCumulative

The cumulative CPU load of the process as a percentage.

processCpuLoadBetweenTicks

The CPU load of the process between two ticks, as a percentage.

bitness

The bitness of the process (e.g., 32-bit, 64-bit).

affinityMask

The CPU affinity mask for the process.

updateAttributes

A flag indicating whether the process attributes should be updated.

threadDetails

The list of threads associated with the process.

minorFaults

The number of minor page faults for the process.

majorFaults

The number of major page faults for the process.

contextSwitches

The number of context switches for the process.

See also

Constructors

Link copied to clipboard
constructor(    name: String,     path: String,     commandLine: String,     arguments: List<String>,     environmentVariables: Map<String, String>,     currentWorkingDirectory: String,     user: String,     userId: String,     group: String,     groupId: String,     state: State,     processId: Int,     parentProcessId: Int,     threadCount: Int,     priority: Int,     virtualSize: Long,     residentSetSize: Long,     kernelTime: Long,     userTime: Long,     startTime: Long,     bytesRead: Long,     bytesWritten: Long,     openFiles: Long,     softOpenFileLimit: Long,     hardOpenFileLimit: Long,     processCpuLoadCumulative: Double,     processCpuLoadBetweenTicks: Double,     bitness: Int,     affinityMask: Long,     updateAttributes: Boolean,     threadDetails: List<OSThread>,     minorFaults: Long,     majorFaults: Long,     contextSwitches: Long)

Properties

Link copied to clipboard
open override val affinityMask: Long
Link copied to clipboard
open override val arguments: List<String>
Link copied to clipboard
open override val bitness: Int
Link copied to clipboard
open override val bytesRead: Long
Link copied to clipboard
open override val bytesWritten: Long
Link copied to clipboard
open override val commandLine: String
Link copied to clipboard
open override val contextSwitches: Long
Link copied to clipboard
open override val currentWorkingDirectory: String
Link copied to clipboard
open override val environmentVariables: Map<String, String>
Link copied to clipboard
open override val group: String
Link copied to clipboard
open override val groupId: String
Link copied to clipboard
open override val hardOpenFileLimit: Long
Link copied to clipboard
open override val kernelTime: Long
Link copied to clipboard
open override val majorFaults: Long
Link copied to clipboard
open override val minorFaults: Long
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val openFiles: Long
Link copied to clipboard
open override val parentProcessId: Int
Link copied to clipboard
open override val path: String
Link copied to clipboard
open override val priority: Int
Link copied to clipboard
Link copied to clipboard
open override val processCpuLoadCumulative: Double
Link copied to clipboard
open override val processId: Int
Link copied to clipboard
open override val residentSetSize: Long
Link copied to clipboard
open override val softOpenFileLimit: Long
Link copied to clipboard
open override val startTime: Long
Link copied to clipboard
open override val state: State
Link copied to clipboard
open override val threadCount: Int
Link copied to clipboard
open override val threadDetails: List<OSThread>
Link copied to clipboard
open override val updateAttributes: Boolean
Link copied to clipboard
open override val user: String
Link copied to clipboard
open override val userId: String
Link copied to clipboard
open override val userTime: Long
Link copied to clipboard
open override val virtualSize: Long