Skip to content

Advanced terminal tool for managing network ports and processes with conda environment automation support

License

Notifications You must be signed in to change notification settings

AntonioDEM/Killport-Advanced

Repository files navigation

KillPort Logo

KillPort Advanced v2.0

Complete suite for port management on macOS with advanced monitoring, multiple range support, and integrated benchmarking.

en it

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors Benchmark Reports

macOS Shell Python

Status Last Commit License Version


πŸ“‘ Table of Contents


✨ Features

  • 🎯 Single port or multiple ranges - Flexible port management
  • πŸ” Advanced monitoring - Detailed visualization of listening processes
  • ⚑ Optimized performance - Fast and efficient operations
  • πŸ“Š Integrated benchmarking - Complete performance testing suite
  • 🐍 Conda integration - Native support for conda environments
  • 🎨 Colored output - Clear and readable terminal interface
  • πŸ›‘οΈ Robust error handling - Complete checks and informative messages
  • πŸ“ Detailed logging - Full operation tracking

πŸš€ Quick Installation

Prerequisites

Automatic Installation

# Clone the repository
git clone https://github.com/AntonioDEM/killport-advanced.git
cd killport-advanced

# Run the installation script
bash install_killport.sh

# Load the functions in your shell
source killport_zshrc_function.sh

Manual Installation

If you prefer to install manually, add to your ~/.zshrc or ~/.bashrc:

# Add the path to functions
source /path/to/killport-advanced/killport_zshrc_function.sh

Then reload the configuration:

source ~/.zshrc  # for Zsh
# or
source ~/.bashrc # for Bash

πŸ’» Usage

Basic Commands

# Kill a single port
killport 8080

# Kill multiple ranges
killport 3000-3005 8080-8085

# Monitor listening ports
monitor_ports

# Show help
killport --help

Advanced Examples

# Kill multiple specific ports
killport 3000 3001 8080 9000

# Combination of single ports and ranges
killport 3000 5000-5005 8080-8090

# Monitoring with filtering
monitor_ports | grep python

Conda Integration

The tool automatically detects the active conda environment and manages it optimally:

# Activate environment
conda activate myenv

# Use killport normally
killport 8080

# The conda environment is preserved

πŸ“Š Benchmark Suite

The integrated benchmark suite allows you to test system performance.

Running Benchmarks

# Go to the benchmark folder
cd benchmark

# Run the original benchmark
bash benchmark_original.sh

# View the results
bash benchmark_visualizer_original.sh

Generated Reports

Benchmarks automatically generate:

  • πŸ“ˆ CSV files with detailed results
  • πŸ“Š Performance charts
  • πŸ“ Complete markdown reports
  • πŸ“‰ Comparative analysis

Results are saved in:

benchmark/
β”œβ”€β”€ benchmark_results_YYYYMMDD_HHMMSS.csv
β”œβ”€β”€ benchmark_results_YYYYMMDD_HHMMSS.txt
β”œβ”€β”€ benchmark_charts_YYYYMMDD_HHMMSS.txt
└── benchmark_report_YYYYMMDD_HHMMSS.md

πŸ“š Documentation

For detailed documentation, see:


πŸ”§ Troubleshooting

Port already in use

Error: Port 8080 is already in use

Solution: Use killport to terminate the process:

killport 8080

Permission denied

Error: Permission denied

Solution: Some processes require elevated privileges:

sudo killport 8080

Function not found

command not found: killport

Solution: Reload the shell functions:

source killport_zshrc_function.sh

Conda Issues

If the conda environment is not detected correctly:

# Reinitialize conda
conda init zsh  # or bash

# Reload shell
source ~/.zshrc

🀝 Contributing

Contributions, issues, and feature requests are welcome!

See CONTRIBUTING.md for guidelines.

How to Contribute

  1. Fork the project
  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

Distributed under the MIT License. See LICENSE for more information.


πŸ‘¨β€πŸ’» Author

Antonio Demarcus


πŸ™ Acknowledgments

  • Inspired by the killport project by jkfran
  • Open source community for support
  • All project contributors

⭐ If you find this project useful, leave a star! ⭐

Made with ❀️ by Antonio Demarcus

About

Advanced terminal tool for managing network ports and processes with conda environment automation support

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages