https://github.com/aaalgieee/switop
🚀 Real-time System Monitor for Apple Silicon Macs
https://github.com/aaalgieee/switop
cli macos swift
Last synced: about 1 year ago
JSON representation
🚀 Real-time System Monitor for Apple Silicon Macs
- Host: GitHub
- URL: https://github.com/aaalgieee/switop
- Owner: aaalgieee
- License: mit
- Created: 2024-12-14T17:15:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-15T05:31:28.000Z (over 1 year ago)
- Last Synced: 2025-02-14T09:40:13.525Z (over 1 year ago)
- Topics: cli, macos, swift
- Language: Swift
- Homepage:
- Size: 11.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SWITOP - System Performance Monitor
📊 Monitor your Mac's performance with detailed insights into CPU, GPU, memory, and power metrics. Built with Swift, optimized for Apple Silicon.
SWITOP is a powerful command-line interface (CLI) application designed to provide real-time system performance monitoring for Apple Silicon Macs. It offers detailed insights into CPU, GPU, memory usage, and power consumption metrics.
## Features
- **CPU Monitoring**
- E-Core and P-Core usage percentages and frequencies
- Real-time performance metrics for both efficiency and performance cores
- **GPU Monitoring**
- GPU usage percentage and frequency
- Real-time GPU performance metrics
- **Memory Statistics**
- Physical memory usage
- Swap memory utilization
- Detailed memory breakdown
- **Power Consumption Metrics**
- CPU power usage in watts
- GPU power consumption
- ANE (Apple Neural Engine) power usage
- Combined power consumption
## Requirements
- macOS running on Apple Silicon (M1 or later)
- Root/Administrator privileges (for accessing system metrics)
- Xcode 14.0+ (for building from source)
## Installation
### Building from Source
1. Clone the repository:
```bash
git clone https://github.com/yourusername/switop.git
cd switop
```
2. Build the project:
```bash
swift build -c release
```
3. The binary will be available in `.build/release/switop`
## Usage
Simply run the application from the terminal:
```bash
sudo ./switop
```
Note: Root privileges are required to access system performance metrics.
### Interface
The application displays:
- System information including CPU model and core configuration
- Real-time CPU metrics for both E-cores and P-cores
- GPU usage and frequency
- Memory usage statistics
- Detailed power consumption metrics
Use `Ctrl+C` to exit the application.
## Technical Details
SWITOP utilizes various system APIs and commands:
- `powermetrics` for CPU and GPU metrics
- `vm_stat` for memory statistics
- `sysctl` for system information
- System profiler for GPU information
## 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.
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Support
If you encounter any issues or have questions, please file an issue on the GitHub repository.
## Others
I did this pure out of boredom...
Was inspired of "asitop" and wanted to recreate it using Swift. Yes, thats it... 🤷🏻♂️
If anything breaks in your machine, aint my fault :)