mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added windows thermals
This commit is contained in:
parent
be81ba9518
commit
78f48a7692
3 changed files with 72 additions and 14 deletions
|
@ -1001,7 +1001,19 @@ function createMeshCore(agent) {
|
|||
var cpuuse = require('sysinfo').cpuUtilization();
|
||||
cpuuse.sessionid = data.sessionid;
|
||||
cpuuse.tag = data.tag;
|
||||
cpuuse.then(function (data) { mesh.SendCommand(JSON.stringify({ action: 'msg', type: 'cpuinfo', cpu: data, memory: require('sysinfo').memUtilization(), sessionid: this.sessionid, tag: this.tag })); }, function (ex) { });
|
||||
cpuuse.then(function (data)
|
||||
{
|
||||
mesh.SendCommand(JSON.stringify(
|
||||
{
|
||||
action: 'msg',
|
||||
type: 'cpuinfo',
|
||||
cpu: data,
|
||||
memory: require('sysinfo').memUtilization(),
|
||||
thermals: require('sysinfo').thermals==null?[]:require('sysinfo').thermals(),
|
||||
sessionid: this.sessionid,
|
||||
tag: this.tag
|
||||
}));
|
||||
}, function (ex) { });
|
||||
break;
|
||||
case 'localapp':
|
||||
// Send a message to a local application
|
||||
|
@ -3266,8 +3278,14 @@ function createMeshCore(agent) {
|
|||
// CPU & memory utilization
|
||||
pr = require('sysinfo').cpuUtilization();
|
||||
pr.sessionid = sessionid;
|
||||
pr.then(function (data) {
|
||||
sendConsoleText(JSON.stringify({ cpu: data, memory: require('sysinfo').memUtilization() }, null, 1), this.sessionid);
|
||||
pr.then(function (data)
|
||||
{
|
||||
sendConsoleText(JSON.stringify(
|
||||
{
|
||||
cpu: data,
|
||||
memory: require('sysinfo').memUtilization(),
|
||||
thermals: require('sysinfo').thermals == null ? [] : require('sysinfo').thermals()
|
||||
}, null, 1), this.sessionid);
|
||||
}, function (e) {
|
||||
sendConsoleText(e);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue