How to know which network path my program is using?
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:
pfile
pid| grep AF_INET
ifconfig -a
and netstat -rn
will help knowing what interfaces are there and what routes use what interfaces.
精彩评论