node-nvidia-smi
v1.0.0
Published
Node wrapper around nvidia-smi.
Downloads
259
Readme
node-nvidia-smi
A node wrapper around nvidia-smi
. It returns the output of nvidia-smi -q -x
formatted as JSON.
Installing
[sudo] npm install [-g] node-nvidia-smi
Usage
Dependency
const smi = require('node-nvidia-smi');
smi(function (err, data) {
// handle errors
if (err) {
console.warn(err);
process.exit(1);
}
// display GPU information
console.log(JSON.stringify(data, null, ' '));
});
CLI
If installed globally, a node-nvidia-smi
executable is installed on your
system PATH
.