Network & System Commands
VritraAI provides comprehensive network diagnostics and system performance analysis tools. These commands help you troubleshoot network issues, analyze system performance, and optimize your system.
Network Diagnostics
network [subcommand]
Complete network diagnostics tool. Provides network status, IP information, connectivity testing, port scanning, and speed testing capabilities.
Usage Modes:
network- Show basic network status and local IP informationnetwork check- Check internet connectivitynetwork ip- Show detailed IP configurationnetwork ping <host>- Ping a host to test connectivitynetwork port <host> <port>- Check if a port is open on a hostnetwork speed- Run internet speed test
Subcommands:
Basic Network Status
When run without arguments, shows:
- Internet connection status (Available/Not available)
- Local IP address
- Hostname
Network Check
Verifies internet connectivity and displays connection status.
IP Information
Shows detailed IP configuration. On Windows, runs ipconfig. On Unix-like systems, runs ip addr show or ifconfig.
Ping
Tests connectivity to a host by sending ICMP packets. Sends 4 packets by default.
Port Scanning
Checks if a specific port is open on a host. Uses socket connection with 5-second timeout.
Speed Test
Runs internet speed test using speedtest-cli. If not installed, provides installation instructions or uses AI to help install and run the test.
Examples:
# Show basic network status
network
# Check internet connectivity
network check
# Show IP configuration
network ip
# Ping a host
network ping google.com
network ping 8.8.8.8
# Check if port is open
network port google.com 80
network port localhost 8080
# Run speed test
network speed
Note: Some network operations require specific tools to be installed. The command will provide helpful messages if required tools are missing.
System Performance Analysis
analyze_system
Detailed system performance analysis report. Provides comprehensive information about disk usage, memory, CPU, processes, and current directory statistics.
Information Displayed:
- 💾 Disk Usage: Total, used, and free disk space in GB
- 🧠 Memory: Memory usage percentage and available memory in MB
- ⚡ CPU Usage: Current CPU usage percentage
- 🔄 Top Processes: Top 5 processes by CPU usage (if psutil available)
- 📁 Directory Stats: File and directory count in current directory
Features:
- Safe error handling with graceful fallbacks
- Works without psutil (with limited information)
- Real-time CPU usage measurement
- Process sorting by CPU usage
Examples:
# Analyze system performance
analyze_system
Note: For detailed memory, CPU, and process information, psutil should be installed. Without it, some information may not be available.
System Optimization
optimize
AI-powered system optimization. Analyzes your system and provides optimization recommendations and cleanup scripts tailored to your operating system.
Features:
- System cleanup analysis
- Checks for temporary files, cache directories, old log files
- Identifies unused dependencies
- Finds duplicate files
- AI-powered optimization suggestions
- OS-specific cleanup scripts
Analysis Areas:
- 📁 Temporary files
- 🗂️ Cache directories
- 📋 Log files (older than 7 days)
- 📦 Unused dependencies
- 📄 Duplicate files
Examples:
# Run system optimization
optimize
Requirement: This command requires AI to be enabled. Configure your API key first.
What It Does:
The command checks various system areas and then uses AI to provide:
- System optimization commands specific to your OS
- Cleanup scripts for safe execution
- Recommendations for improving system performance
- Best practices for system maintenance
Best Practices
- Check connectivity first: Use
network checkbefore troubleshooting network issues - Monitor performance: Run
analyze_systemregularly to track system health - Optimize periodically: Use
optimizeto keep your system clean and efficient - Test connectivity: Use
network pingto test connectivity to specific hosts - Check ports: Use
network portto verify service availability - Install tools: Install
psutilandspeedtest-clifor full functionality
💡 Pro Tip: Combine analyze_system with optimize for comprehensive system maintenance. First analyze to see what needs attention, then optimize to clean up and improve performance.