# The os Module — Node.js

Source: https://www.geekswithgeeks.com/en/nodejs/node-os

> Query the machine Node is running on.

## System info

Useful for logging, diagnostics, or scaling decisions (e.g. worker count).

```javascript
import os from "node:os";

console.log(os.platform());     // 'linux'
console.log(os.cpus().length);  // number of cores
console.log(os.totalmem());     // bytes
console.log(os.homedir());
```
