{"library":"os-utils","title":"OS Utils","description":"The `os-utils` package is a Node.js library offering fundamental operating system utility functions. It enables developers to retrieve basic system metrics such as CPU usage (calculated per second, not as an average), total and free memory, platform identification, and system/process uptime. The package's latest version, 0.0.14, was released on October 30, 2012, signifying that its development has ceased and it is no longer actively maintained. Its release cadence was effectively non-existent after this initial publication. Compared to contemporary system monitoring libraries like `node-os-utils` or `systeminformation`, `os-utils` provides a very limited, callback-based API, lacks modern features such as TypeScript support, sophisticated error handling, or intelligent caching mechanisms, making it unsuitable for modern Node.js applications or environments requiring robust system insights.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install os-utils"],"cli":null},"imports":["const os = require('os-utils');","const os = require('os-utils');\nos.cpuUsage(function(v) { /* ... */ });","const os = require('os-utils');\nos.freememPercentage();"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const os = require('os-utils');\n\n// Get CPU usage for the next second\nos.cpuUsage(function(v) {\n  console.log('CPU Usage (%): ' + v);\n});\n\n// Get free CPU for the next second\nos.cpuFree(function(v) {\n  console.log('CPU Free (%): ' + v);\n});\n\n// Get platform name\nconsole.log('Platform:', os.platform());\n\n// Get number of CPUs\nconsole.log('CPU Count:', os.cpuCount());\n\n// Get current free memory in MB\nconsole.log('Free Memory (MB):', os.freemem());\n\n// Get total memory in MB\nconsole.log('Total Memory (MB):', os.totalmem());\n\n// Get free memory percentage\nconsole.log('Free Memory Percentage (%):', os.freememPercentage());","lang":"javascript","description":"This quickstart demonstrates how to initialize `os-utils` and retrieve various system metrics such as CPU usage, memory information, and system details using its callback-based API.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}