Skip to content

Commit 6ac11b0

Browse files
committed
update
1 parent 5aaee6a commit 6ac11b0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

content/opensips/tools/sngrep/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,15 @@ Dialog count: 17
308308
- sngrep只能捕获本机网卡的收到和发送的流量。假如ABC分别是三台独立虚拟机的SIP服务器,在B上抓包只能分析A-B, 和B-C直接的流量。
309309
- 再次强调:sngrep不适合长时间抓包,只适合短时间抓包分析问题。如果你需要记录所有的sip消息,并展示。可以考虑使用siphub,或者homer。
310310

311+
如果非要在生产环境抓包,建议使用如下的参数
312+
313+
```sh
314+
sngrep -cr -l 10 -NR -O sip1.pcap -B 10 17712345678
315+
```
316+
317+
- `-cr` 抓语音和媒体包
318+
- `-l 10` 限制抓包的数量为10个
319+
- `-NR` 不要界面, 并且超过10个之后自动回滚
320+
- `-O sip1.pcap` 将抓到的包保存到sip1.pcap文件中
321+
- `-B 10` 设置Buffer Size为10MB
322+

0 commit comments

Comments
 (0)