pwruLinux 內(nèi)核網(wǎng)絡調(diào)試工具
pwru 是一個基于 eBPF 的工具,用于追蹤 Linux 內(nèi)核中的網(wǎng)絡數(shù)據(jù)包,具有高級過濾能力。pwru 支持對內(nèi)核狀態(tài)進行細粒度的內(nèi)省 (introspection ),方便調(diào)試網(wǎng)絡連接問題。
下面的例子展示了在安裝 IP 表規(guī)則后,curl 請求的數(shù)據(jù)包被丟棄:
用法
Usage of ./pwru:
--filter-dst-ip string filter destination IP addr
--filter-dst-port uint16 filter destination port
--filter-func string filter the kernel functions that can be probed; the filter can be a regular expression (RE2)
--filter-mark uint32 filter skb mark
--filter-proto string filter L4 protocol (tcp, udp, icmp)
--filter-src-ip string filter source IP addr
--filter-src-port uint16 filter source port
--output-meta print skb metadata
--output-relative-timestamp print relative timestamp per skb
--output-skb print skb
--output-stack print stack
--output-tuple print L4 tuple評論
圖片
表情
