Skip to content

HexColors60/vibe_winshell

Repository files navigation

🔧 WinShell - Process, File & Network Monitor

A comprehensive system monitor for Windows/Linux built in Rust. Monitor processes, file handles, and network connections in a unified interface.

Language Platform

✨ Features

📊 Process Monitoring

  • Real-time Process List - View all running processes
  • Detailed Information:
    • Process ID (PID)
    • Process Name
    • Memory Usage (auto-formatted: B/KB/MB/GB)
    • CPU Usage (color-coded: green/yellow/red)
    • Parent Process ID
    • Process Status
    • Runtime Duration

📁 File Handle Monitoring (NEW!)

  • Active File Handles - See what files processes have open
  • File Details:
    • Process PID and name
    • Full file path
    • File size (auto-formatted)
    • Access type (Read/Write/Open)
  • Filter by path or process - Quick search functionality

🌐 Network Connection Monitoring (NEW!)

  • Active Connections - View all network connections
  • Connection Details:
    • Process PID and name
    • Protocol (TCP/TCP6/UDP)
    • Local address and port
    • Remote address and port
    • Connection state (color-coded)
  • Close Connections - Disconnect without killing the process
  • Filter by address or process - Easy connection lookup

🎯 Process Management

  • Kill Process - Terminate selected processes
  • Select & Inspect - Click to select and view detailed info
  • Process Hierarchy - View parent-child relationships

🔍 Advanced Features

  • Search/Filter - Filter by process name or PID
  • Sortable Columns - Click headers to sort by any column
  • Auto-Refresh - Automatic updates (configurable: 1s/2s/5s/10s)
  • Custom Refresh Interval - Set any refresh rate (1-60 seconds)
  • Manual Refresh - On-demand process list update
  • Color-Coded CPU - Visual indication of CPU usage levels
  • CSV Export - Export processes/files/network data to CSV files
  • History Graphs - Real-time CPU and memory usage visualization
  • Dark/Light Theme - Toggle between dark and light themes

🎨 User Interface

  • Modern GUI - Built with egui framework
  • Responsive Design - Scrollable process list
  • Keyboard & Mouse - Full interaction support
  • Clean Layout - Easy to read and navigate

🚀 Quick Start

Prerequisites

  • Windows 10 or Windows 11
  • Rust toolchain (install from rustup.rs)

Build & Run

# Navigate to winshell directory
cd winshell

# Build release version (optimized)
cargo build --release

# Run the process manager
cargo run --release

Development Build

# Build debug version (faster compilation)
cargo build

# Run debug version
cargo run

📖 Usage Guide

Main Interface

┌──────────────────────────────────────────────────────────┐
│ 🔧 WinShell Monitor                                      │
│ [📊 Processes] [📁 Files] [🌐 Network]                   │
│ [☀️ Light] [📈 Graphs] [💾 Export CSV]                  │
│ [🔄 Refresh] [✓ Auto-refresh] [⚙️ Interval] [✏️]        │
│ 🔍 Filter: [_______] [❌ Clear]  Total: 234 items       │
├──────────────────────────────────────────────────────────┤
│ === Process View ===                                     │
│ PID ▼ │ Name     │ Memory  │ CPU %  │ Parent │ Status   │
│───────────────────────────────────────────────────────────│
│ 1234  │ chrome   │ 512 MB  │ 45.2%  │ 5678   │ Running  │
│ 5678  │ explorer │ 128 MB  │ 2.1%   │ 1      │ Running  │
│                                                           │
│ === File View ===                                        │
│ PID  │ Process │ File Path               │ Size  │Access │
│───────────────────────────────────────────────────────────│
│ 1234 │ chrome  │ /tmp/cache/data.db     │ 2.5MB │ R/W   │
│ 5678 │ code    │ /home/user/project.txt │ 15KB  │ Open  │
│                                                           │
│ === Network View ===                                     │
│ PID │ Process │ Proto │ Local Addr  │ Remote Addr │State│
│───────────────────────────────────────────────────────────│
│ 1234│ chrome  │ TCP   │ 0.0.0.0:443 │ 1.2.3.4:443 │EST  │
│ 5678│ ssh     │ TCP   │ 0.0.0.0:22  │ 5.6.7.8:1234│EST  │
│                                   [🔌 Close]             │
├──────────────────────────────────────────────────────────┤
│ Selected: chrome (PID: 1234) [🗡️ Kill Process]          │
│ Memory: 512 MB  CPU: 45.2%  Runtime: 1h 23m 45s         │
└──────────────────────────────────────────────────────────┘

Controls

View Tabs

  • 📊 Processes - Show process monitor (default view)
  • 📁 Files - Show file handle monitor
  • 🌐 Network - Show network connection monitor

Top Panel

  • ☀️ Light / 🌙 Dark - Toggle between light and dark themes
  • 📈 Graphs - Toggle CPU/Memory history graphs (Process view only)
  • 💾 Export CSV - Export current view data to CSV file
    • Processes: PID, Name, Memory, CPU%, Parent PID, Status, Runtime
    • Files: PID, Process Name, File Path, Size, Access Type
    • Network: PID, Process Name, Protocol, Addresses, State
  • 🔄 Refresh - Manually update all data
  • Auto-refresh - Toggle automatic updates
  • ⚙️ Interval - Cycle through update intervals (1s → 2s → 5s → 10s)
  • ✏️ - Open custom interval input (1-60 seconds)
  • 🔍 Filter - Search/filter current view
    • Processes: Filter by name or PID
    • Files: Filter by path, process name, or PID
    • Network: Filter by address, process name, or PID
  • ❌ Clear - Clear search filter

Process View

  • Click Column Header - Sort by that column
  • Click Process Row - Select process for actions
  • ▲ ▼ - Sort direction indicators
  • 🗡️ Kill Process - Terminate the selected process

File View

  • View All Open Files - See file handles by process
  • Search by path - Find specific files
  • Monitor file sizes - Track file I/O activity

Network View

  • View All Connections - See active network connections
  • Color-coded states - Visual connection status
    • 🔵 Blue: LISTEN (server socket)
    • 🟢 Green: ESTABLISHED (active connection)
    • ⚪ Gray: Other states
  • 🔌 Close - Close connection without killing process

Bottom Panel

  • Selected Process Info - Details of currently selected process
  • Memory, CPU, Runtime - Real-time stats

Sorting

Click any column header to sort:

  • First click: Sort ascending
  • Second click: Sort descending
  • Default: Sorted by CPU usage (highest first)

Filtering

  • Type in the filter box to search
  • Matches process name or PID
  • Case-insensitive search
  • Real-time filtering as you type

Killing Processes

  1. Click on a process row to select it
  2. Review process details in bottom panel
  3. Click 🗡️ Kill Process button
  4. Process will be terminated if successful

🔧 Technical Details

Architecture

  • GUI Framework: egui/eframe (immediate mode GUI)
  • System Info: sysinfo crate for cross-platform process info
  • Language: Rust (100% safe Rust, no unsafe blocks)

Dependencies

eframe = "0.29"      # GUI framework
egui = "0.29"        # Immediate mode GUI
egui_plot = "0.29"   # Plotting library for graphs
sysinfo = "0.32"     # System/process information
chrono = "0.4"       # Time handling
csv = "1.3"          # CSV export functionality

[Linux]
procfs = "0.16"      # Linux /proc filesystem access

[Windows]
windows = "0.58"     # Windows API bindings

Performance

  • Memory: ~5-10 MB RAM usage
  • CPU: <1% when idle, ~2-5% during refresh
  • Refresh Rate: Configurable 1-10 seconds
  • Binary Size: ~3-5 MB (release build)

Optimization

  • LTO (Link Time Optimization) enabled
  • Single codegen unit for max optimization
  • Release builds are fully optimized

🎯 Features Comparison

Feature WinShell Task Manager Process Explorer
Process List
Kill Process
CPU Usage
Memory Usage
Search/Filter
Auto-Refresh
Custom Refresh Interval
Sortable Columns
File Handle Monitor
Network Monitor
Close Network Connections
CSV Export
CPU/Memory Graphs
Dark/Light Theme
Process Tree ⚠️ Parent PID
DLL Inspection

🛠️ Development

Project Structure

winshell/
├── Cargo.toml          # Project configuration
├── README.md           # This file
└── src/
    └── main.rs         # Main application code

Building for Distribution

# Build optimized release binary
cargo build --release

# Binary location
./target/release/winshell.exe

Code Structure

  • ProcessInfo - Struct holding process data
  • ProcessManagerApp - Main application state
  • SortColumn - Enum for column sorting
  • refresh_processes() - Update process list
  • kill_process() - Terminate process
  • format_memory() - Human-readable memory sizes
  • format_time() - Human-readable runtime

📝 Limitations

  1. Process Tree View - Shows parent PID but not full tree visualization
  2. No Performance Graphs - No historical CPU/memory charts
  3. No DLL Inspection - Can't view loaded modules
  4. Partial Windows Support - File and network monitoring on Windows uses placeholders (Linux has full implementation)
  5. No macOS Support - File/network monitoring not yet implemented for macOS

🔐 Security Notes

  • Requires appropriate permissions to kill processes
  • System processes may require administrator privileges
  • Some processes may be protected and cannot be killed

🚧 Future Enhancements

Possible features for future versions:

  • Process tree visualization
  • CPU/Memory history graphs (✅ Added!)
  • Network connection monitoring (✅ Added!)
  • File handle monitoring (✅ Added!)
  • Export data to CSV (processes/files/network) (✅ Added!)
  • Custom refresh intervals (numeric input) (✅ Added!)
  • Dark/Light theme toggle (✅ Added!)
  • Full Windows API integration for file/network monitoring
  • macOS support for file/network features
  • Disk I/O monitoring per process
  • Process priority adjustment
  • Save/Load process snapshots
  • Process grouping by name
  • Minimize to system tray
  • Hotkey support
  • Bandwidth monitoring per connection
  • DNS resolution for IP addresses

📄 License

This project is open source and available under the MIT License.

🤝 Contributing

Contributions, issues, and feature requests are welcome!

🙏 Credits

  • Built with egui - Immediate mode GUI framework
  • Process info via sysinfo - Cross-platform system info
  • Inspired by Microsoft's Process Explorer

Made with ❤️ and 🦀 Rust

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published