yamon 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yamon-0.1.0/LICENSE +22 -0
- yamon-0.1.0/MANIFEST.in +5 -0
- yamon-0.1.0/PKG-INFO +129 -0
- yamon-0.1.0/README.md +96 -0
- yamon-0.1.0/frontend/dist/assets/index-BS0XLMl6.js +47 -0
- yamon-0.1.0/frontend/dist/assets/index-C2CEmOwf.css +1 -0
- yamon-0.1.0/frontend/dist/index.html +14 -0
- yamon-0.1.0/frontend/dist/vite.svg +1 -0
- yamon-0.1.0/pyproject.toml +59 -0
- yamon-0.1.0/setup.cfg +4 -0
- yamon-0.1.0/yamon/__init__.py +2 -0
- yamon-0.1.0/yamon/api/__init__.py +2 -0
- yamon-0.1.0/yamon/api/metrics.py +55 -0
- yamon-0.1.0/yamon/api/websocket.py +138 -0
- yamon-0.1.0/yamon/cli.py +47 -0
- yamon-0.1.0/yamon/collectors/__init__.py +2 -0
- yamon-0.1.0/yamon/collectors/apple_api.py +775 -0
- yamon-0.1.0/yamon/collectors/collector.py +141 -0
- yamon-0.1.0/yamon/collectors/ioreport.py +455 -0
- yamon-0.1.0/yamon/collectors/smc.py +197 -0
- yamon-0.1.0/yamon/history.py +113 -0
- yamon-0.1.0/yamon/main.py +82 -0
- yamon-0.1.0/yamon/static/assets/index-BS0XLMl6.js +47 -0
- yamon-0.1.0/yamon/static/assets/index-C2CEmOwf.css +1 -0
- yamon-0.1.0/yamon/static/index.html +14 -0
- yamon-0.1.0/yamon/static/vite.svg +1 -0
- yamon-0.1.0/yamon.egg-info/PKG-INFO +129 -0
- yamon-0.1.0/yamon.egg-info/SOURCES.txt +46 -0
- yamon-0.1.0/yamon.egg-info/dependency_links.txt +1 -0
- yamon-0.1.0/yamon.egg-info/entry_points.txt +2 -0
- yamon-0.1.0/yamon.egg-info/requires.txt +9 -0
- yamon-0.1.0/yamon.egg-info/top_level.txt +1 -0
yamon-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 grapeot
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
yamon-0.1.0/MANIFEST.in
ADDED
yamon-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yamon
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Visually pleasing, deep system monitoring for macOS
|
|
5
|
+
Author: grapeot
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: macos,monitoring,apple-silicon,system-monitor,performance
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: System Administrators
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: System :: Monitoring
|
|
20
|
+
Classifier: Topic :: System :: Hardware
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: psutil<6.0.0,>=5.9.0
|
|
25
|
+
Requires-Dist: fastapi<1.0.0,>=0.104.0
|
|
26
|
+
Requires-Dist: uvicorn[standard]<1.0.0,>=0.24.0
|
|
27
|
+
Requires-Dist: websockets<13.0.0,>=12.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
30
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# Yamon 🍊
|
|
35
|
+
|
|
36
|
+
**Beautiful, In-Depth System Monitoring for macOS.**
|
|
37
|
+
|
|
38
|
+
Yamon is a modern system monitor engineered specifically for Apple Silicon. It goes beyond standard CPU and RAM metrics to reveal the true heartbeat of your Mac — from Neural Engine activity to precise component-level power consumption — all displayed in an elegant, real-time web interface.
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
## ✨ Features
|
|
43
|
+
|
|
44
|
+
### 🚀 Deep Apple Silicon Integration
|
|
45
|
+
Unlock metrics that standard tools often hide:
|
|
46
|
+
- **Total System Power**: Accurate, real-time power readings (mW) derived directly from the SMC (System Management Controller).
|
|
47
|
+
- **Power Breakdown**: visualize exactly how much energy your CPU, GPU, and Neural Engine are consuming.
|
|
48
|
+
- **Neural Engine (ANE) Usage**: Track utilization of dedicated AI hardware.
|
|
49
|
+
- **GPU Frequency & Usage**: Gain granular insights into graphics performance and clock speeds.
|
|
50
|
+
|
|
51
|
+
### ⚡️ Real-Time & Responsive
|
|
52
|
+
- **Millisecond Latency**: Powered by WebSockets for an instant, lag-free monitoring experience.
|
|
53
|
+
- **Historical Context**: Interactive charts visualize the last 2 minutes of performance data.
|
|
54
|
+
- **Modern UI**: Built with React, TypeScript, and ECharts for a premium, responsive aesthetic on any device.
|
|
55
|
+
|
|
56
|
+
### 🛠️ Native Performance, Pure Python
|
|
57
|
+
- **Native APIs via ctypes**: Directly interfaces with macOS `IOReport` and `SMC` private frameworks.
|
|
58
|
+
- **No Heavy Dependencies**: Pure Python implementation without the need for compiling Rust or C/C++ binaries.
|
|
59
|
+
- **No Sudo Required**: Most metrics, including granular Power and GPU stats, function without root privileges.*
|
|
60
|
+
|
|
61
|
+
## 📦 Installation
|
|
62
|
+
|
|
63
|
+
### Install from PyPI (Recommended)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install yamon
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After installation, start the monitor:
|
|
70
|
+
```bash
|
|
71
|
+
yamon
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Visit **http://localhost:8000** to view your dashboard.
|
|
75
|
+
|
|
76
|
+
### Install from Source
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Clone the repository
|
|
80
|
+
git clone https://github.com/grapeot/yamon.git
|
|
81
|
+
cd yamon
|
|
82
|
+
|
|
83
|
+
# Install in development mode
|
|
84
|
+
pip install -e .
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 📸 Usage
|
|
88
|
+
|
|
89
|
+
### Production Mode (Single Server)
|
|
90
|
+
The most convenient way to run Yamon locally. The backend serves both the API and the compiled frontend.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# 1. Build Frontend
|
|
94
|
+
./build_frontend.sh
|
|
95
|
+
|
|
96
|
+
# 2. Run Backend
|
|
97
|
+
./run_backend.sh
|
|
98
|
+
```
|
|
99
|
+
Visit **http://localhost:8000** to access the dashboard.
|
|
100
|
+
|
|
101
|
+
### Development Mode (Separate Frontend & Backend)
|
|
102
|
+
For contributors who want to modify the frontend code.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# 1. Run Backend (Collects data)
|
|
106
|
+
./run_backend.sh
|
|
107
|
+
|
|
108
|
+
# 2. Run Frontend (Hot-reload dev server)
|
|
109
|
+
./run_frontend.sh
|
|
110
|
+
```
|
|
111
|
+
Visit **http://localhost:5173** for the development server.
|
|
112
|
+
|
|
113
|
+
## 🏗️ Architecture
|
|
114
|
+
|
|
115
|
+
Yamon bridges the gap between low-level hardware counters and high-level visualization:
|
|
116
|
+
|
|
117
|
+
1. **Collectors (Python)**: Low-overhead bindings to Apple's private frameworks (`IOKit`, `IOReport`).
|
|
118
|
+
2. **Server (FastAPI)**: Aggregates metrics and broadcasts them via efficient WebSocket streams.
|
|
119
|
+
3. **Frontend (React)**: High-performance canvas rendering for dense data visualization.
|
|
120
|
+
|
|
121
|
+
## 🔋 Power Monitoring Accuracy
|
|
122
|
+
Yamon leverages the `mach_task_self()` iteration method to interface with the hardware SMC. This allows it to read the **System Total Power (PSTR)** sensor with high precision, bypassing standard permission restrictions found in other tools.
|
|
123
|
+
|
|
124
|
+
## 📄 License
|
|
125
|
+
|
|
126
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
*Note: While Yamon is designed to run without root, some deeply protected system metrics may unavailable without elevated privileges. The application will degrade gracefully in these cases.*
|
yamon-0.1.0/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Yamon 🍊
|
|
2
|
+
|
|
3
|
+
**Beautiful, In-Depth System Monitoring for macOS.**
|
|
4
|
+
|
|
5
|
+
Yamon is a modern system monitor engineered specifically for Apple Silicon. It goes beyond standard CPU and RAM metrics to reveal the true heartbeat of your Mac — from Neural Engine activity to precise component-level power consumption — all displayed in an elegant, real-time web interface.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
### 🚀 Deep Apple Silicon Integration
|
|
12
|
+
Unlock metrics that standard tools often hide:
|
|
13
|
+
- **Total System Power**: Accurate, real-time power readings (mW) derived directly from the SMC (System Management Controller).
|
|
14
|
+
- **Power Breakdown**: visualize exactly how much energy your CPU, GPU, and Neural Engine are consuming.
|
|
15
|
+
- **Neural Engine (ANE) Usage**: Track utilization of dedicated AI hardware.
|
|
16
|
+
- **GPU Frequency & Usage**: Gain granular insights into graphics performance and clock speeds.
|
|
17
|
+
|
|
18
|
+
### ⚡️ Real-Time & Responsive
|
|
19
|
+
- **Millisecond Latency**: Powered by WebSockets for an instant, lag-free monitoring experience.
|
|
20
|
+
- **Historical Context**: Interactive charts visualize the last 2 minutes of performance data.
|
|
21
|
+
- **Modern UI**: Built with React, TypeScript, and ECharts for a premium, responsive aesthetic on any device.
|
|
22
|
+
|
|
23
|
+
### 🛠️ Native Performance, Pure Python
|
|
24
|
+
- **Native APIs via ctypes**: Directly interfaces with macOS `IOReport` and `SMC` private frameworks.
|
|
25
|
+
- **No Heavy Dependencies**: Pure Python implementation without the need for compiling Rust or C/C++ binaries.
|
|
26
|
+
- **No Sudo Required**: Most metrics, including granular Power and GPU stats, function without root privileges.*
|
|
27
|
+
|
|
28
|
+
## 📦 Installation
|
|
29
|
+
|
|
30
|
+
### Install from PyPI (Recommended)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install yamon
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
After installation, start the monitor:
|
|
37
|
+
```bash
|
|
38
|
+
yamon
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Visit **http://localhost:8000** to view your dashboard.
|
|
42
|
+
|
|
43
|
+
### Install from Source
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Clone the repository
|
|
47
|
+
git clone https://github.com/grapeot/yamon.git
|
|
48
|
+
cd yamon
|
|
49
|
+
|
|
50
|
+
# Install in development mode
|
|
51
|
+
pip install -e .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 📸 Usage
|
|
55
|
+
|
|
56
|
+
### Production Mode (Single Server)
|
|
57
|
+
The most convenient way to run Yamon locally. The backend serves both the API and the compiled frontend.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# 1. Build Frontend
|
|
61
|
+
./build_frontend.sh
|
|
62
|
+
|
|
63
|
+
# 2. Run Backend
|
|
64
|
+
./run_backend.sh
|
|
65
|
+
```
|
|
66
|
+
Visit **http://localhost:8000** to access the dashboard.
|
|
67
|
+
|
|
68
|
+
### Development Mode (Separate Frontend & Backend)
|
|
69
|
+
For contributors who want to modify the frontend code.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# 1. Run Backend (Collects data)
|
|
73
|
+
./run_backend.sh
|
|
74
|
+
|
|
75
|
+
# 2. Run Frontend (Hot-reload dev server)
|
|
76
|
+
./run_frontend.sh
|
|
77
|
+
```
|
|
78
|
+
Visit **http://localhost:5173** for the development server.
|
|
79
|
+
|
|
80
|
+
## 🏗️ Architecture
|
|
81
|
+
|
|
82
|
+
Yamon bridges the gap between low-level hardware counters and high-level visualization:
|
|
83
|
+
|
|
84
|
+
1. **Collectors (Python)**: Low-overhead bindings to Apple's private frameworks (`IOKit`, `IOReport`).
|
|
85
|
+
2. **Server (FastAPI)**: Aggregates metrics and broadcasts them via efficient WebSocket streams.
|
|
86
|
+
3. **Frontend (React)**: High-performance canvas rendering for dense data visualization.
|
|
87
|
+
|
|
88
|
+
## 🔋 Power Monitoring Accuracy
|
|
89
|
+
Yamon leverages the `mach_task_self()` iteration method to interface with the hardware SMC. This allows it to read the **System Total Power (PSTR)** sensor with high precision, bypassing standard permission restrictions found in other tools.
|
|
90
|
+
|
|
91
|
+
## 📄 License
|
|
92
|
+
|
|
93
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
*Note: While Yamon is designed to run without root, some deeply protected system metrics may unavailable without elevated privileges. The application will degrade gracefully in these cases.*
|