Is it possible to use nodes os.cpus() module on react? Trying to figure out how to get real time cpu usage updates from node on a project on working on. I have played around with react before but i am still a newb and i haven't touched on node yet, so this is proving to be difficult for me.
是否可以使用节点os.cpus()模块进行反应?试图弄清楚如何从项目上的节点获取实时cpu使用更新。我之前已经玩过反应,但我仍然是一个新手,我还没有触及节点,所以这对我来说很难。
update: I need the cpu data to be displayed in the site i am making
更新:我需要在我正在制作的网站上显示cpu数据
1 个解决方案
#1
0
You can get the stats of the server system through an API call.
您可以通过API调用获取服务器系统的统计信息。
However, to get the stats of the client system is not possible as browsers are supposed to be run in sandbox mode to stop websites from reading the client system or changing it.
但是,要获取客户端系统的统计数据是不可能的,因为浏览器应该以沙盒模式运行,以阻止网站读取客户端系统或更改它。
#1
0
You can get the stats of the server system through an API call.
您可以通过API调用获取服务器系统的统计信息。
However, to get the stats of the client system is not possible as browsers are supposed to be run in sandbox mode to stop websites from reading the client system or changing it.
但是,要获取客户端系统的统计数据是不可能的,因为浏览器应该以沙盒模式运行,以阻止网站读取客户端系统或更改它。