Add Process/enig start ingress/egress bytes stats

This commit is contained in:
Bryan Ashby
2022-08-01 23:09:18 -06:00
parent 044cc24418
commit 715202680e
10 changed files with 51 additions and 0 deletions

View File

@@ -122,6 +122,15 @@ function addNewClient(client, clientSock) {
moment().valueOf(),
]);
// kludge to refresh process update stats at first client
if (clientConnections.length < 1) {
setTimeout(() => {
const StatLog = require('./stat_log');
const SysProps = require('./system_property');
StatLog.getSystemStat(SysProps.ProcessTrafficStats);
}, 3000); // slight pause to wait for updates
}
clientConnections.push(client);
clientConnections.sort((c1, c2) => c1.session.id - c2.session.id);