Convert Figma logo to code with AI

Abdenasser logoneohtop

💪🏻 Blazing-fast system monitoring for your desktop (built with Rust, Tauri & Svelte)

6,002
185
6,002
20

Top Related Projects

22,424

A monitor of resources

6,900

htop - an interactive process viewer

27,435

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.

2,159

A TUI system monitor written in Rust

11,040

Yet another cross-platform graphical process/system monitor.

9,762

System monitoring dashboard for terminal

Quick Overview

Neohtop is a modern, customizable system monitoring tool for Linux, inspired by htop and built with Rust. It provides a terminal-based user interface for monitoring system resources, processes, and performance metrics in real-time.

Pros

  • Built with Rust, offering improved performance and memory safety compared to traditional tools
  • Customizable interface with themes and layout options
  • Provides detailed system information and process management capabilities
  • Cross-platform support for various Linux distributions

Cons

  • Limited to Linux systems, not available for Windows or macOS
  • May require additional setup or dependencies compared to pre-installed tools like top
  • Still in development, potentially lacking some advanced features of more established tools
  • Learning curve for users accustomed to traditional monitoring tools

Code Examples

// Initialize Neohtop
let mut neohtop = Neohtop::new();

// Set custom theme
neohtop.set_theme(Theme::Dark);

// Configure display options
neohtop.set_display_options(DisplayOptions {
    show_cpu: true,
    show_memory: true,
    show_processes: true,
});

// Run Neohtop
neohtop.run();
// Filter processes by name
let filtered_processes = neohtop.filter_processes("firefox");

// Sort processes by CPU usage
neohtop.sort_processes(SortCriteria::CpuUsage);

// Kill a specific process
neohtop.kill_process(1234);
// Export system information to JSON
let system_info = neohtop.export_system_info();
let json_output = serde_json::to_string(&system_info).unwrap();
println!("{}", json_output);

Getting Started

To get started with Neohtop, follow these steps:

  1. Install Rust and Cargo if not already installed.
  2. Clone the repository:
    git clone https://github.com/Abdenasser/neohtop.git
    
  3. Navigate to the project directory:
    cd neohtop
    
  4. Build and run Neohtop:
    cargo build --release
    ./target/release/neohtop
    

Once running, use the arrow keys to navigate, 'F1' for help, and 'q' to quit.

Competitor Comparisons

22,424

A monitor of resources

Pros of btop

  • More comprehensive system monitoring, including CPU, memory, disks, and network
  • Highly customizable with themes and layout options
  • Supports a wider range of operating systems, including Linux, macOS, and FreeBSD

Cons of btop

  • Larger codebase and potentially higher resource usage
  • Steeper learning curve due to more advanced features and options
  • May be overkill for users seeking a simple, lightweight monitoring tool

Code Comparison

btop (C++):

void Cpu::collect(bool no_update) {
    if (no_update) return;
    vector<long long> cpu_times = get_cputimes();
    if (cpu_times.empty()) return;
    // ... (additional processing)
}

neohtop (Go):

func (c *CPU) Collect() {
    times, _ := cpu.Times(false)
    c.Usage = times[0]
    // ... (additional processing)
}

Summary

btop offers a more feature-rich and customizable system monitoring experience, supporting multiple operating systems. However, it may be more complex and resource-intensive compared to neohtop. neohtop, written in Go, provides a simpler and potentially more lightweight alternative, focusing primarily on CPU monitoring. The choice between the two depends on the user's specific needs and preferences for system monitoring tools.

6,900

htop - an interactive process viewer

Pros of htop

  • More mature and established project with a larger user base
  • Wider range of features and customization options
  • Better documentation and community support

Cons of htop

  • Larger codebase, potentially more complex to maintain
  • May have a steeper learning curve for new contributors
  • Less focus on modern UI design and aesthetics

Code Comparison

htop:

void Process_delete(Process* this) {
   if (this->cmdline) {
      free(this->cmdline);
   }
   free(this);
}

neohtop:

impl Drop for Process {
    fn drop(&mut self) {
        if let Some(cmdline) = self.cmdline.take() {
            drop(cmdline);
        }
    }
}

The code comparison shows a difference in language and memory management approach. htop uses C with manual memory deallocation, while neohtop uses Rust with its built-in drop mechanism for automatic resource cleanup.

htop is a more established project with a broader feature set and larger community. However, neohtop, being written in Rust, may offer better memory safety and a more modern approach to system monitoring. The choice between the two depends on specific needs, familiarity with the languages, and preference for established vs. newer technologies.

27,435

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, and sensor information
  • Cross-platform support (Linux, macOS, Windows)
  • Extensive plugin system for customization and additional features

Cons of Glances

  • Heavier resource usage due to more extensive monitoring capabilities
  • More complex configuration and setup process
  • Steeper learning curve for advanced features and customization

Code Comparison

Glances (Python):

from glances_api import GlancesApi

glances = GlancesApi(host='localhost', port=61208)
cpu_percent = glances.getCpu()['total']
print(f"CPU Usage: {cpu_percent}%")

Neohtop (Go):

package main

import "github.com/Abdenasser/neohtop/pkg/htop"

func main() {
    cpuUsage := htop.GetCPUUsage()
    fmt.Printf("CPU Usage: %.2f%%\n", cpuUsage)
}

Both projects aim to provide system monitoring capabilities, but Glances offers a more comprehensive solution with cross-platform support and extensive customization options. Neohtop, on the other hand, focuses on simplicity and lightweight operation, making it a good choice for users who need basic system information with minimal resource overhead. The code examples demonstrate the different approaches: Glances uses a client-server model with an API, while Neohtop provides direct access to system information through Go functions.

2,159

A TUI system monitor written in Rust

Pros of ytop

  • Written in Rust, offering better performance and memory safety
  • Supports more operating systems, including Windows
  • Has a more extensive feature set, including process management

Cons of ytop

  • Less customizable interface compared to neohtop
  • Larger binary size due to Rust compilation
  • Development appears to be less active, with fewer recent updates

Code Comparison

ytop (Rust):

pub fn new() -> Result<Widgets> {
    Ok(Widgets {
        cpu: Cpu::new()?,
        mem: Mem::new()?,
        temp: Temp::new()?,
        disk: Disk::new()?,
        net: Net::new()?,
    })
}

neohtop (Go):

func NewApp() *App {
    return &App{
        CPU:     cpu.New(),
        Memory:  mem.New(),
        Network: net.New(),
        Disk:    disk.New(),
        Process: proc.New(),
    }
}

Both projects aim to provide system monitoring functionality, but they differ in implementation language and specific features. ytop offers broader OS support and potentially better performance due to Rust, while neohtop focuses on a more customizable interface and active development in Go.

11,040

Yet another cross-platform graphical process/system monitor.

Pros of bottom

  • Written in Rust, offering better performance and memory safety
  • More comprehensive system monitoring, including network and disk I/O
  • Customizable interface with themes and layout options

Cons of bottom

  • Larger binary size due to Rust compilation
  • Steeper learning curve for users unfamiliar with Rust
  • May require more system resources compared to neohtop

Code Comparison

bottom (Rust):

pub fn get_cpu_data_list() -> Vec<CpuData> {
    let cpus = sys_info::cpu_num().unwrap();
    let mut cpu_data_list = Vec::with_capacity(cpus as usize);
    for i in 0..cpus {
        cpu_data_list.push(CpuData::new(i));
    }
    cpu_data_list
}

neohtop (Python):

def get_cpu_percent(interval=0.1):
    return psutil.cpu_percent(interval=interval, percpu=True)

def get_cpu_freq():
    return psutil.cpu_freq(percpu=True)

The code snippets demonstrate the language difference between the two projects. bottom uses Rust's strong typing and memory management, while neohtop leverages Python's simplicity and readability. bottom's implementation may offer better performance, but neohtop's code is more concise and easier to understand for Python developers.

9,762

System monitoring dashboard for terminal

Pros of gtop

  • More mature project with a larger user base and longer development history
  • Supports a wider range of operating systems, including Windows
  • Offers more customization options and keyboard shortcuts

Cons of gtop

  • Written in JavaScript, which may have performance implications for resource-intensive monitoring
  • Requires Node.js and npm for installation, potentially increasing setup complexity
  • Less frequently updated compared to neohtop

Code Comparison

gtop (JavaScript):

const blessed = require('blessed');
const contrib = require('blessed-contrib');
const screen = blessed.screen();
const grid = new contrib.grid({rows: 12, cols: 12, screen: screen});

neohtop (Python):

import psutil
import curses
from datetime import datetime
from collections import deque

Summary

gtop is a more established project with broader OS support and customization options. However, it relies on JavaScript and Node.js, which may impact performance and ease of installation. neohtop, being newer and written in Python, potentially offers better performance and simpler setup, but has a smaller feature set and community. The choice between them depends on specific needs, preferred language, and desired level of customization.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

NeoHtop Logo

NeoHtop

A modern, cross-platform system monitor built on top of Svelte, Rust, and Tauri.

License GitHub stars GitHub issues GitHub release Notarized by Apple

NeoHtop Screenshot

If you find this project helpful, consider buying me a coffee:

Buy Me A Coffee

Or sponsor me on GitHub:

Sponsor @abdenasser

Table of Contents

Why NeoHtop?

Read about the back story and motivation behind NeoHtop

Features

  • 🚀 Real-time process monitoring
  • 💻 CPU and Memory usage tracking
  • 🎨 Beautiful, modern UI with dark/light themes
  • 🔍 Advanced process search and filtering
  • 📌 Pin important processes
  • 🛠 Process management (kill processes)
  • 🎯 Sort by any column
  • 🔄 Auto-refresh system stats

Search Functionality

Search for processes by name, command, or PID. Use commas to search for multiple terms simultaneously. Regular expressions are supported for advanced filtering.

Examples:

  • arm, x86: Returns processes with "arm" or "x86" in the name or command
  • d$: Lists daemons (processes ending with 'd')
  • ^(\w+\.)+\w+$: Shows processes with reverse domain name notation (e.g., com.docker.vmnetd)

Tech Stack

  • Frontend: SvelteKit, TypeScript
  • Backend: Rust, Tauri
  • Styling: CSS Variables for theming
  • Icons: FontAwesome

Getting Started

Prerequisites

  • Node.js (v16 or later)
  • Rust (latest stable)
  • Xcode Command Line Tools (for macOS)

Installation

Download the latest release from the releases page.

Running with Sudo

Some processes require monitoring with sudo privileges. To monitor these processes, launch NeoHtop with sudo:

  • macOS: sudo /Applications/NeoHtop.app/Contents/MacOS/NeoHtop
  • Linux: pkexec /path/to/neohtop (recommended)

Development

Setup

# Install dependencies
npm install

# Run in development mode
npm run tauri dev

# Build for production
npm run tauri build

Code Formatting

We use Prettier for web code and cargo fmt for Rust code.

# Format all files
npm run format

# Check formatting without making changes
npm run format:check

Pull Requests

Before submitting a PR, ensure:

  1. All code is formatted (npm run format)
  2. The format check passes (npm run format:check)
  3. Your commits follow the project's commit message conventions

Contributing

We welcome contributions! Please see our contributing guidelines for more information.

License

This project is licensed under the MIT License - see the LICENSE file for details.