Package-level declarations

Types

Link copied to clipboard
sealed external interface CpuInfo
Link copied to clipboard
sealed external interface CpuInfoTimes
Link copied to clipboard
sealed external interface EndiannessResult
Link copied to clipboard
sealed external interface NetworkInterfaceBase
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed external interface SignalConstants
Link copied to clipboard
sealed external interface UserInfo<T>
Link copied to clipboard
sealed external interface UserInfoBufferOptions
Link copied to clipboard
sealed external interface UserInfoStringOptions

Properties

Link copied to clipboard
external val devNull: String
Link copied to clipboard
external val EOL: String

The operating system-specific end-of-line marker.

Functions

Link copied to clipboard
external fun arch(): String

Returns the operating system CPU architecture for which the Node.js binary was compiled. Possible values are 'arm', 'arm64', 'ia32', 'loong64', 'mips', 'mipsel', 'ppc', 'ppc64', 'riscv64', 's390', 's390x', and 'x64'.

Link copied to clipboard

Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.

Link copied to clipboard
external fun cpus(): ReadonlyArray<CpuInfo>

Returns an array of objects containing information about each logical CPU core. The array will be empty if no CPU information is available, such as if the /proc file system is unavailable.

Link copied to clipboard

Returns a string identifying the endianness of the CPU for which the Node.js binary was compiled.

Link copied to clipboard
external fun freemem(): Double

Returns the amount of free system memory in bytes as an integer.

Link copied to clipboard
external fun getPriority(pid: Number = definedExternally): Double

Returns the scheduling priority for the process specified by pid. If pid is not provided or is 0, the priority of the current process is returned.

Link copied to clipboard
external fun homedir(): String

Returns the string path of the current user's home directory.

Link copied to clipboard
external fun hostname(): String

Returns the host name of the operating system as a string.

Link copied to clipboard
external fun loadavg(): ReadonlyArray<Double>

Returns an array containing the 1, 5, and 15 minute load averages.

Link copied to clipboard
external fun machine(): String

Returns the machine type as a string, such as arm, arm64, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.

Link copied to clipboard

Returns an object containing network interfaces that have been assigned a network address.

Link copied to clipboard
external fun platform(): Platform

Returns a string identifying the operating system platform for which the Node.js binary was compiled. The value is set at compile time. Possible values are 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32'.

Link copied to clipboard
external fun release(): String

Returns the operating system as a string.

Link copied to clipboard
external fun setPriority(priority: Number)

Attempts to set the scheduling priority for the process specified by pid. If pid is not provided or is 0, the process ID of the current process is used.

external fun setPriority(pid: Number, priority: Number)
Link copied to clipboard
external fun tmpdir(): String

Returns the operating system's default directory for temporary files as a string.

Link copied to clipboard
external fun totalmem(): Double

Returns the total amount of system memory in bytes as an integer.

Link copied to clipboard
external fun type(): String

Returns the operating system name as returned by uname(3). For example, it returns 'Linux' on Linux, 'Darwin' on macOS, and 'Windows_NT' on Windows.

Link copied to clipboard
external fun uptime(): Double

Returns the system uptime in number of seconds.

Link copied to clipboard

Returns information about the currently effective user. On POSIX platforms, this is typically a subset of the password file. The returned object includes the username, uid, gid, shell, and homedir. On Windows, the uid and gid fields are -1, and shell is null.

external fun userInfo(options: UserInfoStringOptions = definedExternally): UserInfo<String>
Link copied to clipboard
external fun version(): String

Returns a string identifying the kernel version.