node-system-stats

node-system-stats / Exports

node-system-stats

Table of contents

Modules

Interfaces

Variables

Functions

Variables

PID

Const PID: number = process.pid

Defined in

src/node-system-stats.ts:75


cpuModel

Const cpuModel: string

Defined in

src/node-system-stats.ts:55


name

Const name: string = packageJsonFile.name

Defined in

src/node-system-stats.ts:65


platform

Const platform: Platform = process.platform

Defined in

src/node-system-stats.ts:70


totalCores

Const totalCores: number

Defined in

src/node-system-stats.ts:50


version

Const version: string = packageJsonFile.version

Defined in

src/node-system-stats.ts:60

Functions

avgClockMHz

avgClockMHz(): number

This function shows the average Clock Frequency from all of the cores.

Returns

number

returns a number with the average Clock MHz over all cores

Defined in

src/node-system-stats.ts:109


clockMHz

clockMHz(coreIndex?): number | number[]

This function returns the speed of all cores or only just the selected core.

Parameters

Name Type Description
coreIndex? number The index of the core. It begins with 0. If not specified, it will return an array with all of the cores

Returns

number | number[]

A number of the speed of the core OR a array with all of the cores speeds.

Defined in

src/node-system-stats.ts:82


showFreeMemory

showFreeMemory(convertedGB?): number

This function is used to display the free memory that the system has. It can output in Gigabyte and Megabyte.

Parameters

Name Type Default value Description
convertedGB boolean false If the returned value should be in Gigabytes or in MB. If set to true, then it will output the Gigabyte value.

Returns

number

The converted free Memory that is available.

Default

{false} Megabyte format.

Defined in

src/node-system-stats.ts:166


showMemoryUsage

showMemoryUsage(): MemoryUsageReturn

Shows the formmated Memory Usage information

Returns

MemoryUsageReturn

An object with every converted memory usage type in redable form.

Defined in

src/node-system-stats.ts:125


showTotalMemory

showTotalMemory(convertedGB?): number

This function is used to display the total memory that the system has. It can output in Gigabyte and Megabyte.

Parameters

Name Type Default value Description
convertedGB boolean false If the returned value should be in Gigabytes or in MB. If set to true, then it will output the Gigabyte value.

Returns

number

The converted total Memory that is available.

Default

{false} Megabyte format.

Defined in

src/node-system-stats.ts:150


usagePercent

usagePercent(optsInput?): Promise<ICallback>

This function measures the CPU usage

Parameters

Name Type Description
optsInput? IOptsInput The options input

Returns

Promise<ICallback>

returns a resolvable promise

Defined in

src/node-system-stats.ts:18