otak-monitor
A lightweight system monitor for VS Code - Track CPU, memory, and disk usage with efficient 5-second updates and 1-minute averages.
Usage

- Find the system monitor in your VS Code status bar
- View CPU usage percentage
- Hover to see detailed current and average metrics
Features
otak-monitor is a lightweight VS Code extension that helps you monitor system resources without leaving your editor.
Key Features
CPU Monitoring:
- Status bar display of CPU usage percentage
- Updates every 2.5 seconds (5 seconds when window is not focused)
- Aggregated across all CPU cores
- Precise to one decimal place
- Current CPU clock speed (MHz)
- 1-minute moving average
Memory Usage Tracking:
- Detailed memory information
- Shows used and total memory in MB
- Memory usage percentage
- 1-minute moving average
- Regular updates
Disk Usage Monitoring:
- Cross-platform disk space monitoring
- Windows: C: drive (home directory in Codespaces)
- macOS: Root volume (/)
- Linux: Root filesystem (workspace root in Codespaces)
- Shows used and total space in GB
- Disk usage percentage
- 1-minute moving average
Visual Integration:
- Clean status bar integration
- Right-aligned placement
- Non-intrusive display
- Interactive status bar item:
- Current CPU, memory, and disk metrics
- 1-minute average values
- Regular 2.5-second updates (5 seconds when window is not focused)
- Click to copy metrics in Markdown format
Clipboard Integration:
- Copy system metrics with a single click
- Well-formatted Markdown output
- Includes timestamps for reference
- Temporary notification with auto-dismiss
Requirements
- Visual Studio Code ^1.90.0
- Supported environments:
- Local: Windows, macOS, Linux
- Remote: GitHub Codespaces
Installation
- Install the extension from VS Code Marketplace
- Look for the CPU usage display in your status bar
- Hover over it to see detailed system information
- Click to copy current metrics in Markdown format
Status Bar Display
The extension shows the following information in your status bar:
CPU: 45.3% // CPU usage
Hover over the status bar to see detailed information:
Current:
---
CPU Usage: 45.3% (2400 MHz)
Memory Usage: 1024 MB / 2048 MB (50.0%)
Disk Usage: 150 GB / 500 GB (30.0%)
Click the status bar item to copy metrics in Markdown format:
# System Metrics (2024-02-24 14:00:00)
## Current Status
- **CPU Usage:** 45.3% @ 2400 MHz
- **Memory Usage:** 1024 MB / 2048 MB (50.0%)
- **Disk Usage (C:):** 150 GB / 500 GB (30.0%)
## 1-Minute Average
- **CPU:** 44.8%
- **Memory:** 49.5%
- **Disk:** 30.0%
Note: For disk usage, the monitored path varies by environment:
- Windows:
- Local: C: drive
- Codespaces: Home directory
- macOS: Root volume (/)
- Linux:
- Local: Root filesystem (/)
- Codespaces: Workspace root
Implementation Details
- CPU usage is calculated by comparing idle and total CPU time differences
- Memory values are shown in MB and percentage
- Disk usage monitoring adapts to the environment:
- Local machines: Monitors system root or C: drive
- Codespaces: Monitors relevant workspace paths
- Moving averages are calculated using 24 data points (2.5-second intervals over 1 minute)
- Updates occur every 2.5 seconds (5 seconds when window is not focused) for efficient monitoring
- Minimal performance impact on the system
GitHub Codespaces Support
The extension automatically detects when running in GitHub Codespaces and adjusts its behavior:
- Monitors the workspace root directory in Linux environments
- Uses home directory for Windows-based Codespaces
- Maintains consistent monitoring experience across all environments
- Provides accurate disk usage information for containerized development
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Check out our other VS Code extensions.
Real-time system monitoring in VS Code. Track CPU, memory, and disk usage through the status bar with comprehensive tooltips and 1-minute averages.
One-click proxy configuration for VS Code and Git. Perfect for environments where network settings change frequently.
Intelligent SCM operations with AI support. Features multilingual commit message generation (25 languages supported) and upcoming PR management capabilities.
Quick restart operations for Extension Host and VS Code window via status bar tooltip. Streamlines your development workflow.
Display date and time for two time zones from around the world in VS Code. Essential for working across different time zones.
Enhance your productivity with this Pomodoro Timer extension. Helps balance focused work sessions with refreshing breaks using the Pomodoro Technique.
Experience a distraction-free workflow with otak-zen. This extension transforms your VS Code interface into a minimalist environment by hiding non-essential UI elements, allowing you to focus solely on coding. Customize which components to show or hide, and toggle zen mode quickly via commands or the status bar.
License
This project is licensed under the MIT License - see the LICENSE file for details.
For more information, visit the GitHub repository.