I have a running application (C#/mono) which appears to be looping on the following system call : (I determined this via a run of strace and found that this call is currently the only being made)
recvfrom([sockfd], "", [length], 0, NULL, NULL) = 0
Reading up on recvfrom (http://linux.die.net/man/2/recvfrom) I find the first parameter sockfd to be representative of a socket file descriptor.
Without stopping the application and including debug logic / extra verbosity to let me know which socket address the sockfd has been bound to, is there any way to look this up?
I've tried poking around for any references of where this information may be made available from the system but haven't come up with much
Thanks in advance,
You can use the lsof command to list all open IP sockets for a program doing like this
lsof | grep pid.*sd.*IP
where
pid is to be replaced by the program process id andsd is to be replaced by the socket descriptor as shown by strace.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With