lup-system
Version:
NodeJS library to retrieve system information and utilization.
59 lines (58 loc) • 2.22 kB
TypeScript
export type GPUUtilization = {
clockSpeed: {
/** Current frequency of the graphics (shaders) clock in MHz. */
graphics?: number;
/** Current frequency of the memory clock in MHz. */
memory?: number;
/** Current frequency of the streaming multiprocessor clock in MHz. */
sm?: number;
/** Current frequency of the video encoder/decoder clock in MHz. */
video?: number;
};
/** GPU memory utilization as a percentage (0.0-1.0). */
memory?: number;
/** GPU memory temperature in Celsius. */
memoryTemperature?: number;
/** GPU processing utilization as a percentage (0.0-1.0). */
processing?: number;
/** GPU temperature in Celsius. */
temperature?: number;
/** Fan speed in percentage (0.0-1.0). */
fanSpeed?: number;
/** GPU power draw in watts. */
powerDraw?: number;
};
export type GPU = {
/** Maximum clock speed of the GPU. */
clockMaxSpeed?: {
/** Maximum frequency of the graphics (shaders) clock in MHz. */
graphics?: number;
/** Maximum frequency of the memory clock in MHz. */
memory?: number;
/** Maximum frequency of the streaming multiprocessor clock in MHz. */
sm?: number;
};
/** Unique ID of the GPU device. */
id: string;
/** Name of the GPU device. */
name: string;
/** Name of the processor built into the GPU. */
processor?: string;
/** Status of the GPU device. */
status: 'ok' | 'error' | 'unknown' | string;
/** Last update date of the GPU driver, if available. */
driverDate?: string;
/** Version of the GPU driver, if available. */
driverVersion?: string;
/** Memory size of the GPU in bytes. */
memory?: number;
/** Index of the GPU device. */
index?: number;
/** If a physical display/monitor is attached to one of the GPU's connector.s */
displayAttached?: boolean;
/** If memory is allocated inside the GPU for display purposes. Can be true even if no physical display is attached. */
displayActive?: boolean;
/** Utilization data of the GPU. */
utilization?: GPUUtilization;
};
export declare function getGPUs(): Promise<GPU[]>;