2sb
2sb

Reputation: 649

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 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.

Upvotes: 1

Views: 205

Answers (1)

jlliagre
jlliagre

Reputation: 30833

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.

Upvotes: 2

Related Questions