Skip to content

Simple Terminal UI to monitor processes like a stats curse script, htop and others.

License

Notifications You must be signed in to change notification settings

aggstam/tui-monitor

Repository files navigation

tui-monitor

Simple Terminal UI to monitor processes like a custom stats curse script, htop and others.
Two scripts are provided:

Name Description
monitor.sh TUI tmux script to monitor multiple processes
stats_curse.sh Curse script to monitor system information and others, based on Bash Simple Curses

Dependencies

The following packages must be installed in your system:

  1. tmux
  2. htop
  3. cava
  4. curl
  5. lm-sensors
  6. nvidia-settings
  7. smartctl
  8. udisksctl

All package names provided are for Gentoo, so the naming in different distros may vary.
We are using Bash Simple Curses[1] repo as a git submodule, so on initial pull:

% git submodule update --init

To pull updates:

% git pull --recurse-submodules

Configuration

This section describes all the configuration needed to create your monitorring dashboard.

monitor.sh

Script contains 3 processes to monitor:

  1. stats_curse.sh script
  2. htop
  3. cava

Since this is a normal tmux script, you can add more processes to monitor.
Don't forget to configure panes sizes for a nicer output.
Example dashboard:

Screenshot

stats_curse.sh

Script uses Open-Meteo API[2] to retrieve current weather information, so we must provide our latitude and longitude at lines 31 and 32. Example:

lat=52.52
long=13.41

Now we can configure what we want to display in our window inside main function at line 217!
Default configuration dispays basic system info like user, hostname, time, date and weather.
Additionally we have system temperatures, like CPU, GPU and disks temperatures.
A function to retrieve each component type temperature is provided, so you need to configure devices accordingly and append their records in main function.

You can remove or add anything you want!

Execution

Both scripts can be executed by using their name:

% ./monitor.sh
# ./stats_curse.sh

We unfortunately need su priviledges to execute smartctl command, which is used to retrieve NVMe drives temperatures.
Feel free to suggest a non su utility to replace smartctl, and/or remove it entirely if you don't use NVMe drives.

References

[1] Bash Simple Curses: https://github.com/metal3d/bashsimplecurses
[2] Open-Meteo: https://open-meteo.com/

About

Simple Terminal UI to monitor processes like a stats curse script, htop and others.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages