-
-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathmactop.rb
More file actions
54 lines (43 loc) · 1.38 KB
/
Copy pathmactop.rb
File metadata and controls
54 lines (43 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Mactop < Formula
desc "Apple Silicon Monitor Top written in Go Lang"
homepage "https://github.com/metaspartan/mactop"
version "2.1.5"
depends_on "macos"
depends_on :macos
if Hardware::CPU.arm?
url "https://github.com/metaspartan/mactop/releases/download/v2.1.5/mactop_2.1.5_darwin_arm64.tar.gz"
sha256 "268c2dafdaa954875a2c684e4d6eef9832f96a027e7905f7fc716b42b2ea69b8"
define_method(:install) do
bin.install "mactop"
end
end
def caveats
<<~EOS
mactop requires macOS 12+, and runs exclusively on Apple Silicon.
To run mactop as a background service:
brew services start mactop
To view service error logs:
brew services logs mactop
Prometheus metrics will be available at:
http://localhost:9101/metrics
To change the Prometheus port:
1. brew services stop mactop
2. brew services edit mactop
3. Change 9101 to your desired port
4. brew services start mactop
Or run manually with a custom port:
mactop -p <PORT> --headless
EOS
end
service do
run [opt_bin/"mactop", "-p", "9101", "--headless"]
keep_alive true
log_path var/"log/mactop.log"
error_log_path var/"log/mactop.error.log"
process_type :background
nice 10
end
end