简体   繁体   中英

How to find an AF_UNIX socket and see the information passing through it?

There is an application running on a FreeBSD 10.1 release operating system and i need to figure out how to find the sockets it has created and is using. I know that i'm looking for an AF_MAP socket which should be similar to a AF_UNIX socket.

How do i see what sockets are open, and once i find the one im looking for i need to see what information passes through. how is this also done? Thankyou

I'm not sure on FreeBSD specifically but you can use lsof in a way like:

$ lsof -p $(pidof your-appname)

This will give you all the files it has opened. For AF_UNIX sockets you may refer to this .

Also, you may want to use netstat -xa to see CONNECTED state sockets (if the application uses stream oriented sockets)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM