1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

legacy swarm server connection forwarding and server fixes.

This commit is contained in:
Ylian Saint-Hilaire 2019-03-06 09:15:32 -08:00
parent b3de805e94
commit 68e7d6f6f7
6 changed files with 187 additions and 156 deletions

View file

@ -470,7 +470,26 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
switch (cmd) {
case 'help': {
r = 'Available commands: help, args, resetserver, showconfig, usersessions, tasklimiter, setmaxtasks, cores, migrationagents, swarmstats.';
r = 'Available commands: help, info, versions, args, resetserver, showconfig, usersessions, tasklimiter, setmaxtasks, cores, migrationagents, swarmstats, nodeconfig.';
break;
}
case 'info': {
var info = process.memoryUsage();
try { info.platform = process.platform; } catch (ex) { }
try { info.arch = process.arch; } catch (ex) { }
try { info.pid = process.pid; } catch (ex) { }
try { info.uptime = process.uptime(); } catch (ex) { }
try { info.version = process.version; } catch (ex) { }
try { info.cpuUsage = process.cpuUsage(); } catch (ex) { }
r = JSON.stringify(info, null, 4);
break;
}
case 'nodeconfig': {
r = JSON.stringify(process.config, null, 4);
break;
}
case 'versions': {
r = JSON.stringify(process.versions, null, 4);
break;
}
case 'args': {