피드로 돌아가기
Built a terminal network incident tool that now exports frozen bundles with pcap + context
Dev.toDev.to
Infrastructure

NetWatch v0.9.0, incident 발생 시점 캡처를 위한 frozen bundle export 기능 추가함

Built a terminal network incident tool that now exports frozen bundles with pcap + context

Matthew Hartley2026년 4월 2일1intermediate

Context

터미널에서 네트워크 이슈 디버깅 시 interface throughput, packet capture, traceroute 등 여러 도구를 따로 사용해야 하는 불편함이 있음. incident 발생 시점의 데이터는 순식간에 사라져 사후 분석이 어려움.

Technical Solution

  • NetWatch: 실시간 interface rates, active connections, process 정보, gateway/DNS health, packet capture, topology/traceroute, connection timeline, per-process bandwidth를 하나의 터미널 UI로 통합함
  • Flight Recorder: incident 전후 5분 윈도우를 자동으로 순환 녹음하는 rolling 버퍼를 제공함
  • Frozen Bundle Export: armed 상태에서 incident 발생 시점 freeze하면 pcap, connection snapshots, health samples, DNS analytics, alert history를 포함한 완전한 context 번들을 생성함

Impact

수치 기반 성과 없음.

Key Takeaway

다양한 네트워크 관측 도구를 단일 UI로 통합하면 incident 대응 시 도구 전환 비용이 제거됨. flight recorder 패턴은 transient한 네트워크 현상의 사후 분석 가능성을 확보함.


네트워크 incident 대응 시 sudo netwatch로 packet capture와 ICMP health probe를 활성화하고 flight recorder를 armed 상태로 유지하면, incident 발생 시점 전후의 pcap과 context 정보를 자동으로 보존할 수 있음. 事後 분석을 위해 incident 직전에 freeze 명령어를 실행하면 완전한 bundle을 export할 수 있음.

원문 읽기