开发者

How to know which network path my program is using?

开发者 https://www.devze.com 2023-03-05 06:12 出处:网络
How to know which network path my program is using ? I have a program running on solaris, this machine 开发者_StackOverflow中文版has multiple network interfaces few connected to 1Gig and few 10 gig.

How to know which network path my program is using ?

I have a program running on solaris, this machine 开发者_StackOverflow中文版has multiple network interfaces few connected to 1Gig and few 10 gig. Suppose my application with PID P is running. IS there any command which display which network interface my program is submitting packets.


Not really. Your program is delegating to the kernel the task to choose which network interface(s) to use. If there is no ambiguity, i.e. if only one interface is suitable for the job, you can then identify it.

To get what IP addresses your program is connected to, you can use this command:

pfilepid| grep AF_INET

ifconfig -a and netstat -rn will help knowing what interfaces are there and what routes use what interfaces.

0

精彩评论

暂无评论...
验证码 换一张
取 消