Update some logs

This commit is contained in:
syuilo 2019-02-20 22:05:34 +09:00
parent f1047f1ce5
commit 893795a31d
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 3 additions and 5 deletions

View File

@ -1,15 +1,13 @@
import * as os from 'os';
import * as sysUtils from 'systeminformation';
import Logger from "./logger";
import Logger from './logger';
export async function showMachineInfo(parentLogger: Logger) {
const logger = parentLogger.createSubLogger('machine');
logger.debug(`Hostname: ${os.hostname()}`);
logger.debug(`Platform: ${process.platform}`);
logger.debug(`Architecture: ${process.arch}`);
logger.debug(`CPU: ${os.cpus().length} core`);
logger.debug(`Platform: ${process.platform} Arch: ${process.arch}`);
const mem = await sysUtils.mem();
const totalmem = (mem.total / 1024 / 1024 / 1024).toFixed(1);
const availmem = (mem.available / 1024 / 1024 / 1024).toFixed(1);
logger.debug(`MEM: ${totalmem}GB (available: ${availmem}GB)`);
logger.debug(`CPU: ${os.cpus().length} core MEM: ${totalmem}GB (available: ${availmem}GB)`);
}