如何在linux中了解特定端口的流量 (How to know traffic to a specific port in linux)


問題描述

如何在linux中了解特定端口的流量 (How to know traffic to a specific port in linux)

I am looking to find the traffic through a specific port for a time frame. For example, traffic through 3306 port for 10 seconds. Is there a way to find this information?

I see that "/sbin/ifconfig eth0 05" can be used to get information on total bytes but I am looking to find information about specific port's traffic.

Thanks in advance,


參考解法

方法 1:

tcpdump -i eth0 -s 1500 port 3306

方法 2:

sudo iftop -P -n -N -m 10M -f 'port 3260'
  • -P display ports
  • -n no hostname lookup
  • -N display ports not service names
  • -m limit for bandwidth scale
  • -f filter rule

(by uday kiranRawkodeXypron)

參考文件

  1. How to know traffic to a specific port in linux (CC BY-SA 3.0/4.0)

#network-traffic #port #linux #traffic






相關問題

網絡流量操縱(虛擬局域網) (Network traffic manipulation (Virtual LAN))

如何在linux中了解特定端口的流量 (How to know traffic to a specific port in linux)

僅嗅探/記錄應用層 (Sniffing/recording application layer only)

Android:監控應用程序的數據流量使用情況 (Android: Monitor an app's data traffic usage)

如何按時間從android獲取trafficStats信息? (How to get trafficStats information from android by time?)

在 FreeBSD 中使用 SSH 隧道進行所有流量轉發 (All traffic forwarding using SSH tunnel in FreeBSD)

Wireshark - 僅查看多播和廣播流量 (Wireshark - see only multicast and broadcast traffic)

java套接字中的奇怪流量 (Strange traffic in java sockets)

是否有任何程序可以模擬不穩定的網絡連接? (Are there any programs that can simulate an unstable network connection?)

獲取 XHR 響應(網絡流量)並在 Katalon Studio 中解析 (Get XHR response (network traffic) and parse it in Katalon Studio)

Visual Studio 2019 中的網絡流量工具在哪裡 (Where's the Network Traffic Tool in Visual Studio 2019)

為什麼我不能用 chrome 調試 Service Worker? (Why I can't debug Service Workers with chrome?)







留言討論