|
|
|
@ -79,6 +79,12 @@ async function getNodeInfo() {
|
|
|
|
|
release: os.release(),
|
|
|
|
|
load: os.loadavg().map(function (load) { return load.toFixed(2); }).join(', '),
|
|
|
|
|
},
|
|
|
|
|
nodebb: {
|
|
|
|
|
isCluster: nconf.get('isCluster'),
|
|
|
|
|
isPrimary: nconf.get('isPrimary'),
|
|
|
|
|
runJobs: nconf.get('runJobs'),
|
|
|
|
|
jobsDisabled: nconf.get('jobsDisabled'),
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
data.process.cpuUsage.user /= 1000000;
|
|
|
|
|
data.process.cpuUsage.user = data.process.cpuUsage.user.toFixed(2);
|
|
|
|
@ -109,5 +115,5 @@ async function getGitInfo() {
|
|
|
|
|
getAsync('git rev-parse HEAD'),
|
|
|
|
|
getAsync('git rev-parse --abbrev-ref HEAD'),
|
|
|
|
|
]);
|
|
|
|
|
return { hash: hash, branch: branch };
|
|
|
|
|
return { hash: hash, hashShort: hash.substr(0, 6), branch: branch };
|
|
|
|
|
}
|
|
|
|
|