Skip to content

Commit 9f2e51a

Browse files
committed
goasitop init
0 parents  commit 9f2e51a

File tree

9 files changed

+859
-0
lines changed

9 files changed

+859
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/logs
2+
3+
goasitop
4+
dist/

.goreleaser.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
- go generate ./...
5+
6+
builds:
7+
- env:
8+
- CGO_ENABLED=1
9+
goos:
10+
- darwin
11+
goarch:
12+
- arm64
13+
binary: "{{ .ProjectName }}"
14+
15+
archives:
16+
- format: tar.gz
17+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
18+
files:
19+
- LICENSE
20+
- README.md
21+
- "{{ .ProjectName }}"
22+
23+
checksum:
24+
name_template: 'checksums.txt'
25+
26+
snapshot:
27+
name_template: "{{ incpatch .Version }}-next"
28+
29+
changelog:
30+
sort: asc
31+
filters:
32+
exclude:
33+
- '^docs:'
34+
- '^test:'
35+
36+
brews:
37+
- name: "{{ .ProjectName }}"
38+
homepage: "https://github.com/context-labs/goasitop"
39+
description: "Apple Silicon Monitor Top written in Go Lang"
40+
url_template: "https://github.com/context-labs/goasitop/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
41+
caveats: "goasitop requires macOS 12+, and runs only on Apple Silicon."
42+
install: |
43+
bin.install "{{ .ProjectName }}"
44+
45+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
46+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Carsen Klock
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.

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# goasitop
2+
3+
`goasitop` is a terminal-based monitoring tool designed to display real-time power metrics for Apple Silicon chips. It provides a simple and efficient way to monitor CPU and GPU usage, E-Cores and P-Cores, power consumption, and other system metrics directly from your terminal.
4+
5+
![Screenshot](screenshot.png)
6+
7+
## Features
8+
9+
- Apple Silicon Monitor Top written in Go Lang (Under 1,000 lines of code)
10+
- Real-time CPU and GPU power usage display.
11+
- Detailed metrics for different CPU clusters (E-Cores and P-Cores).
12+
- Memory usage and swap information.
13+
- Easy-to-read terminal UI
14+
- Support for all Apple Silicon models.
15+
16+
## Known Bugs
17+
18+
- Cannot exit cleanly with Ctrl + C etc. must kill terminal process for goasitop exit.
19+
20+
## Installation
21+
22+
To install `goasitop`, follow these steps:
23+
24+
1. Ensure you have Go installed on your machine. If not, you can install it by following the instructions here: [Go Installation Guide](https://go.dev/doc/install).
25+
26+
2. Clone the repository:
27+
```bash
28+
git clone https://github.com/context-labs/goasitop.git
29+
cd goasitop
30+
```
31+
32+
3. Build the application:
33+
```bash
34+
go build
35+
```
36+
37+
4. Run the application:
38+
```bash
39+
./goasitop
40+
```
41+
42+
## Usage
43+
44+
After installation, you can start `goasitop` by simply running:
45+
```bash
46+
./goasitop
47+
```
48+
49+
Use the following keys to interact with the application:
50+
- `q`: Quit the application.
51+
- `r`: Refresh the data manually.
52+
53+
## Contributing
54+
55+
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
56+
57+
1. Fork the Project
58+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
59+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
60+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
61+
5. Open a Pull Request
62+
63+
## License
64+
65+
Distributed under the MIT License. See `LICENSE` for more information.
66+
67+
## Contact
68+
69+
Carsen Klock - [@carsenklock](https://twitter.com/carsenklock)
70+
71+
Project Link: [https://github.com/context-labs/goasitop](https://github.com/context-labs/goasitop)
72+
73+
## Acknowledgements
74+
75+
- [termui](https://github.com/gizak/termui) for the terminal UI framework.
76+
- [gopsutil](https://github.com/shirou/gopsutil) for system memory monitoring.
77+
```

go.mod

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module github.com/context-labs/goasitop/v2
2+
3+
go 1.20
4+
5+
require (
6+
github.com/gizak/termui/v3 v3.1.0
7+
github.com/shirou/gopsutil v3.21.11+incompatible
8+
)
9+
10+
require (
11+
github.com/davecgh/go-spew v1.1.1 // indirect
12+
github.com/go-ole/go-ole v1.2.6 // indirect
13+
github.com/mattn/go-runewidth v0.0.4 // indirect
14+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
15+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d // indirect
16+
github.com/pmezard/go-difflib v1.0.0 // indirect
17+
github.com/stretchr/testify v1.2.2 // indirect
18+
github.com/yusufpapurcu/wmi v1.2.4 // indirect
19+
golang.org/x/sys v0.19.0 // indirect
20+
)

go.sum

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc=
4+
github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY=
5+
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
6+
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
7+
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
8+
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
9+
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
10+
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
11+
github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4=
12+
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
13+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=
14+
github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
15+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
16+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
17+
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
18+
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
19+
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
20+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
21+
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
22+
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
23+
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
24+
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
25+
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

0 commit comments

Comments
 (0)