Skip to content

Instantly share code, notes, and snippets.

@ginpei
Last active February 4, 2024 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ginpei/f6bdf53d54d892933ff976ab32155808 to your computer and use it in GitHub Desktop.
Save ginpei/f6bdf53d54d892933ff976ab32155808 to your computer and use it in GitHub Desktop.
Get CPU temperature for Windows by Node.js
Math.round((require('child_process').execSync('wmic /namespace:\\\\root\\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature').toString().split('\r\n')[1].trim()) / 10 - 273)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment