| 2 | import { logger } from './logger.js'; |
| 3 | |
| 4 | export 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 | } |