zoukankan      html  css  js  c++  java
  • [daily] 像tcpdump一样监听unix domain socket

    如题。

    见:

    https://superuser.com/questions/484671/can-i-monitor-a-local-unix-domain-socket-like-tcpdump?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

    用socat

    sudo mv /path/to/sock /path/to/sock.original
    sudo socat -t100 -x -v UNIX-LISTEN:/path/to/sock,mode=777,reuseaddr,fork UNIX-CONNECT:/path/to/sock.original

    What is happening above: First move original socket to sock.original. Socat creates a new socket ('UNIX-LISTEN') in the originals location and forwards all to the original ('UNIX-connect'). The -v tells socat to also print output to STDERR.

  • 相关阅读:
    软件总结
    今日总结
    今日总结
    今日总结
    今日总结
    今日总结
    今日总结
    3.22
    3.21
    3.20
  • 原文地址:https://www.cnblogs.com/hugetong/p/8820655.html
Copyright © 2011-2022 走看看