macpm 3.1.0__tar.gz → 3.3.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.
- {macpm-3.1.0 → macpm-3.3.0}/CHANGELOG.md +107 -0
- {macpm-3.1.0/macpm.egg-info → macpm-3.3.0}/PKG-INFO +140 -21
- {macpm-3.1.0 → macpm-3.3.0}/README.md +139 -20
- {macpm-3.1.0 → macpm-3.3.0}/RELEASE.md +44 -13
- {macpm-3.1.0 → macpm-3.3.0}/macpm/__init__.py +1 -1
- {macpm-3.1.0 → macpm-3.3.0}/macpm/backend.py +33 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/blessed_engine.py +88 -32
- macpm-3.3.0/macpm/footprint.py +244 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/gpuview.py +456 -57
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/__init__.py +13 -1
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/gpu.py +149 -37
- macpm-3.3.0/macpm/linux_backend/proc.py +419 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/macos_gpu.py +122 -1
- {macpm-3.1.0 → macpm-3.3.0}/macpm/macpm.py +185 -72
- {macpm-3.1.0 → macpm-3.3.0}/macpm/metrics.py +24 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/network.py +148 -3
- {macpm-3.1.0 → macpm-3.3.0}/macpm/processes.py +117 -24
- {macpm-3.1.0 → macpm-3.3.0}/macpm/sampler.py +49 -5
- {macpm-3.1.0 → macpm-3.3.0}/macpm/sensors.py +47 -0
- macpm-3.3.0/macpm/theme.py +286 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/widgets.py +21 -6
- {macpm-3.1.0 → macpm-3.3.0/macpm.egg-info}/PKG-INFO +140 -21
- {macpm-3.1.0 → macpm-3.3.0}/macpm.egg-info/SOURCES.txt +9 -0
- macpm-3.3.0/packaging/README-linux.txt +67 -0
- macpm-3.3.0/packaging/build-linux.sh +227 -0
- macpm-3.3.0/packaging/macpm-linux.spec +56 -0
- {macpm-3.1.0 → macpm-3.3.0}/setup.py +1 -1
- {macpm-3.1.0 → macpm-3.3.0}/tests/linux_fixtures.py +8 -0
- macpm-3.3.0/tests/test_ane.py +81 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_cli.py +3 -1
- macpm-3.3.0/tests/test_footprint.py +357 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_gpuview.py +251 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_layout.py +93 -25
- macpm-3.3.0/tests/test_linux_gpu.py +652 -0
- macpm-3.3.0/tests/test_macos_gpu.py +66 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_sampler_macos.py +50 -0
- macpm-3.3.0/tests/test_theme.py +185 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_widgets.py +13 -0
- macpm-3.1.0/macpm/linux_backend/proc.py +0 -145
- macpm-3.1.0/tests/test_linux_gpu.py +0 -307
- {macpm-3.1.0 → macpm-3.3.0}/LICENSE +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/MANIFEST.in +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/docs/linux-port.md +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/__main__.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/capabilities.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/dump.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/ioreport.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/cpu.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/modelname.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/net.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/power.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/sampler.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/soc.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/sysfs.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/linux_backend/thermal.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/netinfo.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/netmodel.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/probe.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/smc.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/soc.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm/tui.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm.egg-info/dependency_links.txt +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm.egg-info/entry_points.txt +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm.egg-info/not-zip-safe +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm.egg-info/requires.txt +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/macpm.egg-info/top_level.txt +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/packaging/README.txt +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/packaging/build.sh +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/packaging/entry_tui.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/packaging/install.sh +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/packaging/linux/Dockerfile +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/packaging/linux/README.txt +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/packaging/macpm.command +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/pyproject.toml +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/setup.cfg +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/__init__.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_blessed_engine.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_calc_freq.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_cpu.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_ixsmi.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_modelname.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_net.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_nvidia.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_power.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_sampler.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_thermal.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_view.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_linux_wiring.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_netinfo.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_network.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_probe.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_process_linux.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_processes.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_sampler.py +0 -0
- {macpm-3.1.0 → macpm-3.3.0}/tests/test_sensors.py +0 -0
|
@@ -1,5 +1,112 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.3.0 — 2026-11-20
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- A ninth colour stop, the built-in semantic theme (`--native`, or `→` from
|
|
8
|
+
`8`): grey frame, bright-white machine title and numbers, brown category box
|
|
9
|
+
names, near-white field names, dim secondary text, blue IO rates, cyan IP
|
|
10
|
+
addresses, green normal bars, yellow footer key hints, and amber/red only for
|
|
11
|
+
warnings. Gauges and temperatures use green/amber/red at 60/85% load,
|
|
12
|
+
75/90°C, 75/90% RAM, 50/80% process CPU and 5/15% process memory. The palette
|
|
13
|
+
uses fixed xterm-256 indices (16-255), so it does not follow the terminal.
|
|
14
|
+
- Table lists only keep the header row and the current sort column bright; all
|
|
15
|
+
other normal cells are dim. This applies to the process view, the network
|
|
16
|
+
traffic/listener tables and the single-card GPU process table, and fits the
|
|
17
|
+
brown titles, blue rates, cyan addresses and yellow footer keys throughout.
|
|
18
|
+
- GPU card `BUSY`/`VRAM` bars use the same green/amber/red thresholds instead of
|
|
19
|
+
being uncoloured; `GPU INFO`, `GPUs (N)` and the per-card headers follow the
|
|
20
|
+
same title/header roles.
|
|
21
|
+
- `--no-color` remains a startup-only monochrome mode outside the ring.
|
|
22
|
+
- `images/native.png`: the semantic palette screenshot used in the README.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- macOS GPU view: a process stays listed while it holds GPU memory, even when
|
|
27
|
+
its `GPU%` is momentarily 0 (a browser between frames), instead of flickering
|
|
28
|
+
in and out of the table. The `CARD` column is hidden on macOS, where a
|
|
29
|
+
single integrated GPU would make every row read `-`.
|
|
30
|
+
- The macOS `footprint` poller now targets only processes that actually hold a
|
|
31
|
+
Metal client (from the IORegistry), and rotates the idle targets beyond its
|
|
32
|
+
32-target cap, so every GPU app is eventually measured instead of the
|
|
33
|
+
lowest-PID daemons taking the slots.
|
|
34
|
+
- A single-card GPU view no longer repeats that card's power in the box title;
|
|
35
|
+
the total stays on multi-GPU hosts, where each row is one card.
|
|
36
|
+
- Narrow terminals keep the card table's VRAM column: it first shrinks to a
|
|
37
|
+
short bar with compact numbers, then to numbers only, and is dropped only
|
|
38
|
+
below ~74 columns. Previously the whole column disappeared under 86
|
|
39
|
+
columns.
|
|
40
|
+
- The card table sizes `NAME` to the longest card plus padding instead of
|
|
41
|
+
letting it absorb the whole spare width; the surplus goes to the VRAM bar
|
|
42
|
+
(`BUSY` on tables too narrow for VRAM). `BUSY` is left-aligned so its bar
|
|
43
|
+
starts directly after the name.
|
|
44
|
+
|
|
45
|
+
## 3.2.0 — 2026-11-16
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- Linux AMD/Intel cards report per-process GPU memory from DRM `fdinfo`
|
|
50
|
+
(`drm-resident-vram`/`gtt`/`local0`/`system0` plus `drm-shared-*`). Bytes are
|
|
51
|
+
charged only when the client is provably private: one visible holder, opened
|
|
52
|
+
through a render node, every shared counter present and zero, and a complete
|
|
53
|
+
scan. Anything else shows `n/a` with a reason (`shared_client`,
|
|
54
|
+
`shared_buffers`, `primary`, `legacy`, `partial_scan`, `incomplete`), so a
|
|
55
|
+
shared buffer is never presented as private memory.
|
|
56
|
+
- The GPU view's single-GPU table gained `GPU MEM` and (when the card reports
|
|
57
|
+
GTT) `SHARED` columns, and the per-card process line shows the memory of the
|
|
58
|
+
card's own processes.
|
|
59
|
+
- macOS: the GPU view reads the IOAccelerator's `PerformanceStatistics` through
|
|
60
|
+
the existing IOKit bindings, so the VRAM cell shows `Alloc system memory` out
|
|
61
|
+
of unified RAM and the INFO box adds GPU cores plus the Renderer/Tiler split.
|
|
62
|
+
An integrated GPU's `drm-resident-system0` bytes are charged as that
|
|
63
|
+
process's GPU memory rather than as spill.
|
|
64
|
+
- macOS: per-process `GPU MEM` comes from `footprint`'s `(graphics)`
|
|
65
|
+
categories, so the column agrees with the device number instead of showing
|
|
66
|
+
`n/a` (or RSS). A background thread measures only the processes on screen
|
|
67
|
+
(~15 ms each, busy every 2 s, idle every 30 s, minute-long backoff after
|
|
68
|
+
three failures, stops ~10 s after the view is closed); other users' processes
|
|
69
|
+
need root and stay `n/a`.
|
|
70
|
+
- `tools/ane_load.py`: a manual ANE load (Core ML `mlprogram`) that prints the
|
|
71
|
+
same residency figure as the gauge, for checking it without root.
|
|
72
|
+
|
|
73
|
+
### Changed
|
|
74
|
+
|
|
75
|
+
- DRM clients are keyed by `drm-pdev`, so a process is attributed to the card
|
|
76
|
+
it actually holds; on a multi-AMD host every process used to land on card 0.
|
|
77
|
+
- The GPU view never fills its memory column from RSS. System memory in a
|
|
78
|
+
GPU-memory column is a guess, so an unknown figure stays `n/a`; RSS keeps its
|
|
79
|
+
own `MEM` column in the process view.
|
|
80
|
+
- `GpuMonitor.samples()` takes one `fdinfo` walk per refresh and hands it to
|
|
81
|
+
every card; an 8-card host used to walk every process's fd table once per
|
|
82
|
+
card plus once more for the process ranking.
|
|
83
|
+
- Intel `i915`/`xe` report per-card utilisation through `drm-pdev`; only an old
|
|
84
|
+
kernel without `drm-pdev` falls back to `n/a` on multi-GPU hosts.
|
|
85
|
+
- The Linux process ranking no longer drops GPU-active but CPU-idle processes
|
|
86
|
+
(an inference worker between requests) just because they are outside the
|
|
87
|
+
top 60 by CPU time.
|
|
88
|
+
- The default view's network identity (interface/CIDR, gateway, public IP and
|
|
89
|
+
city) sits on the Network IO box's bottom border and keeps the last non-empty
|
|
90
|
+
text; the key-hint footer is a plain line below it. The previous spare-row
|
|
91
|
+
slot only existed at some terminal heights, and a processor-box title was
|
|
92
|
+
repainted over.
|
|
93
|
+
- The Memory box draws a single RAM bar and gives the rows below it to swap and
|
|
94
|
+
the macOS memory zones, instead of repeating the same bar on every spare row.
|
|
95
|
+
The processor box and the Memory/Temps row keep a fixed content height, and
|
|
96
|
+
surplus rows go to the charts; a one-column gutter separates side-by-side
|
|
97
|
+
usage bars.
|
|
98
|
+
|
|
99
|
+
### Fixed
|
|
100
|
+
|
|
101
|
+
- The default view's `ANE Usage` gauge always read 0 %: it was derived from the
|
|
102
|
+
Energy Model's ANE power counter, which reports 0 on recent Apple Silicon
|
|
103
|
+
even while the ANE runs. It now uses the `ANE` IOReport channel's `status`
|
|
104
|
+
residency (the share of the interval spent `Running`), which reads 0 % idle
|
|
105
|
+
and near 100 % under a Core ML loop; the watts suffix appears only when a
|
|
106
|
+
sample actually measured ANE energy.
|
|
107
|
+
- `drm-engine-capacity-*` lines are no longer parsed as engine time, so a
|
|
108
|
+
capacity value cannot pollute the per-process GPU percentage.
|
|
109
|
+
|
|
3
110
|
## 3.1.0 — 2026-11-15
|
|
4
111
|
|
|
5
112
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: macpm
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Summary: Performance monitoring CLI for Apple Silicon and Linux
|
|
5
5
|
Home-page: https://github.com/visualcjy/macpm
|
|
6
6
|
Author: Jinyu Chen
|
|
@@ -52,6 +52,21 @@ A Python-based `nvtop`-inspired terminal monitor for Apple Silicon Macs,
|
|
|
52
52
|
forked from [asitop](https://github.com/tlkh/asitop), with an x86_64/arm64
|
|
53
53
|
Linux backend.
|
|
54
54
|
|
|
55
|
+
## What's new in 3.3
|
|
56
|
+
|
|
57
|
+
- **Built-in semantic colour theme.** The ninth `←`/`→` stop (`--native`)
|
|
58
|
+
paints by role instead of one accent colour: grey frame, bright-white machine
|
|
59
|
+
title and numbers, brown category box names, near-white field names, dim
|
|
60
|
+
secondary text, blue IO rates, cyan IP addresses, green normal bars, yellow
|
|
61
|
+
footer key hints, and amber/red only for warnings. The palette is fixed
|
|
62
|
+
xterm-256 output, so it does not depend on the terminal profile.
|
|
63
|
+
- **Readable tables.** In the process, network and single-card GPU tables only
|
|
64
|
+
the header row and the current sort column stay bright; other normal cells
|
|
65
|
+
are dim. GPU card BUSY/VRAM bars follow the same green/amber/red thresholds.
|
|
66
|
+
- **`--no-color` stays monochrome** and remains outside the colour ring.
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
55
70
|
## What's new in 3.0
|
|
56
71
|
|
|
57
72
|
- **Runs on Linux** (x86_64/arm64/LoongArch64) from the same package: `/proc`
|
|
@@ -61,6 +76,11 @@ Linux backend.
|
|
|
61
76
|
GPU INFO box, 10-cell VRAM bars, pagination and the served model name.
|
|
62
77
|
Verified on 16× Iluvatar BI-V150S, 64× Denglin KS58, 8× Techo
|
|
63
78
|
TECO_AICARD_01 and 8× RTX 4090.
|
|
79
|
+
- **Per-process GPU memory on Linux DRM cards**: AMD/Intel `fdinfo` bytes are
|
|
80
|
+
charged to a process only when the kernel proves they are private, and the
|
|
81
|
+
card each client belongs to is read from `drm-pdev`; an unprovable row shows
|
|
82
|
+
`n/a` with a reason instead of a guess. On macOS the IOAccelerator's
|
|
83
|
+
allocated GPU memory is shown against unified RAM.
|
|
64
84
|
- **Vendor and NVIDIA backends**: `ixsmi`, `dlsmi`, `teco-smi` and
|
|
65
85
|
`nvidia-smi`, including per-card compute processes and model names.
|
|
66
86
|
|
|
@@ -71,6 +91,10 @@ disk I/O and network, updating once per second:
|
|
|
71
91
|
|
|
72
92
|

|
|
73
93
|
|
|
94
|
+
The built-in semantic palette (`--native`, the ninth colour stop):
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
74
98
|
Same view in another colour theme (press ← / → to cycle through them):
|
|
75
99
|
|
|
76
100
|

|
|
@@ -92,7 +116,7 @@ Network view (press `4` while running):
|
|
|
92
116
|
- **No sudo required.** `macpm` runs as a normal user process.
|
|
93
117
|
- CPU E/P core utilisation and frequency, plus an optional per-core view
|
|
94
118
|
- GPU utilisation and frequency
|
|
95
|
-
- CPU / GPU
|
|
119
|
+
- CPU / GPU power, ANE utilisation (residency counters) and ANE power when the rail reports it, rolling average, peaks and throttle state
|
|
96
120
|
- RAM and swap usage
|
|
97
121
|
- CPU/GPU temperature, peak and fan-load panel (SMC, read-only, no root)
|
|
98
122
|
- Disk IOPS/throughput and network throughput
|
|
@@ -100,9 +124,11 @@ Network view (press `4` while running):
|
|
|
100
124
|
- Network view (`4`) with TCP state counts, listening ports, per-process traffic
|
|
101
125
|
and the local/public IP, gateway and city
|
|
102
126
|
- GPU view (`5`) with utilisation, clock, power, VRAM, temperature and the
|
|
103
|
-
processes using the GPU, ranked by GPU time
|
|
104
|
-
|
|
105
|
-
|
|
127
|
+
processes using the GPU, ranked by GPU time; AMD/Intel cards also show each
|
|
128
|
+
process's VRAM/GTT and the card it holds
|
|
129
|
+
- Key-hint footer in every view; the default view puts the network identity
|
|
130
|
+
(interface, CIDR, gateway, public IP and city) on the Network IO box's bottom
|
|
131
|
+
border, and the key hints are a plain line below it
|
|
106
132
|
- Familiar terminal layout, colours, charts and key bindings from macpm 0.x
|
|
107
133
|
|
|
108
134
|
## Install
|
|
@@ -138,6 +164,8 @@ macpm [--interval INTERVAL] [--color COLOR] [--avg AVG] [--show_cores [BOOL]] [-
|
|
|
138
164
|
|---|---|
|
|
139
165
|
| `--interval SECONDS` | Sampling and display interval (default `1`) |
|
|
140
166
|
| `--color 1-8` | Display colour (default `2`) |
|
|
167
|
+
| `--native` | Start in the built-in semantic colour theme |
|
|
168
|
+
| `--no-color` | Use the terminal's default foreground (no accent colour) |
|
|
141
169
|
| `--avg SECONDS` | Averaging window for power values (default `30`) |
|
|
142
170
|
| `--show_cores [BOOL]` | Start in the per-core view |
|
|
143
171
|
| `--no-public-ip` | Do not look up the public IP and location |
|
|
@@ -159,7 +187,19 @@ Ctrl+R reset peaks
|
|
|
159
187
|
## Colour themes
|
|
160
188
|
|
|
161
189
|
Pick one with `--color N`, or press ← / → while macpm is running. The default
|
|
162
|
-
is `2` (green).
|
|
190
|
+
is `2` (green). The ring has nine stops: `1`-`8` paint the whole UI in one ANSI
|
|
191
|
+
accent colour, and the ninth (`--native`, or → from `8`) uses macpm's own
|
|
192
|
+
semantic palette instead: frame lines stay grey, the machine title and numbers
|
|
193
|
+
are bright white, category box names (Memory, Power, Disk IO, Network IO) are
|
|
194
|
+
brown, field names near-white, ordinary text dim, IO rates blue, IP addresses
|
|
195
|
+
cyan, normal bars the original green, footer key hints yellow, and only
|
|
196
|
+
warnings/critical readings use amber/red. In the process, network and
|
|
197
|
+
single-card GPU tables only the header row and the current sort column are
|
|
198
|
+
bright; the other normal cells stay dim. The palette uses fixed xterm-256
|
|
199
|
+
indices (16-255), so it does not follow the terminal profile.
|
|
200
|
+
|
|
201
|
+
`--no-color` is outside the ring: it keeps the terminal's default foreground
|
|
202
|
+
for a monochrome setup or a terminal-side keyword highlighter.
|
|
163
203
|
|
|
164
204
|
| | |
|
|
165
205
|
|---|---|
|
|
@@ -180,6 +220,7 @@ requires root and Apple's private entitlements.
|
|
|
180
220
|
| Per-core load | IOReport `CPU Core Performance States` |
|
|
181
221
|
| GPU load and frequency | IOReport `GPU Stats` / `GPU Performance States` |
|
|
182
222
|
| CPU / GPU / ANE power | IOReport `Energy Model` |
|
|
223
|
+
| ANE utilisation | IOReport `ANE` `status` residency (Running share) |
|
|
183
224
|
| RAM / swap | `psutil` |
|
|
184
225
|
| Disk / network throughput | `psutil` counters |
|
|
185
226
|
| Sockets, listeners, per-process traffic | `nettop` |
|
|
@@ -197,7 +238,11 @@ M1–M3 store Hz there, M4+ store kHz.
|
|
|
197
238
|
|
|
198
239
|
## Temperatures and fans
|
|
199
240
|
|
|
200
|
-
The default view has a **Temps & Fans** box next to the
|
|
241
|
+
The default view has a **Temps & Fans** box next to the **Memory** box. The
|
|
242
|
+
Memory box draws one RAM bar and uses the rows below for swap and the macOS
|
|
243
|
+
memory zones (`wired` / `active` / `inactive` / `free`); the processor box and
|
|
244
|
+
this row keep their content height, and any spare rows go to the charts. The
|
|
245
|
+
Temps & Fans box shows
|
|
201
246
|
the hottest CPU and GPU sensor with their peaks since the last reset (CPU on
|
|
202
247
|
one row, GPU on the next), the current RPM of every fan, and a fan-load bar
|
|
203
248
|
for each fan (current speed as a
|
|
@@ -312,9 +357,17 @@ recovered from the launcher's command line (`--served-model-name`, `--model`,
|
|
|
312
357
|
`--model-path`, `--model-id`) by walking up the parent chain; a single-GPU view
|
|
313
358
|
shows it as a `MODEL` column.
|
|
314
359
|
|
|
360
|
+
The single-GPU process table has a `GPU MEM` column (dedicated memory, or the
|
|
361
|
+
GTT bytes of an integrated GPU) and, when a card reports them, a `SHARED`
|
|
362
|
+
column for GPU-accessible system memory. Neither is ever filled from RSS:
|
|
363
|
+
system memory in a GPU-memory column would be a guess, so an unprovable row
|
|
364
|
+
shows `n/a` and the reason stays in the data
|
|
365
|
+
(`shared_client`, `shared_buffers`, `primary`, `legacy`, `partial_scan`,
|
|
366
|
+
`incomplete`).
|
|
367
|
+
|
|
315
368
|
A single-GPU machine keeps the older layout: card summary on top, process table
|
|
316
369
|
below. Every view's footer starts with the app name and version
|
|
317
|
-
(`macpm v3.
|
|
370
|
+
(`macpm v3.3.0 · q quit …`).
|
|
318
371
|
|
|
319
372
|
```text
|
|
320
373
|
┌ GPU INFO ────────────────────────────────────────────────────────────────────────────────┐
|
|
@@ -328,12 +381,12 @@ below. Every view's footer starts with the app name and version
|
|
|
328
381
|
│ └ 222 Xorg 2.0G │
|
|
329
382
|
│ 2 AMD GPU (amdgpu) ▉▉▉▉▏▏ 60% 1100/1750 12.0W ▉▉▉▉▏▏▏▏▏▏ 3.0G/8.0G 46°C │
|
|
330
383
|
│ 3 AMD GPU (amdgpu) ▉▉▉▉▉▏ 85% 1200/1750 12.0W ▉▉▉▉▉▏▏▏▏▏ 4.0G/8.0G 49°C │
|
|
331
|
-
└ macpm v3.
|
|
384
|
+
└ macpm v3.3.0 · q quit 1-5 view s sort ↑/↓ page Space pause ←/→ colour ────────────────┘
|
|
332
385
|
```
|
|
333
386
|
|
|
334
387
|
| Platform | What fills each row |
|
|
335
388
|
|---|---|
|
|
336
|
-
| macOS | One row: IOReport GPU idle ratio and the Energy Model power; the SMC supplies the temperature. Memory is unified, so the VRAM cell says `unified`. |
|
|
389
|
+
| macOS | One row: IOReport GPU idle ratio and the Energy Model power; the SMC supplies the temperature. Memory is unified, so the VRAM cell shows the IOAccelerator's `Alloc system memory` (every process's Metal allocations) out of physical RAM, and the card title says so; the INFO box adds GPU cores and the Renderer/Tiler split. Each process's `GPU MEM` comes from `footprint`'s `(graphics)` categories. Without registry data the VRAM cell says `unified`. |
|
|
337
390
|
| Linux (amdgpu) | One row per `cardN`: `gpu_busy_percent`, `pp_dpm_sclk`, hwmon power/temperature, `mem_info_vram_*` |
|
|
338
391
|
| Linux (i915/xe) | One row per card: `gt_cur_freq_mhz` / `tile0/gt0/freq0`, DRM `fdinfo` engine time, hwmon temperature; VRAM only when the driver exposes `lmem_total_bytes` |
|
|
339
392
|
| Linux (NVIDIA) | One row per GPU from a single `nvidia-smi --query-gpu` call: utilisation, SM clock, power, memory, temperature. Compute processes come from `nvidia-smi --query-compute-apps` (SM% joined from `pmon`). `nvidia-smi` is found on `PATH`, at `/usr/lib/wsl/lib/nvidia-smi` on WSL, or via `MACPM_NVIDIA_SMI` |
|
|
@@ -361,6 +414,17 @@ Notes:
|
|
|
361
414
|
worker is two hops below `vllm serve`/`sglang.launch_server`, and reading
|
|
362
415
|
`config.json` through `/proc/<pid>/root` can block on a stalled network mount.
|
|
363
416
|
Unknown servers show no name rather than a guess.
|
|
417
|
+
- On macOS, per-process `GPU MEM` is `footprint`'s `(graphics)` dirty bytes
|
|
418
|
+
(Metal buffers and textures), not RSS. One call costs ~15 ms, so a
|
|
419
|
+
background thread measures only the processes on screen: busy ones every 2 s,
|
|
420
|
+
idle ones every 30 s, with a minute of backoff after three failures, and it
|
|
421
|
+
stops ~10 s after the view is closed. Without root `footprint` can only read
|
|
422
|
+
your own processes; the rest keep `n/a`.
|
|
423
|
+
- On macOS, the table keeps a process listed while it holds GPU memory even
|
|
424
|
+
when its `GPU%` is momentarily 0 (a browser between frames), and the `CARD`
|
|
425
|
+
column is omitted: a Mac has one integrated GPU, so it would only ever show
|
|
426
|
+
`-`. On Linux multi-GPU hosts `CARD` still shows the index/range the process
|
|
427
|
+
holds.
|
|
364
428
|
- The nested process line comes from the vendor's own compute-process list
|
|
365
429
|
(`ixsmi pmon`/`--query-compute-apps`, `dlsmi --query-compute-apps`,
|
|
366
430
|
`teco-smi pmon`) or, on macOS and DRM GPUs, from `fdinfo`/IOAccelerator. A
|
|
@@ -375,9 +439,22 @@ Notes:
|
|
|
375
439
|
idle card does not read as generation 1. Consumer cards report `[N/A]` for
|
|
376
440
|
the serial, so their card/die counts are left out instead of guessed; PCIe
|
|
377
441
|
and VBIOS are hidden when the tool reports `N/A`.
|
|
378
|
-
- Intel `fdinfo` counters are
|
|
379
|
-
|
|
380
|
-
|
|
442
|
+
- Intel `fdinfo` counters are split per card through `drm-pdev`, so several
|
|
443
|
+
Intel GPUs each report their own work. An old kernel whose `fdinfo` has no
|
|
444
|
+
`drm-pdev` cannot tell the cards apart, and the per-card BUSY cell then shows
|
|
445
|
+
`n/a` instead of duplicating the aggregate on every row.
|
|
446
|
+
- On AMD/Intel DRM cards, per-process memory is charged only when every
|
|
447
|
+
`drm-shared-*` counter is present and zero, the client was opened through a
|
|
448
|
+
render node, exactly one visible process holds it, and the fdinfo scan
|
|
449
|
+
reached the end. `drm-shared-*` and `drm-resident-*` count by different
|
|
450
|
+
placements, so their difference is never used as "private" memory; anything
|
|
451
|
+
unprovable stays `n/a` rather than being guessed. Other users' processes
|
|
452
|
+
need root to be inspected, and their bytes show as unattributed.
|
|
453
|
+
- The card table sizes `NAME` to the longest card plus padding rather than
|
|
454
|
+
stretching it; the spare width goes to the VRAM bar. On narrow terminals it
|
|
455
|
+
sheds columns, and the VRAM cell shrinks to a short bar with compact numbers
|
|
456
|
+
(then to numbers only) before the column is dropped, so memory stays visible
|
|
457
|
+
down to ~74 columns.
|
|
381
458
|
- The default view's GPU gauge shows the busiest card and appends `(max of N)`
|
|
382
459
|
when the machine has more than one.
|
|
383
460
|
|
|
@@ -436,17 +513,29 @@ python3 -m macpm.probe
|
|
|
436
513
|
| Disk I/O, network rate | `/proc/diskstats`, `/proc/net/dev` | ✅ | ✅ |
|
|
437
514
|
| Processes CPU/MEM | `/proc/<pid>` via `psutil` | ✅ all users | ✅ |
|
|
438
515
|
| Per-process GPU% | DRM `fdinfo` `drm-engine-*` | own processes only | ✅ all |
|
|
516
|
+
| Per-process GPU memory | DRM `fdinfo` `drm-resident-*` / `drm-shared-*` | own processes only | ✅ all |
|
|
517
|
+
| GPU memory (device) | amdgpu `mem_info_vram_*`, i915/xe `lmem_total_bytes` | ✅ | ✅ |
|
|
439
518
|
| TCP/UDP counts, listeners | `/proc/net/{tcp,tcp6,udp,udp6}` | ✅ counts, own PIDs | ✅ all PIDs |
|
|
440
519
|
| Per-process traffic | `ss -tanie` `tcp_info` | own processes, TCP only | ✅ all |
|
|
441
520
|
|
|
442
521
|
**GPU notes.** `amdgpu` exposes everything. Intel `i915`/`xe` have no global
|
|
443
522
|
busy counter, so macpm sums every DRM client's engine time from `fdinfo` —
|
|
444
523
|
which needs root to see other processes, otherwise it only shows macpm's own
|
|
445
|
-
GPU work.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
524
|
+
GPU work. The same `fdinfo` file carries the client's memory, so AMD and Intel
|
|
525
|
+
cards also get per-process VRAM/GTT; NVIDIA uses `nvidia-smi`, which reports
|
|
526
|
+
memory itself. Vendor ARM GPUs and Apple GPU under Asahi have no exported
|
|
527
|
+
counters yet and show `n/a`.
|
|
528
|
+
|
|
529
|
+
**No ANE on Linux.** There is no Linux equivalent of the Apple Neural Engine
|
|
530
|
+
counter, so that gauge is removed there.
|
|
531
|
+
|
|
532
|
+
**ANE usage is residency, not power.** On recent Apple Silicon the Energy
|
|
533
|
+
Model's ANE power tile stopped updating (it reads 0 W even while the ANE
|
|
534
|
+
runs), so `ANE Usage` comes from the `ANE` group's `status` channel: the share
|
|
535
|
+
of the interval spent in the `Running` state. Idle is 0 %, a Core ML
|
|
536
|
+
`mlprogram` loop holds it near 100 %. Watts are only appended when that sample
|
|
537
|
+
actually measured nonzero ANE energy. `tools/ane_load.py` builds such a loop
|
|
538
|
+
for a manual check (it needs `coremltools`; macpm itself does not).
|
|
450
539
|
|
|
451
540
|
**Vendor accelerators need a vendor tool.** Ampere/Intel/AMD GPUs expose
|
|
452
541
|
kernel counters, but many accelerator cards only ship a management CLI and no
|
|
@@ -502,9 +591,13 @@ headless UI against it.
|
|
|
502
591
|
|
|
503
592
|
## Standalone binaries
|
|
504
593
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
594
|
+
`macpm` can be shipped as a self-contained binary, so the target machine needs
|
|
595
|
+
no Python installation. There are two build paths.
|
|
596
|
+
|
|
597
|
+
### macOS (arm64)
|
|
598
|
+
|
|
599
|
+
`packaging/build.sh`, run on an Apple Silicon Mac, produces an unsigned/ad-hoc
|
|
600
|
+
arm64 `macpm` and `macpm-<version>-macos-arm64.tar.gz`.
|
|
508
601
|
|
|
509
602
|
On first launch from a browser download, macOS Gatekeeper may ask you to
|
|
510
603
|
right-click → Open, or you can remove the quarantine flag:
|
|
@@ -515,6 +608,32 @@ xattr -d com.apple.quarantine ./macpm ./macpm.command
|
|
|
515
608
|
|
|
516
609
|
See [packaging/README.txt](https://github.com/visualcjy/macpm/blob/main/packaging/README.txt) for details.
|
|
517
610
|
|
|
611
|
+
### Linux (x86_64 / aarch64)
|
|
612
|
+
|
|
613
|
+
`packaging/build-linux.sh` builds one-file binaries and, with `--deb`, Debian
|
|
614
|
+
packages:
|
|
615
|
+
|
|
616
|
+
```sh
|
|
617
|
+
packaging/build-linux.sh both --deb
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
Each target gets its own python-build-standalone interpreter, so the result
|
|
621
|
+
does not depend on the build host's Python. The binaries keep a glibc 2.17
|
|
622
|
+
floor (CentOS 7 / Ubuntu 16.04 / Debian 9 and newer) and use the system's
|
|
623
|
+
`libgcc_s`, which every glibc distribution ships. Output:
|
|
624
|
+
|
|
625
|
+
```text
|
|
626
|
+
dist/macpm-<version>-linux-x86_64.tar.gz
|
|
627
|
+
dist/macpm-<version>-linux-aarch64.tar.gz
|
|
628
|
+
dist/macpm_<version>_amd64.deb
|
|
629
|
+
dist/macpm_<version>_arm64.deb
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
Build on a native machine, or build x86_64 on an arm64 host through Rosetta
|
|
633
|
+
(an OrbStack Ubuntu VM works; install `binutils-x86-64-linux-gnu` there).
|
|
634
|
+
[packaging/README-linux.txt](https://github.com/visualcjy/macpm/blob/main/packaging/README-linux.txt)
|
|
635
|
+
is the README that ships inside the tarball.
|
|
636
|
+
|
|
518
637
|
## Development
|
|
519
638
|
|
|
520
639
|
```sh
|