關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • FreeBSD 列出開啟 sockets

    Posted on February 27th, 2008 Sam Tang No comments

    在 FreeBSD 除了可以用 netstat / lsof 列出已開啟的 internet 及 unix domain sockets 外,也可以用另一個較簡單的指令:sockstat,這個指令有以下不同的參數:

    -4: 只顯出 ipv4 sockets.
    -6: 只顯出 ipv6 sockets.
    -c: 只顯示已連接 sockets.
    -l: 只顯示正在監聽的 sockets.

    使用上十分簡單,以下是使用例子:

    # sockstat -4

    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word