Finding GPU information (models) in Node.js

In Node.js, we can easily use the os module ( documentation ) to get processor information:

  os.cpus()[0].model; // β†’ Example: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz' 

I am looking for a similar way to get the GPU model and, if possible, specifications.

Thanks for the help!

+1
source share
1 answer

You can write a module toggle os.platform (), and then run a command for each os to capture GPU information as follows:

 // Mac OS: system_profiler | grep GeForce // Windows: wmic path win32_VideoController get name // Linux: sudo lshw -C display 
+7
source

Source: https://habr.com/ru/post/1273815/


All Articles