MCPcopy
hub / github.com/msgbyte/tianji / logSystemInfo

Function logSystemInfo

src/server/utils/system.ts:4–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { logger } from './logger.js';
3
4export function logSystemInfo() {
5 const totalMemMB = Math.round(os.totalmem() / 1024 / 1024);
6 const freeMemMB = Math.round(os.freemem() / 1024 / 1024);
7 const cpus = os.cpus();
8
9 logger.info(
10 `[System] OS: ${os.type()} ${os.release()} (${os.arch()}) | Node: ${process.version}`
11 );
12 logger.info(
13 `[System] CPU: ${cpus[0]?.model ?? 'unknown'} x ${cpus.length} cores`
14 );
15 logger.info(
16 `[System] Memory: ${totalMemMB} MB total / ${freeMemMB} MB free`
17 );
18}

Callers 1

main.tsFile · 0.85

Calls 2

releaseMethod · 0.80
infoMethod · 0.65

Tested by

no test coverage detected