UNPKG

@ansospace/sysmon

Version:

A zero-dependency system monitoring CLI tool for listing system info, real-time monitoring, and cleanup tasks.

63 lines (39 loc) 2.12 kB
# Enhancement Plan for Hackathon-Winning System Monitoring CLI ## Overview Transform the current CLI (420 lines) into a comprehensive system utilities suite by adding advanced features while staying under 500 executable lines and zero external dependencies. ## Steps to Complete ### 1. Add Process Monitoring Class - [ ] Create ProcessMonitor class to list top 10 processes by CPU/memory usage. - [ ] Use cross-platform commands (tasklist on Windows, ps on Unix) via execSync. - [ ] Parse output to extract PID, name, CPU%, memory usage. ### 2. Integrate Network Stats into Monitor - [ ] Add getNetworkInfo() method to SystemMonitor class. - [ ] Display IP addresses, MAC addresses, network interfaces in displaySnapshot(). - [ ] Handle both IPv4 and IPv6. ### 3. Add Exportable Reports - [ ] Add --export flag to monitor command. - [ ] Save snapshots to JSON/CSV files in a reports/ directory. - [ ] Include timestamp in filenames. ### 4. Implement Alerts System - [ ] Add threshold checks in displaySnapshot() for CPU > 80%, memory > 90%. - [ ] Display warning messages with red color when thresholds exceeded. ### 5. Add New Commands - [ ] 'info': Static system overview (hardware details, OS info, installed RAM, etc.). - [ ] 'benchmark': Simple CPU/memory stress test with performance scores. ### 6. Historical Data Tracking - [ ] Store last 10 snapshots in SystemMonitor.history. - [ ] Add trend display option (e.g., --trends flag). ### 7. Enhanced UI with Keyboard Shortcuts - [ ] During monitoring, listen for keypresses (e.g., 'p' for processes, 'n' for network details). - [ ] Use readline for non-blocking input. ### 8. Update Help and CLI Interface - [ ] Update showHelp() with new commands and options. - [ ] Add argument parsing for new flags. ### 9. Testing and Line Count - [ ] Test all new features on Windows/Linux. - [ ] Run scripts/count-lines.js to ensure under 500 lines. - [ ] Fix any bugs or cross-platform issues. ### 10. Final Polish - [ ] Add ASCII art or better branding. - [ ] Ensure error handling for all new features. - [ ] Update package.json description if needed.