60 |
61 |
74 |
75 |
76 | - dshb(1)
77 |
78 | - dshb(1)
79 |
80 |
81 |
NAME
82 |
83 | dshb - macOS system monitor
84 |
85 |
86 |
SYNOPSIS
87 |
88 |
dshb [-eu][-f frequency]
89 | [-h]
90 | [-v]
91 |
92 |
DESCRIPTION
93 |
94 |
A macOS system monitor in Swift, inspired by top & htop. Displays live readings
95 | of system CPU & memory usage, machine temperature sensors, fan speeds, battery
96 | information and other miscellaneous system statistics. The ncurses based TUI
97 | (text-based user interface) uses color coating to imply status and is fully
98 | resizable. Stats are updated at one second intervals while still maintaining
99 | low overhead (the observer effect is inescapable in this case sadly).
100 |
101 |
OPTIONS
102 |
103 |
List of supported command line options (flags/switchs):
104 |
105 |
106 | -f, --frequency valueStatistic update frequency in seconds. Default is 1.
107 | -h, --helpPrint the list of options.
108 | -u, --unknown-temperature-sensorsShow temperature sensors whose hardware mapping is unknown.
109 | -v, --versionShow dshb version.
110 |
111 |
112 |
113 |
COMMANDS
114 |
115 |
List of supported interactive commands for use during application runtime:
116 |
117 |
118 | q- Quit.
119 |
120 |
121 |
122 |
STATS
123 |
124 |
Statistic sections are defined as "widgets" (hence the name dashboard -
125 | metaphorically akin to macOS's Dashboard). Widgets are composed of related
126 | statistics. Here we look at the various widgets in detail.
127 |
128 |
129 | Battery
130 | Displays information about the state of the battery. If the machine does not
131 | have a battery, this widget will not appear. The information includes
132 | Charge, Capacity Degradation, Cycles and Time Remaining.
133 | CPUDisplays CPU usage broken down into System, User, Idle and Nice.
134 | FanDisplays a list of all the fans the machine has with the current speed
135 | (RPM - revolutions per minute) of each. All Intel based Macs to this point
136 | have at least one fan, with the exception of the newly added fanless
137 | MacBook.
138 | MemoryDisplays memory usage broken down into Free, Wired, Active,
139 | Inactive and Compressed.
140 | SystemMiscellaneous system stats including Uptime, Processes & Threads
141 | (global counts), Load Average (1, 5 and 15 minute intervals) and Mach
142 | Factor (5, 30 and 60 second intervals).
143 | TemperatureDisplays a list of the machine temperature sensors in Celsius. The list
144 | is exhaustive when the (-u) switch is used.
145 |
146 | Note that the names of the known sensors may not be mapped to the correct
147 | hardware component. In addition, the maximum temperature of each individual
148 | sensor is not known. Thus, a global max of 128 degrees is used. This is all
149 | due to the fact that the SMC (System Management Controller) has a closed
150 | source driver, and thus information about it's inner workings is limited.
151 |
152 | If a sensor has a value that is very high, constant, and completely
153 | disproportionate to the rest, then there is a chance that it is faulty. This
154 | could be due to bad or damaged hardware (liquid on the logic board). Run the
155 | Apple Diagnostics (Apple Hardware Test for older machines) diagnostics
156 | suite in such a case to confirm.
157 |
158 | Some sensors however report very low values, below zero. The current theory
159 | on this is that at lower temperatures the sensors have inaccurate readings.
160 | It maybe that they are located close to an internal fan, and the airflow is
161 | causing it to be skewed.
162 |
163 |
164 |
165 |
ENVIRONMENT
166 |
167 |
Due to Swift, dshb requires macOS 10.9 (Mavericks) and above. This implies an
168 | Intel based 64-bit machine. Of course, ncurses is required as well, but it
169 | should be installed by default as a part of macOS, as base install tools such as
170 | top, rely on it as well.
171 |
172 |
REPOSITORY
173 |
174 |
https://github.com/beltex/dshb
175 |
176 |
All project related matters, including source code, can be found at the GitHub
177 | repository listed above. In particular, the issue tracker, which can be used to
178 | report feedback, feature requests and bugs.
179 |
180 |
COPYRIGHT
181 |
182 |
This project is under the MIT License.
183 |
184 |
AUTHOR
185 |
186 |
beltex https://beltex.github.io
187 |
188 |
Working on this always brought a smile to my face. I hope it brings a smile to
189 | yours too. Enjoy :)
190 |
191 |
SEE ALSO
192 |
193 |
top(1), htop(1)
194 |
195 |
196 |
201 |
202 |
203 |
204 |
205 |
--------------------------------------------------------------------------------
/dshb.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 4C08F2981A94F3C3006F9359 /* Widget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C08F2971A94F3C3006F9359 /* Widget.swift */; };
11 | 4C4281FB1A3009040000C114 /* WidgetBattery.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4281FA1A3009040000C114 /* WidgetBattery.swift */; };
12 | 4C448D381B3058EF00F6416C /* libncurses.5.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C448D371B3058EF00F6416C /* libncurses.5.4.dylib */; };
13 | 4C53D39D1F85E2FC001225B1 /* CommandLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C53D39A1F85E2FC001225B1 /* CommandLine.swift */; };
14 | 4C53D39E1F85E2FC001225B1 /* Option.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C53D39B1F85E2FC001225B1 /* Option.swift */; };
15 | 4C53D39F1F85E2FC001225B1 /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C53D39C1F85E2FC001225B1 /* StringExtensions.swift */; };
16 | 4C8112DD1AFD415200100959 /* WidgetProcess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8112DC1AFD415200100959 /* WidgetProcess.swift */; };
17 | 4C81CAC71A05FCFA0078EC22 /* SMC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C81CAC51A05FCFA0078EC22 /* SMC.swift */; };
18 | 4C81CACB1A05FD140078EC22 /* Battery.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C81CAC91A05FD140078EC22 /* Battery.swift */; };
19 | 4C81CACC1A05FD140078EC22 /* System.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C81CACA1A05FD140078EC22 /* System.swift */; };
20 | 4C87280119C7B41C002D093F /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C87280019C7B41C002D093F /* main.swift */; };
21 | 4C97A53219E4B2F10018EFB6 /* WidgetFan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C97A53119E4B2F10018EFB6 /* WidgetFan.swift */; };
22 | 4C9A7D2019D98D74004ABADA /* WidgetUITitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C9A7D1F19D98D74004ABADA /* WidgetUITitle.swift */; };
23 | 4C9C0E5119E32921009EF6A9 /* WidgetTemperature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C9C0E5019E32921009EF6A9 /* WidgetTemperature.swift */; };
24 | 4CB246C41A5B916F00CA8AC4 /* WidgetSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB246C31A5B916F00CA8AC4 /* WidgetSystem.swift */; };
25 | 4CB246C81A5BAADC00CA8AC4 /* WidgetCPU.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB246C71A5BAADC00CA8AC4 /* WidgetCPU.swift */; };
26 | 4CB246CA1A5BACF200CA8AC4 /* WidgetMemory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB246C91A5BACF200CA8AC4 /* WidgetMemory.swift */; };
27 | 4CCB22A219D4F07B0058E62D /* WidgetUIStat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCB22A119D4F07B0058E62D /* WidgetUIStat.swift */; };
28 | 4CD184881B87E3EB001CF027 /* IOReturn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD184871B87E3EB001CF027 /* IOReturn.swift */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXCopyFilesBuildPhase section */
32 | 4C8727FB19C7B41C002D093F /* CopyFiles */ = {
33 | isa = PBXCopyFilesBuildPhase;
34 | buildActionMask = 2147483647;
35 | dstPath = /usr/share/man/man1/;
36 | dstSubfolderSpec = 0;
37 | files = (
38 | );
39 | runOnlyForDeploymentPostprocessing = 1;
40 | };
41 | /* End PBXCopyFilesBuildPhase section */
42 |
43 | /* Begin PBXFileReference section */
44 | 4C08F2971A94F3C3006F9359 /* Widget.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Widget.swift; sourceTree = "