Top Related Projects
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
A monitor of resources
htop - an interactive process viewer
Terminal-based CPU stress and monitoring utility
A terminal based graphical activity monitor inspired by gtop and vtop
Yet another cross-platform graphical process/system monitor.
Quick Overview
gotop is a terminal-based system monitor written in Go. It provides a graphical interface for monitoring system resources such as CPU, memory, disk usage, and network activity in real-time. The project aims to be a more visually appealing and feature-rich alternative to traditional command-line monitoring tools.
Pros
- Intuitive and visually appealing interface with colorful graphs and charts
- Lightweight and efficient, consuming minimal system resources
- Cross-platform support for Linux, macOS, and Windows
- Customizable layout and color schemes
Cons
- Limited configuration options compared to some more advanced monitoring tools
- May not provide as detailed information as specialized tools for specific metrics
- Requires terminal with Unicode and color support for optimal display
Getting Started
To install gotop, you can use one of the following methods:
- Using Go:
go install github.com/cjbassi/gotop@latest
- Using Homebrew (macOS and Linux):
brew install gotop
- Download pre-built binaries from the releases page.
To run gotop, simply execute the following command in your terminal:
gotop
You can customize the layout and appearance using command-line flags. For example:
gotop -c monokai # Use the monokai color scheme
gotop -l minimal # Use the minimal layout
For more options and customization, refer to the project's documentation on GitHub.
Competitor Comparisons
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Pros of Glances
- More comprehensive system monitoring, including network, disk I/O, and processes
- Cross-platform support (Linux, macOS, Windows)
- Extensible plugin system for custom metrics
Cons of Glances
- Heavier resource usage due to more features
- More complex configuration and setup
- Less focus on visual aesthetics compared to Gotop
Code Comparison
Gotop (main.go):
func main() {
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}
Glances (glances.py):
def main():
args = init_args()
glances_processes = GlancesProcesses()
glances_monitor = GlancesMonitor(config=args.config)
glances_stats = GlancesStats(config=args.config,
args=args,
processes=glances_processes,
monitor=glances_monitor)
The code comparison shows that Glances has a more complex initialization process, reflecting its broader feature set, while Gotop has a simpler main function, focusing on a streamlined experience.
A monitor of resources
Pros of btop
- More feature-rich with advanced CPU, memory, network, and process monitoring
- Highly customizable interface with themes and color schemes
- Cross-platform support (Linux, macOS, FreeBSD, OpenBSD)
Cons of btop
- Higher resource usage due to more complex features
- Steeper learning curve for configuration and customization
Code Comparison
btop (C++):
void Cpu::draw(int h, bool force) {
if (h < 1) return;
if (force) redraw = true;
if (not redraw and not Config::getB("cpu_bottom")) return;
// ... (implementation details)
}
gotop (Go):
func (self *Cpu) Update() {
self.Percent = cpuPercent(time.Second, false)
for i := range self.Percent {
self.Data[i] = int(self.Percent[i])
}
}
Summary
btop offers a more comprehensive system monitoring solution with advanced features and customization options, while gotop provides a simpler, lightweight alternative. btop's C++ implementation allows for more complex functionality, but may consume more resources. gotop's Go-based approach focuses on simplicity and efficiency. Choose btop for detailed system analysis and customization, or gotop for a straightforward, resource-friendly monitoring tool.
htop - an interactive process viewer
Pros of htop
- More mature and widely used project with a larger community
- Offers more detailed system information and process management capabilities
- Supports a wider range of Unix-like systems, including Linux, FreeBSD, and macOS
Cons of htop
- Written in C, which may be less approachable for some developers compared to Go
- Requires ncurses library, potentially making it more challenging to install on some systems
- User interface can be more complex and overwhelming for new users
Code Comparison
htop (C):
void Process_writeCommand(Process* this, int writeCommAs) {
char command[MAX_CMDLINE];
int baseProcessId = (this->tgid == this->pid) ? this->pid : this->tgid;
const char* comm = Process_getCommand(this);
// ... (additional code)
}
gotop (Go):
func (p *Process) WriteCommand(w io.Writer) {
cmd := p.Comm
if len(p.Cmdline) > 0 {
cmd = strings.Join(p.Cmdline, " ")
}
fmt.Fprintf(w, "%s", cmd)
}
Both projects aim to provide system monitoring capabilities, but htop offers more advanced features and wider system support. gotop, being written in Go, may be more accessible for Go developers and easier to distribute as a single binary. The code comparison shows htop's C implementation handling more complex scenarios, while gotop's Go code is more concise and straightforward.
Terminal-based CPU stress and monitoring utility
Pros of s-tui
- Written in Python, making it more accessible for contributions and modifications
- Focuses specifically on stress testing and monitoring, providing detailed CPU information
- Offers a customizable stress test feature
Cons of s-tui
- Limited to CPU monitoring, while gotop provides a more comprehensive system overview
- Less visually appealing interface compared to gotop's modern design
- Slower performance due to being written in Python instead of Go
Code Comparison
s-tui (Python):
def get_cpu_freq():
cpu_freq = psutil.cpu_freq()
return cpu_freq.current if cpu_freq else None
gotop (Go):
func getCPUFreq() float64 {
freq, err := cpu.Percent(time.Second, false)
if err != nil {
return 0
}
return freq[0]
}
Both projects aim to provide system monitoring capabilities, but they differ in their focus and implementation. s-tui specializes in CPU monitoring and stress testing, making it ideal for users who need detailed CPU information and performance testing. gotop, on the other hand, offers a more comprehensive system overview with a modern interface, making it suitable for general system monitoring tasks.
The choice between the two depends on the user's specific needs and preferences. s-tui is better for in-depth CPU analysis and stress testing, while gotop is more suitable for users who want a visually appealing and comprehensive system monitoring tool.
A terminal based graphical activity monitor inspired by gtop and vtop
Pros of gotop (xxxserxxx)
- Actively maintained with regular updates and bug fixes
- Supports more customization options and themes
- Includes additional features like process filtering and sorting
Cons of gotop (xxxserxxx)
- Slightly higher resource usage due to added features
- May have a steeper learning curve for new users
- Some users report occasional stability issues
Code Comparison
gotop (cjbassi):
func (self *Proc) update() {
pid := self.Pid
proc, err := process.NewProcess(pid)
if err != nil {
self.Dead = true
return
}
// ... (additional code)
}
gotop (xxxserxxx):
func (p *Proc) update() error {
proc, err := process.NewProcess(p.Pid)
if err != nil {
return err
}
p.Command, err = proc.Cmdline()
if err != nil {
return err
}
// ... (additional code)
}
The xxxserxxx version includes error handling and returns errors, while the cjbassi version sets a "Dead" flag. The xxxserxxx implementation also retrieves the command line, providing more detailed process information.
Yet another cross-platform graphical process/system monitor.
Pros of bottom
- More actively maintained with frequent updates
- Offers a wider range of customization options
- Supports more operating systems, including Windows
Cons of bottom
- Higher resource usage due to being written in Rust
- Steeper learning curve for configuration and advanced features
- Larger binary size compared to gotop
Code Comparison
bottom (Rust):
let mut app = App::default();
app.run(&mut terminal, &mut events, &config)?;
gotop (Go):
proc := NewProc()
proc.UpdateProcs()
bottom uses a more object-oriented approach with a central App
struct, while gotop employs a more procedural style. bottom's code structure allows for easier extensibility and customization, but may be more complex for simple use cases.
Both projects aim to provide a terminal-based system monitoring tool, but bottom offers more features and customization at the cost of increased complexity and resource usage. gotop, being written in Go, has a smaller footprint and simpler codebase, making it potentially more suitable for resource-constrained environments or users who prefer a more straightforward tool.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
NO LONGER MAINTAINED. A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop.
Another terminal based graphical activity monitor, inspired by gtop and vtop, this time written in Go!
Installation
Working and tested on Linux, FreeBSD and macOS. Windows support is planned. OpenBSD works with some caveats.
Source
go get github.com/cjbassi/gotop
Prebuilt binaries
Note: Doesn't require Go.
Clone the repo and then run scripts/download.sh to download the correct binary for your system from the releases tab:
git clone --depth 1 https://github.com/cjbassi/gotop /tmp/gotop
/tmp/gotop/scripts/download.sh
Then move gotop
into your $PATH
somewhere.
Arch Linux
Install gotop
, gotop-bin
, or gotop-git
from the AUR.
FreeBSD
pkg install gotop
Homebrew
brew tap cjbassi/gotop
brew install gotop
Snap
snap install gotop-cjbassi
Note: You may need to enable certain permissions for all of the widgets to work:
snap connect gotop-cjbassi:hardware-observe
snap connect gotop-cjbassi:mount-observe
snap connect gotop-cjbassi:system-observe
Usage
Keybinds
- Quit:
q
or<C-c>
- Process navigation
k
and<Up>
: upj
and<Down
: down<C-u>
: half page up<C-d>
: half page down<C-b>
: full page up<C-f>
: full page downgg
and<Home>
: jump to topG
and<End>
: jump to bottom
- Process actions:
<Tab>
: toggle process groupingdd
: kill selected process or group of processes
- Process sorting
c
: CPUm
: Memp
: PID
- CPU and Mem graph scaling:
h
: scale inl
: scale out
?
: toggles keybind help menu
Mouse
- click to select process
- mouse wheel to scroll through processes
Colorschemes
gotop ships with a few colorschemes which can be set with the -c
flag followed by the name of one. You can find all the colorschemes in the colorschemes folder.
To make a custom colorscheme, check out the template for instructions and then use default.json as a starter. Then put the file at ~/.config/gotop/<name>.json
and load it with gotop -c <name>
. Colorschemes PR's are welcome!
CLI Options
-c
, --color=NAME
Set a colorscheme.
-m
, --minimal
Only show CPU, Mem and Process widgets.
-r
, --rate=RATE
Number of times per second to update CPU and Mem widgets [default: 1].
-V
, --version
Print version and exit.
-p
, --percpu
Show each CPU in the CPU widget.
-a
, --averagecpu
Show average CPU in the CPU widget.
-s
, --statusbar
Show a statusbar with the time.
-b
, --battery
Show battery level widget (minimal
turns off). preview
-i
, --interface=NAME
Select network interface [default: all].
Built With
Stargazers over time
Top Related Projects
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
A monitor of resources
htop - an interactive process viewer
Terminal-based CPU stress and monitoring utility
A terminal based graphical activity monitor inspired by gtop and vtop
Yet another cross-platform graphical process/system monitor.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot