mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-24 04:59:06 +01:00
94228778c9
* wip * wip * fix * clean up * Update tsconfig.json * Update activitypub.ts * wip
14 lines
612 B
TypeScript
14 lines
612 B
TypeScript
import * as os from 'node:os';
|
|
import sysUtils from 'systeminformation';
|
|
import Logger from '@/services/logger.js';
|
|
|
|
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)`);
|
|
}
|