parent
037837b551
commit
0e4a111f81
1714 changed files with 20803 additions and 11751 deletions
13
packages/backend/src/misc/show-machine-info.ts
Normal file
13
packages/backend/src/misc/show-machine-info.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import * as os from 'os';
|
||||
import * as sysUtils from 'systeminformation';
|
||||
import Logger from '@/services/logger';
|
||||
|
||||
export async function showMachineInfo(parentLogger: Logger) {
|
||||
const logger = parentLogger.createSubLogger('machine');
|
||||
logger.debug(`Hostname: ${os.hostname()}`);
|
||||
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(`CPU: ${os.cpus().length} core MEM: ${totalmem}GB (available: ${availmem}GB)`);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue