节点JS,读取CPU温度 [英] Node JS, Read CPU temperature

查看:108
本文介绍了节点JS,读取CPU温度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在一个项目中,我想读取CPU的温度,但是不使用外部程序(例如"CpuTemp"等),我不知道如何正确地进行操作.根据一些消息来源,我应该能够将Node JS与一个软件包一起使用来读取CPU温度.我通过"OS"软件包读取了PC上的总内存和正常运行时间.我可以使用任何软件包来显示CPU温度吗?还是应该做些其他的事情来读取它?

I am currently working on a project where I want to read the temperature of my CPU but I do not know how to it properly without using external programs such as "CpuTemp" etcetera. According to some sources I should be able to use Node JS together with a package to read the CPU temperature. I managed to read total memory on my PC and uptime via the package "OS". Are there any package I can use to display the CPU temperature or should I do something else to read it?

有人告诉我我应该将Node JS与WMI一起使用,但是我不知道如何继续.

I have been told I should use Node JS together with WMI, I dont know how to continue on that though.

推荐答案

在这里,您有一个用于CPU温度的NPM软件包以及其他统计信息: https://www.npmjs.com/package/systeminformation
该程序包有据可查,可以准确地告诉您该怎么做.否则,仅搜索Google可能遇到的错误代码或其他问题就很容易.

Here you have a NPM package for CPU temp as well as other statistics: https://www.npmjs.com/package/systeminformation
The package is well documented, and will tell you exactly what to do. Otherwhise, it's easy just to google the error codes or other problems that you might encounter.

这篇关于节点JS,读取CPU温度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆