summaryrefslogtreecommitdiff
path: root/src/misc/machineInfo.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/machineInfo.ts')
-rw-r--r--src/misc/machineInfo.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/misc/machineInfo.ts b/src/misc/machineInfo.ts
index 6049bcfc9c..7d8a52ff9a 100644
--- a/src/misc/machineInfo.ts
+++ b/src/misc/machineInfo.ts
@@ -1,15 +1,17 @@
import * as os from 'os';
import Logger from './logger';
+import * as sysUtils from 'systeminformation';
export default class {
- public static show(): void {
- const totalmem = (os.totalmem() / 1024 / 1024 / 1024).toFixed(1);
- const freemem = (os.freemem() / 1024 / 1024 / 1024).toFixed(1);
+ public static async show() {
const logger = new Logger('Machine');
logger.info(`Hostname: ${os.hostname()}`);
logger.info(`Platform: ${process.platform}`);
logger.info(`Architecture: ${process.arch}`);
logger.info(`CPU: ${os.cpus().length} core`);
- logger.info(`MEM: ${totalmem}GB (available: ${freemem}GB)`);
+ const mem = await sysUtils.mem();
+ const totalmem = (mem.total / 1024 / 1024 / 1024).toFixed(1);
+ const availmem = (mem.available / 1024 / 1024 / 1024).toFixed(1);
+ logger.info(`MEM: ${totalmem}GB (available: ${availmem}GB)`);
}
}