Node.js wrapper for the nvidia-smi
(NVIDIA System Management Interface) command line utility. This package provides a simple way to monitor and query NVIDIA GPU information.
- NVIDIA drivers must be installed
nvidia-smi
command line tool must be available in your system PATH
npm install @quik-fe/node-nvidia-smi
import { NvidiaSMI } from "@quik-fe/node-nvidia-smi";
// Check if nvidia-smi exists
const exists = await NvidiaSMI.exist();
// Get GPU information
const gpuInfo = await NvidiaSMI.Utils.getGPUInfo();
// Get memory usage
const memoryUsage = await NvidiaSMI.Utils.getMemoryUsage();
// Get driver version
const driverVersion = await NvidiaSMI.Utils.getDriverVersion();
NvidiaSMI.exist()
: Check if nvidia-smi is availableNvidiaSMI.get_details()
: Get raw XML data from nvidia-smi
getDriverVersion()
: Get NVIDIA driver versiongetCudaVersion()
: Get CUDA versiongetAttachedGPUs()
: Get number of attached GPUsgetGPUInfo(uuid?)
: Get GPU information for specific UUID or first GPUgetMemoryUsage(uuid?)
: Get memory usage statisticsgetTemperature(uuid?)
: Get GPU temperaturegetUtilization(uuid?)
: Get GPU utilizationgetECCErrors(uuid?)
: Get ECC error informationgetProcesses(uuid?)
: Get running process informationgetFanSpeed(uuid?)
: Get fan speedgetPowerReadings(uuid?)
: Get power consumption informationgetClocks(uuid?)
: Get clock speedsgetComputeMode(uuid?)
: Get compute modegetPerformanceState(uuid?)
: Get performance state
All utility functions are accessible via NvidiaSMI.Utils
namespace.
MIT
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.