Re: Path of network packet in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anil,

You need to use "trace-cmd record" command and run you client. For example.

I chose to write a tcp simple client server application.
Server running on remote machine listening on some port
I executed below command to connect to the server using trace-cmd record
Below command records all the event and function trace in the kernel, 

You can filter these function by passing "-e net:*"
this command will generate a report of all the function that kernel executed.
You can read the report afterwords. using trace-cmd report.

#sudo trace-cmd record -e all ./tcpc 10.0.0.28
#ls 
#tcpc  tcpc.c  trace.dat
#trace-cmd report

You can also user perf command to trace the kernel functions.

#sudo perf record -e probe:tcp_sendmsg 

#perf report

perf examples can be found below.

http://www.brendangregg.com/perf.html

-Anand Moon





On Tuesday, July 15, 2014 10:34 PM, Jeff Haran <Jeff.Haran@xxxxxxxxxx> wrote:



This helps me to see the forest for the trees. And it’s pretty current:

http://upload.wikimedia.org/wikipedia/commons/3/37/Netfilter-packet-flow.svg

Jeff Haran


From:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] On Behalf Of Anil Joshi
Sent: Tuesday, July 15, 2014 7:38 AM
To: kernelnewbies
Subject: Path of network packet in kernel

Hi All,

I am just new to all this,just wanted to trace the path of the packet since it enter the system(inside the kernel (functions and system calls)) and reaches the destination application.

How to do that.


Regards


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies





[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux