> node -e "console.log(Math.round((require('child_process').execSync('wmic /namespace:\\\\root\\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature').toString().split('\r\n')[1].trim()) / 10 - 273)+ '℃')"
Last active
June 5, 2024 23:48
-
-
Save ginpei/f6bdf53d54d892933ff976ab32155808 to your computer and use it in GitHub Desktop.
Get CPU temperature for Windows by Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(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