UNPKG

lup-system

Version:

NodeJS library to retrieve system information and utilization.

62 lines (61 loc) 1.87 kB
export type MemoryUtilization = { /** Memory used in bytes. */ used: number; /** Memory free in bytes. */ free: number; /** Utilization of available memory in percentage (0.0-1.0). */ percentage: number; }; export type MemoryDevice = { /** Name of the manufacturer. */ manufacturer?: string; /** Name of the memory module. */ model?: string; /** Memory size in bytes. */ size?: number; /** Memory type (e.g., DDR4, LPDDR4X). */ type?: string; /** Name assigned to slot by the firmware. */ locator?: string; /** Name of the slot based on motherboard layout (bank locator). */ bankName?: string; /** Configured clock speed in MHz. */ clockSpeed?: number; /** Maximum possible clock speed in MHz. */ maxClockSpeed?: number; /** Memory bus width in bits. */ busWidth?: number; /** * Amount of data transfers can be performed in one clock cycle. * A data transfer is a single read or write operation of size equal to the bus width. */ transfersPerClockCycle?: number; /** Memory voltage in volts. */ voltage?: number; /** Memory speed in bytes per second. */ bandwidth?: number; }; export type Memory = { /** Memory size in bytes. */ size: number; /** Physical memory banks. */ devices?: MemoryDevice[]; /** Number of memory channels. */ channels?: number; /** Total memory bandwidth in bytes per second. */ bandwidth?: number; /** Memory utilization data. */ utilization: MemoryUtilization; }; /** * Returns information about the memory (RAM). * * @returns Memory information. */ export declare function getMemoryInfo(): Promise<Memory>; /** * Returns memory utilization data. * * @returns Memory utilization data. */ export declare function getMemoryUtilization(): Promise<MemoryUtilization>;