数据包捕获缓冲
我在网络上遇到了一些问题,我无法找到这些问题,目前我专注于物联网部分。
因此,我想检查的是,在我们经历连通性损失之前,会发生什么。
我一直在想的是启动tcpdump
流并从现在开始保留10秒钟,每当我遇到问题(应用程序报告的连接性损失)时,我都想记录10秒(20秒(20)总计10,在错误之前为10),然后将其保存为pcap
(或pcapng
)。
我正在考虑使用Python实现此解决方案,但我有2个问题:
- 我不知道如何缓冲CLI输出流,因此我只节省10秒。
- 当我尝试将其保存到PCAP(NG)时,捕获CLI输出不会帮助我。
我在这里看到了部分非编码解决方案: 态保存在触发器上
问题是该过程被杀死,我需要为下一个错误做好准备,但是如果它没有此限制,它可能非常好,可能会说明处理左右。
谢谢。
I'm having some issues with my network which I can't figure out and currently I'm focusing on the IoT part.
So what I'd like to check is what happens before we're experiencing a connectivity loss and a bit after.
What I was thinking about is launching tcpdump
stream and retain 10 past seconds from now, whenever I'm experiencing an issue (connectivity loss reported by the app) I'd like to record 10 more seconds (20 total, 10 before the error and 10 after) and save it as a pcap
(or pcapng
).
I was thinking about implementing this solution with Python but I have 2 problems:
- I can't figure how to buffer a CLI output stream so I'll only save 10 seconds.
- Capturing the CLI output won't help me when I'll try to save it to pcap(ng).
I saw a partial non-coding solution here:
Network capture toolset that store a buffer and saves on a trigger
The problem is that the process is killed and I need it to be ready for the next error but if it didn't have this limitation it could be pretty good, probably signal handling or so.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论