mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 16:05:12 +00: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 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)`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue