diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-14 13:11:54 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-14 13:11:54 +0200 |
| commit | 2736004ed92e0260153d95bf57b535b4d04ddc00 (patch) | |
| tree | 9bf218ea30c5d074075011b988ba3443b09af3ce /README.md | |
| parent | f2c12f074a224b41ff4e179fd213710f3727bdd3 (diff) | |
update docs
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 112 |
1 files changed, 24 insertions, 88 deletions
@@ -1,12 +1,10 @@ # loadbars - A small and humble tool to observe server loads - +## Description -## Synopsis +Loadbars is a tool that can be used to observe CPU loads of several remote servers at once in real time. It connects with SSH (using SSH public/private key auth) to several servers at once and vizualizes all server CPUs and memory statistics right next each other (either summarized or each core separately). Loadbars is not a tool for collecting CPU loads and drawing graphs for later analysis. However, since such tools require a significant amount of time before producing results, Loadbars lets you observe the current state immediately. Loadbars does not remember or record any load information. It just shows the current CPU usages like top or vmstat does. -``` -loadbars [LIST OF HOSTNAMES] [OPTIONS] -``` + ### Tested platforms @@ -14,37 +12,26 @@ This version of loadbars has been tested on: - Fedora Linux 43 and most modern Linux distributions (RHEL, CentOS, Ubuntu, Debian, etc.) - macOS (Darwin) - localhost monitoring uses native macOS tools (sysctl, vm_stat, netstat, iostat) -**Note:** Remote hosts are assumed to be Linux (using /proc filesystem). When running on macOS, localhost monitoring uses macOS-specific commands, while remote hosts use the Linux script. - -### I like flying elephants +**Note:** Remote hosts are assumed to be Linux (using /proc filesystem). When running on macOS, localhost monitoring uses macOS-specific commands, while remote hosts use the Linux script. So remote hosts only work with Linux. -For any startup params help check out `--help` on command line or `h` during program -execution. +## Build and run -### A few examples however +### SDL2 Dependencies -```bash -loadbars --extended 1 --showcores 1 --height 300 --hosts localhost +Loadbars requires SDL2 for the display window. Install it for your platform: -loadbars --hosts localhost,server1.example.com,server2.example.com +#### Fedora Linux / RHEL / CentOS -loadbars --cluster foocluster (foocluster is in /etc/clusters [ClusterSSH]) +```bash +sudo dnf install SDL2-devel ``` -### More examples, using shell expansion +#### macOS ```bash -loadbars servername{01,02,03}.example.com - -loadbars servername{01..50}.example.com --showcores 1 +brew install sdl2 ``` -## Description - -Loadbars is a tool that can be used to observe CPU loads of several remote servers at once in real time. It connects with SSH (using SSH public/private key auth) to several servers at once and vizualizes all server CPUs and memory statistics right next each other (either summarized or each core separately). Loadbars is not a tool for collecting CPU loads and drawing graphs for later analysis. However, since such tools require a significant amount of time before producing results, Loadbars lets you observe the current state immediately. Loadbars does not remember or record any load information. It just shows the current CPU usages like top or vmstat does. - -## Build and run - ### Using Mage (recommended) Build the binary: @@ -66,54 +53,29 @@ Run tests: mage test ``` -### Using Go directly - -Build from source: - -```bash -go build -o loadbars ./cmd/loadbars -./loadbars --hosts localhost -``` - -Install to $GOPATH/bin: +### I like flying elephants -```bash -go install ./cmd/loadbars -``` +For any startup params help check out `--help` on command line or `h` during program +execution. -Or install the latest version from the repository: +### A few examples however ```bash -go install codeberg.org/snonux/loadbars/cmd/loadbars@latest -``` - -Remote hosts need no Go: the binary embeds the remote script and pipes it to `bash -s` locally or over SSH. Only the single binary needs to be installed. - -## Installation - -### SDL2 Dependencies - -Loadbars requires SDL2 for the display window. Install it for your platform: +loadbars --extended 1 --showcores 1 --height 300 --hosts localhost -#### Fedora Linux / RHEL / CentOS +loadbars --hosts localhost,server1.example.com,server2.example.com -```bash -sudo dnf install SDL2-devel +loadbars --cluster foocluster (foocluster is in /etc/clusters [ClusterSSH]) ``` -#### Ubuntu / Debian +### More examples, using shell expansion ```bash -sudo apt install libsdl2-dev -``` - -#### macOS +loadbars servername{01,02,03}.example.com -```bash -brew install sdl2 +loadbars servername{01..50}.example.com --showcores 1 ``` -**macOS Note:** The window automatically comes to the foreground when launched. No additional helper scripts needed. Localhost monitoring on macOS uses native macOS tools (sysctl, vm_stat, netstat, iostat), while remote hosts are assumed to be Linux. ### Running from Source @@ -137,33 +99,7 @@ Loadbars requires SSH public/private key authentication. Make sure: - Your public key is in ~/.ssh/authorized_keys on remote servers - SSH agent is running (ssh-agent), or passwordless keys are configured -### macOS Usage - -When running loadbars on macOS: - -- **Localhost monitoring** uses macOS native tools (sysctl, vm_stat, netstat, iostat) -- **Remote hosts** are assumed to be Linux (uses the Linux script over SSH) -- **Window activation** is automatic - the SDL window will come to foreground when launched - -**Examples:** - -```bash -# Monitor localhost -./loadbars --showcores --showmem --shownet - -# Monitor remote Linux servers -./loadbars server1.example.com server2.example.com --showcores - -# Monitor both localhost and remotes -./loadbars localhost server1.example.com server2.example.com --showcores -``` - -**Known macOS limitations:** -- Remote macOS hosts are not supported (assumes all remote hosts are Linux) -- Per-core CPU statistics are not available (iostat limitation) -- Swap usage always shows 0 (macOS uses compressed memory differently) - -## Info +## More usage ### Hotkeys @@ -238,7 +174,7 @@ will always show all CPU cores. If you press the 'w' hotkey during program execu See package description or project website. -The Go build of loadbars links to **go-sdl2** (github.com/veandco/go-sdl2), which is licensed under the **BSD-3-Clause** license. That license is compatible with loadbars' use and does not impose additional restrictions on distribution. The full copyright notice and license text for go-sdl2 are in the [NOTICE](NOTICE) file. +The Go build of loadbars links to **go-sdl2** (github.com/veandco/go-sdl2), which is licensed under the **BSD-3-Clause** license. That license is compatible with loadbars' use and does not impose additional restrictions on distribution. The full copyright notice and license text for go-sdl2 are in the [LICENSE](LICENSE) file. ## Author |
