mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 08:43:09 +02:00
Update some logs
This commit is contained in:
parent
f1047f1ce5
commit
893795a31d
1 changed files with 3 additions and 5 deletions
|
@ -1,15 +1,13 @@
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import * as sysUtils from 'systeminformation';
|
import * as sysUtils from 'systeminformation';
|
||||||
import Logger from "./logger";
|
import Logger from './logger';
|
||||||
|
|
||||||
export async function showMachineInfo(parentLogger: Logger) {
|
export async function showMachineInfo(parentLogger: Logger) {
|
||||||
const logger = parentLogger.createSubLogger('machine');
|
const logger = parentLogger.createSubLogger('machine');
|
||||||
logger.debug(`Hostname: ${os.hostname()}`);
|
logger.debug(`Hostname: ${os.hostname()}`);
|
||||||
logger.debug(`Platform: ${process.platform}`);
|
logger.debug(`Platform: ${process.platform} Arch: ${process.arch}`);
|
||||||
logger.debug(`Architecture: ${process.arch}`);
|
|
||||||
logger.debug(`CPU: ${os.cpus().length} core`);
|
|
||||||
const mem = await sysUtils.mem();
|
const mem = await sysUtils.mem();
|
||||||
const totalmem = (mem.total / 1024 / 1024 / 1024).toFixed(1);
|
const totalmem = (mem.total / 1024 / 1024 / 1024).toFixed(1);
|
||||||
const availmem = (mem.available / 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)`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue