Skip to main content

whichport

whichport 是一个命令行工具,用来快速排查端口占用问题。

它可以做三类事情:

  1. 根据端口号查是谁占用了这个端口
  2. 根据 PID 查这个进程占用了哪些端口
  3. 根据进程关键字查命令行里包含这个关键字的进程以及对应端口

安装

pip install whichport

用法

whichport 8800
whichport python

输出

结果会以表格形式显示,包含命中来源、PID、进程名、命令行、协议和端口等信息。

如果没有找到匹配项,工具会输出一条简短提示。

Metadata

Release files for whichport 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for whichport 0.1.0
File Interpreter ABI Platform
whichport-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / whichport-0.1.0-py3-none-any.whl

Download URL whichport-0.1.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c86fc1feb201631a160a7a9df395f54a6f6e3327bea52dd65157352ac59744fb
BLAKE2b-256 checksum
How to use checksums
e7cb6ee630d1c41e0fbff2787bef5c104ab54a759dedb9d19c5091829ee5ea03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page