mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Add Factorio CPU and Memory usage statistics
Add per instance metrics for CPU and memory usage with the pidusage library.
This commit is contained in:
1 parent
56ee1fe955
commit
6bc07ad1b3
4 files changed
+35
No files matched your search
@@ -590,6 +590,16 @@ class FactorioServer extends events.EventEmitter {
|
||||
return this._version;
|
||||
}
|
||||
|
||||
/**
|
||||
* The pid of the server process, or null if not running
|
||||
*/
|
||||
get pid() {
|
||||
if (!this._server) {
|
||||
return null;
|
||||
}
|
||||
return this._server.pid;
|
||||
}
|
||||
|
||||
_attachStdio() {
|
||||
this._server.stdout.on('data', chunk => { this._stdout.data(chunk); });
|
||||
this._server.stdout.on('close', () => { this._stdout.end(); });
|
||||
|
||||
Reference in new issue
Block a user