Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions submissions/SysMonit/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# System Analyzer

A comprehensive cross-platform system analysis tool with CLI/TUI interface for Windows, Linux, and macOS.

## 🚀 Quick Start

### Option 1: Automatic Installation
```bash
python install.py
```

### Option 2: Manual Installation
```bash
pip install psutil rich
python main.py
```

## 📋 Features

### 🗄️ Storage Analyzer
- Disk usage analysis with visual indicators
- Large file finder with customizable size filters
- Directory size analysis and comparison
- Cross-platform drive/partition detection

### 🌐 Network Analyzer
- Network interface information and status
- Port scanner with common service detection
- Ping test with detailed response times
- Active network connections monitoring

### 📊 Task Manager
- Process list with CPU/memory usage sorting
- Real-time system resource monitoring
- Process search and termination
- Live process monitoring with auto-refresh

### 🖥️ System Monitor
- Complete system information display
- CPU details with per-core usage
- Memory and swap usage monitoring
- Disk I/O statistics
- Temperature and fan sensor readings
- Real-time system performance dashboard

## 💻 System Requirements

- Python 3.6 or higher
- Works on Windows, Linux, and macOS
- Administrator/root privileges recommended for full functionality

## 🔧 Installation Files

- `main.py` - Main application entry point
- `storage_analyzer.py` - Storage analysis module
- `network_analyzer.py` - Network analysis module
- `task_manager.py` - Process and task management
- `system_monitor.py` - System monitoring and information
- `install.py` - Automated installation script
- `requirements.txt` - Python dependencies

## 🎯 Usage Examples

### Launch the application
```bash
python main.py
```

## 🛡️ Security Features

- Safe process termination with confirmation
- Non-destructive analysis operations
- Permission handling for restricted areas
- Error handling for access denied scenarios

## 🔍 Key Capabilities

- **Storage Analysis**: Find space-consuming files and directories
- **Network Diagnostics**: Test connectivity and scan for open ports
- **Performance Monitoring**: Track CPU, memory, and disk usage
- **Process Management**: View and manage running applications

## 📈 Visual Interface

- Color-coded status indicators (🟢🟡🔴)
- Rich text formatting and tables
- Real-time updating displays
- Intuitive menu navigation
- Progress bars for long operations

## 🐛 Troubleshooting

### Common Issues

**Permission Errors**: Run as administrator/root for full access to system information

**Missing Dependencies**:
```bash
pip install --user psutil rich
```

**Python Not Found**: Ensure Python 3.6+ is installed and in PATH

### Platform-Specific Notes

- **Windows**: Some features require administrator privileges
- **Linux**: Temperature sensors may require root access
- **macOS**: Some system information requires elevated permissions

## 📚 Dependencies

- `psutil` - System and process utilities
- `rich` - Rich text and beautiful formatting

## 🎨 Interface Highlights

- Clean, modern terminal interface
- Beginner-friendly navigation
- Comprehensive system analysis
- Cross-platform compatibility
- Real-time monitoring capabilities

---

**Note**: For demo please look on this video: https://drive.google.com/file/d/1BuWdgPXkkFybzn3-TuEyxlZiC1it8Ka2/view?usp=sharing
91 changes: 91 additions & 0 deletions submissions/SysMonit/install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

import subprocess
import sys
import os
import platform

def run_command(cmd, check=True):
try:
result = subprocess.run(cmd, shell=True, check=check, capture_output=True, text=True)
return result.returncode == 0
except subprocess.CalledProcessError:
return False

def install_dependencies():
print("🔧 Installing System Analyzer...")
print("📦 Installing Python dependencies...")

pip_commands = ['pip3 install -r requirements.txt', 'pip install -r requirements.txt']

for cmd in pip_commands:
if run_command(cmd, check=False):
print("✅ Dependencies installed successfully!")
return True

print("❌ Failed to install dependencies")
print("Please manually run: pip install psutil rich")
return False

def create_launcher():
system = platform.system()

if system == "Windows":
launcher_content = """@echo off
python main.py
pause
"""
with open("system_analyzer.bat", "w") as f:
f.write(launcher_content)
print("✅ Created system_analyzer.bat launcher")

else:
launcher_content = """#!/bin/bash
python3 main.py
"""
with open("system_analyzer.sh", "w") as f:
f.write(launcher_content)

os.chmod("system_analyzer.sh", 0o755)
print("✅ Created system_analyzer.sh launcher")

def main():
print("=" * 50)
print("🖥️ SYSTEM ANALYZER INSTALLER")
print("=" * 50)

if not os.path.exists("main.py"):
print("❌ main.py not found!")
print("Please make sure all files are in the same directory")
return

if not os.path.exists("requirements.txt"):
print("❌ requirements.txt not found!")
return

if install_dependencies():
create_launcher()

print("\n🎉 Installation complete!")
print("\n📋 To run the System Analyzer:")

if platform.system() == "Windows":
print(" • Double-click system_analyzer.bat")
print(" • Or run: python main.py")
else:
print(" • Run: ./system_analyzer.sh")
print(" • Or run: python3 main.py")

print("\n🔧 Features included:")
print(" • Storage Analyzer (disk usage, large files)")
print(" • Network Analyzer (ports, ping, connections)")
print(" • Task Manager (processes, resource usage)")
print(" • System Monitor (CPU, memory, sensors)")

print("\n✨ Enjoy analyzing your system!")
else:
print("\n❌ Installation failed")
print("Please install dependencies manually:")
print(" pip install psutil rich")

if __name__ == "__main__":
main()
112 changes: 112 additions & 0 deletions submissions/SysMonit/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/usr/bin/env python3

import sys
import os
from rich.console import Console
from rich.panel import Panel
from rich.text import Text
from rich.align import Align
from rich.prompt import Prompt
import time

try:
from storage_analyzer import StorageAnalyzer
from network_analyzer import NetworkAnalyzer
from task_manager import TaskManager
from system_monitor import SystemMonitor
except ImportError as e:
print(f"Missing module: {e}")
print("Please run: pip install -r requirements.txt")
sys.exit(1)

class SystemAnalyzer:
def __init__(self):
self.console = Console()
self.storage = StorageAnalyzer()
self.network = NetworkAnalyzer()
self.tasks = TaskManager()
self.monitor = SystemMonitor()

def show_banner(self):
banner = Text("SYSTEM ANALYZER", style="bold cyan")
subtitle = Text("Cross-platform system analysis tool", style="dim")

panel = Panel(
Align.center(banner + "\n" + subtitle),
border_style="cyan",
padding=(1, 2)
)
self.console.print(panel)
self.console.print()

def show_main_menu(self):
menu_text = """
[bold green]1.[/bold green] Storage Analyzer
[bold green]2.[/bold green] Network Analyzer
[bold green]3.[/bold green] Task Manager
[bold green]4.[/bold green] System Monitor
[bold green]5.[/bold green] Run All Diagnostics
[bold red]0.[/bold red] Exit
"""

panel = Panel(
menu_text.strip(),
title="[bold]Main Menu[/bold]",
border_style="green"
)
self.console.print(panel)

def run_all_diagnostics(self):
self.console.print("\n[bold yellow]Running comprehensive system analysis...[/bold yellow]")

with self.console.status("[bold green]Analyzing storage..."):
time.sleep(1)
self.storage.show_disk_usage()

with self.console.status("[bold green]Checking network..."):
time.sleep(1)
self.network.show_network_info()

with self.console.status("[bold green]Getting system info..."):
time.sleep(1)
self.monitor.show_system_info()

self.console.print("\n[bold green]✓ Diagnostic complete![/bold green]")
input("\nPress Enter to continue...")

def run(self):
while True:
self.console.clear()
self.show_banner()
self.show_main_menu()

choice = Prompt.ask(
"\n[bold]Select option[/bold]",
choices=["0", "1", "2", "3", "4", "5"],
default="0"
)

if choice == "0":
self.console.print("\n[bold green]Goodbye![/bold green]")
break
elif choice == "1":
self.storage.run()
elif choice == "2":
self.network.run()
elif choice == "3":
self.tasks.run()
elif choice == "4":
self.monitor.run()
elif choice == "5":
self.run_all_diagnostics()

if __name__ == "__main__":
try:
analyzer = SystemAnalyzer()
analyzer.run()
except KeyboardInterrupt:
print("\n\nExiting...")
sys.exit(0)
except Exception as e:
print(f"Error: {e}")
sys.exit(1)
Loading