dshb
- macOS system monitor
dshb
[-eu
][-f
frequency]
[-h
]
[-v
]
A macOS system monitor in Swift, inspired by top & htop. Displays live readings of system CPU & memory usage, machine temperature sensors, fan speeds, battery information and other miscellaneous system statistics. The ncurses based TUI (text-based user interface) uses color coating to imply status and is fully resizable. Stats are updated at one second intervals while still maintaining low overhead (the observer effect is inescapable in this case sadly).
List of supported command line options (flags/switchs):
-f
, --frequency
valueStatistic update frequency in seconds. Default is 1.
-h
, --help
Print the list of options.
-u
, --unknown-temperature-sensors
Show temperature sensors whose hardware mapping is unknown.
-v
, --version
Show dshb version.
List of supported interactive commands for use during application runtime:
q
Statistic sections are defined as "widgets" (hence the name dashboard - metaphorically akin to macOS's Dashboard). Widgets are composed of related statistics. Here we look at the various widgets in detail.
Battery
Displays information about the state of the battery. If the machine does not
have a battery, this widget will not appear. The information includes
Charge, Capacity Degradation, Cycles and Time Remaining.
CPU
Displays CPU usage broken down into System, User, Idle and Nice.
Fan
Displays a list of all the fans the machine has with the current speed (RPM - revolutions per minute) of each. All Intel based Macs to this point have at least one fan, with the exception of the newly added fanless MacBook.
Memory
Displays memory usage broken down into Free, Wired, Active, Inactive and Compressed.
System
Miscellaneous system stats including Uptime, Processes & Threads (global counts), Load Average (1, 5 and 15 minute intervals) and Mach Factor (5, 30 and 60 second intervals).
Temperature
Displays a list of the machine temperature sensors in Celsius. The list
is exhaustive when the (-u
) switch is used.
Note that the names of the known sensors may not be mapped to the correct hardware component. In addition, the maximum temperature of each individual sensor is not known. Thus, a global max of 128 degrees is used. This is all due to the fact that the SMC (System Management Controller) has a closed source driver, and thus information about it's inner workings is limited.
If a sensor has a value that is very high, constant, and completely disproportionate to the rest, then there is a chance that it is faulty. This could be due to bad or damaged hardware (liquid on the logic board). Run the Apple Diagnostics (Apple Hardware Test for older machines) diagnostics suite in such a case to confirm.
Some sensors however report very low values, below zero. The current theory on this is that at lower temperatures the sensors have inaccurate readings. It maybe that they are located close to an internal fan, and the airflow is causing it to be skewed.
Due to Swift, dshb requires macOS 10.9 (Mavericks) and above. This implies an Intel based 64-bit machine. Of course, ncurses is required as well, but it should be installed by default as a part of macOS, as base install tools such as top, rely on it as well.
https://github.com/beltex/dshb
All project related matters, including source code, can be found at the GitHub repository listed above. In particular, the issue tracker, which can be used to report feedback, feature requests and bugs.
This project is under the MIT License.
beltex https://beltex.github.io
Working on this always brought a smile to my face. I hope it brings a smile to yours too. Enjoy :)
top(1), htop(1)