Skip to content

Commit 6c63547

Browse files
committed
Rewrite for CPU usage
Now using Apple's native Mach Kernel API via cgo to get accurate CPU core readings, process list improved with sorting and layouts updated, v0.2.2
1 parent 6b77077 commit 6c63547

File tree

4 files changed

+651
-225
lines changed

4 files changed

+651
-225
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
## Features
1515

16-
- Apple Silicon Monitor Top written in Go Lang (Under 1,000 lines of code)
17-
- Real-time CPU and GPU power usage display.
18-
- Detailed metrics for different CPU clusters (E-Cores and P-Cores).
16+
- Apple Silicon Monitor Top written in Go Lang and CGO
17+
- Real-time CPU and GPU power wattage usage display.
18+
- Detailed native metrics for CPU cores (E and P cores) (Apple's Mach Kernel API)
1919
- Memory usage and swap information.
2020
- Network usage information
2121
- Disk Activity Read/Write
@@ -141,7 +141,8 @@ Contributions are what make the open-source community such an amazing place to l
141141
- `sysctl`: For CPU model information
142142
- `system_profiler`: For GPU Core Count
143143
- `psutil`: For memory and swap metrics
144-
- `powermetrics`: For majority of CPU, GPU, Network, and Disk metrics
144+
- `powermetrics`: For majority of GPU, Network, and Disk metrics
145+
- `host_processor_info`: For CPU metrics (E and P cores) Apple Mach Kernel API in CGO
145146

146147
## License
147148

@@ -162,3 +163,4 @@ This tool is not officially supported by Apple. It is provided as is, and may no
162163
- [termui](https://github.com/gizak/termui) for the terminal UI framework.
163164
- [gopsutil](https://github.com/shirou/gopsutil) for system memory monitoring.
164165
- [asitop](https://github.com/tlkh/asitop) for the original inspiration!
166+
- [htop](https://github.com/htop-dev/htop) for the process list and CPU cores inspiration!

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require (
99
)
1010

1111
require (
12+
github.com/caseymrm/go-smc v0.0.0-20180521175121-66b52ab0ffbf // indirect
1213
github.com/davecgh/go-spew v1.1.1 // indirect
1314
github.com/go-ole/go-ole v1.2.6 // indirect
1415
github.com/mattn/go-runewidth v0.0.4 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/caseymrm/go-smc v0.0.0-20180521175121-66b52ab0ffbf h1:Ahgz9Usl3XTXzuVAO9Nw2fMlbbwaagaKjmHIyzkM7ek=
2+
github.com/caseymrm/go-smc v0.0.0-20180521175121-66b52ab0ffbf/go.mod h1:t/rpq4mwI5WzO0Yu8aG8kGmZECjV3G4amwoqBsWULUA=
13
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
24
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
35
github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc=

0 commit comments

Comments
 (0)