Golang Task Manager - text-based UI (TUI) task manager and resource monitor written entirely in Go
- Similar existing tools use
Python
(requires python interpreter) orC
(difficult to work with, when it matters) - Similar existing tools are platform-specific (operating system and/or CPU architecture-restrictive) and compiled or written needing external dependencies
htop
,btop
andtop
are great but don't have everything I need (also platform-specific)- And, I really enjoy writing Go
Also, I totally haven't redesigned this whole project 5 times... definitely not... (... I did)
- I want a task manager and resource monitor with alerts
- Must be usable from a terminal via SSH
- Must be FULLY cross-platform (Linux, Windows & macOS)
- Operate as expected in
BASH
,zsh
,Powershell
&wt
(new microsoft windows terminal packaged with Win11) - Entirely written in "pure" Go (without using cgo)
Please note: I don't plan on supporting cmd
aka conhost.exe
as it does not support unicode. Use Powershell
or wt
instead.
Source Code Structure:
gtm/
├── cmd/
│ └─ main.go
├── scripts/
│ ├─ run.sh
│ ├─ log.sh
│ └─ pprof.sh
├─ config.go
├─ devices.go
├─ log.go
└─ ui.go
This project uses BASH/zsh shell scripts (within scripts/
) to run & build the app:
- For
Linux
ormacOS
, you can just use your standard shell - On
Windows
, you can use Cygwin to get those GNU tools (sh
,ls
,tail
,tree
, ...)
There is a run & build script run.sh
in the root directory of this project and log.sh
uses tail
to track the latest log file entries in your terminal.
cgo
is disabled (CGO_ENABLED=0
) in the run.sh
script. It is not needed for this project, but is a design requirement (as noted above in Requirements) for specific reasons.
This is to ensure I don't accidentally manage to use cgo
and then run into weird, complex issues down the road.
- Go 1.21+
- (Windows Only): Requires Cygwin to run the
run.sh
script. (the script uses cleans up old binaries, etc ... might make aPowershell
script later to get around this)
git clone https://github.com/euheimr/gtm
- Open up a shell:
Powershell
orwt
(Windows)BASH
orzsh
(Linux/macOS)
cd <PROJECT DIRECTORY>
(ie.cd ~/Downloads/gtm
)sh ./scripts/run.sh
You may force a Build & Run the executable even if a binary exists by running:
sh ./scripts/run.sh build
or sh ./scripts/run.sh -b
You may also ONLY force a Build and NOT run the executable by running:
sh ./scripts/run.sh build-only
or sh ./scripts/run.sh -bo
- CPU -
gopsutil
- Device data
- UI
- bars
- graphs
- alerts (over-temp)
- Disk -
gopsutil
- Device data
- UI
- bars
- graphs
- GPU -
nvidia-smi
&rocm-smi
- Device data
- UI
- bars
- graphs
- alerts (over-temp)
- Memory -
gopsutil
- Device data
- UI
- bars
- graphs
- alerts (excessive paging / usage >85%)
- Networking -
gopsutil
- Device data (all interfaces)
- UI
- bars
- graphs (braille like
htop
?)
- Processes -
gopsutil
- Device data
- UI
- Table
- Tree view
- Control
- Kill
- Priority
- Open file location
- Awesome Go - curated list of awesome Go frameworks, libraries, and software
- Logging in Go with Slog - structured logging
- pprof - performance profiling - profiling go code with pprof
- nvidia-smi - command line interface (CLI) utility for management and monitoring of NVIDIA GPU devices
- rocm-smi - CLI tool for telemetry / monitoring AMD devices
- ZanMax/gpu-stats - a project using
nvidia-smi
&rocm-smi
I'm not taking pull requests for now, but will personally take on reported issues.
I will change this in the future (sorry, not ready for this yet).