Skip to content

guicybercode/monitor_tui_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SysTUI

SysTUI Go Rust License

A powerful terminal-based system monitoring and management tool for Linux

Overview

SysTUI is an advanced Text User Interface (TUI) application designed for Linux power users who prefer working directly in the terminal. Built with Go and Rust, it provides real-time system monitoring, process management, service control, network monitoring, package management, and efficient log analysis capabilities.

Features

🎯 Core Functionality

  • πŸ“Š Interactive Dashboard - Real-time monitoring of CPU, RAM, disk, and network usage
  • πŸ”§ Process Management - List, kill, and renice processes with an intuitive interface
  • βš™οΈ Systemd Service Control - Start, stop, and restart services seamlessly
  • 🌐 Network Monitor - View active connections, open ports, and traffic per interface
  • πŸ“ Config Editor - Edit configuration files with syntax highlighting support
  • πŸ“¦ Package Manager - Visual interface for apt, dnf, or pacman with auto-detection
  • πŸ“„ Log Analysis - Efficient log parsing powered by Rust for large files like /var/log/syslog and journalctl
  • πŸ“€ Report Export - Generate detailed reports in JSON or Markdown format

πŸš€ Advanced Features

  • πŸ”Œ WebAssembly Plugin Support - Extensible architecture via WASM plugins
  • 🌍 Headless API Mode - Expose metrics via REST API for integration with other tools
  • ⚑ High Performance - Rust-powered log parsing for handling large files efficiently
  • 🎨 Beautiful TUI - Modern interface built with Bubbletea and Lipgloss

Installation

Prerequisites

  • Go 1.21 or later
  • Rust toolchain (for building the log parser)
  • Linux system with systemd
  • Build tools (gcc, make)

Build from Source

git clone https://github.com/guicybercode/systui.git
cd systui
make build

The binary will be available at ./systui.

Quick Start

./systui

For headless API mode:

./systui --headless --port 8080

Usage

TUI Mode

Launch SysTUI and use the following keyboard shortcuts:

  • 1-6: Switch between views (Dashboard, Processes, Services, Network, Packages, Logs)
  • j/k or ↑/↓: Navigate lists
  • d: Kill selected process
  • s: Start selected service
  • x: Stop selected service
  • t: Restart selected service
  • r: Refresh current view
  • q or Ctrl+C: Quit

Headless API Mode

Start the API server:

./systui --headless --port 8080

Available endpoints:

  • GET /metrics - Get system metrics (CPU, memory, disk)
  • GET /processes - List all processes
  • GET /services - List all systemd services
  • GET /network - Get network statistics and connections
  • GET /report - Generate full system report

Example:

curl http://localhost:8080/metrics

Export Reports

Export functionality is available programmatically or can be integrated into the TUI. Reports include:

  • CPU metrics and per-core usage
  • Memory usage statistics
  • Disk usage and partition information
  • Process list with resource usage
  • Service status
  • Network interface statistics

Architecture

SysTUI
β”œβ”€β”€ Go Components (TUI & System Integration)
β”‚   β”œβ”€β”€ Dashboard - Real-time metrics display
β”‚   β”œβ”€β”€ Process Manager - Process listing and control
β”‚   β”œβ”€β”€ Service Manager - Systemd integration
β”‚   β”œβ”€β”€ Network Monitor - Connection and traffic monitoring
β”‚   β”œβ”€β”€ Package Manager - Multi-distro package support
β”‚   └── Log Viewer - Integration with Rust parser
β”‚
β”œβ”€β”€ Rust Components (Performance-Critical)
β”‚   └── Log Parser - Efficient parsing with nom/regex
β”‚       - Date filtering
β”‚       - Severity filtering
β”‚       - Regex pattern matching
β”‚
β”œβ”€β”€ WebAssembly Runtime
β”‚   └── Plugin System - Extensible via WASM plugins
β”‚
└── API Server
    └── REST API - Headless mode metrics endpoint

Log Analysis

The Rust-powered log parser supports:

  • Large File Handling - Efficiently processes files like /var/log/syslog
  • Date Filtering - Filter logs by date range
  • Severity Filtering - Filter by ERROR, WARN, INFO, DEBUG
  • Regex Search - Advanced pattern matching

Package Manager Support

SysTUI automatically detects your Linux distribution's package manager:

  • APT - Debian/Ubuntu systems
  • DNF - Fedora/RHEL systems
  • Pacman - Arch Linux systems

Development

Project Structure

golang_project/
β”œβ”€β”€ cmd/systui/          # Main entry point
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ tui/             # TUI components
β”‚   β”œβ”€β”€ system/          # System metrics collectors
β”‚   β”œβ”€β”€ logparser/       # Go-Rust FFI bindings
β”‚   β”œβ”€β”€ api/             # Headless API server
β”‚   β”œβ”€β”€ plugins/wasm/    # WASM runtime
β”‚   └── exports/         # Report export functionality
β”œβ”€β”€ rust/                # Rust log parser module
└── plugins/example/     # Example WASM plugin

Building

make build          # Build both Go and Rust components
make build-go       # Build only Go components
make build-rust     # Build only Rust components
make run            # Build and run
make clean          # Clean build artifacts

Testing

make test           # Run all tests

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.

Acknowledgments


그듀이 μ‚¬λ„μ˜ κ°€λ₯΄μΉ¨μ„ λ°›μ•„ μ„œλ‘œ κ΅μ œν•˜λ©° 떑을 λ–Όλ©° κΈ°λ„ν•˜κΈ°λ₯Ό μ „ν˜€ νž˜μ“°λ‹ˆλΌ - 사도행전 2:42

About

SysTUI is an advanced Text User Interface (TUI) application designed for Linux power users who prefer working directly in the terminal. Built with Go and Rust, it provides real-time system monitoring, process management, service control, network monitoring, package management, and efficient log analysis capabilities.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors