Skip to content

API reference / @jsprismarine/prismarine / stats/StatsPlatform

stats/StatsPlatform ​

Interfaces ​

StatsPlatform ​

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:7

The host the server runs on, as node:os describes it, the same for every provider. A provider that needs another form maps these fields itself.

Properties ​

arch ​

readonly arch: string

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:15

The CPU architecture, from os.arch(), such as x64.

coreCount ​

readonly coreCount: number

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:17

The CPUs the process may use, from os.availableParallelism().

memoryGb ​

readonly memoryGb: number

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:19

The host's memory from os.totalmem(), rounded to whole gigabytes (1024³ bytes).

release ​

readonly release: string

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:11

The kernel release, from os.release(), such as 6.1.0 or 23.5.0.

type ​

readonly type: string

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:9

The operating system name, from os.type(), such as Linux, Darwin or Windows_NT.

version ​

readonly version: string

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:13

The kernel or product version, from os.version(), such as Windows 11 Pro.

Functions ​

readPlatform() ​

readPlatform(): StatsPlatform

Defined in: packages/prismarine/src/stats/StatsPlatform.ts:28

Reads the host description from node:os.

Returns ​

StatsPlatform

The current platform fields.