<div dir="ltr"><div><div><div><div>Hi Anand,<br><br></div>I did what you said but i am getting a strange output<br> [root@machine0 Desktop]#ls<br>cli trace.dat.cpu11 trace.dat.cpu2 trace.dat.cpu7<br>client.c trace.dat.cpu12 trace.dat.cpu3 trace.dat.cpu8<br>
trace.dat.cpu0 trace.dat.cpu13 trace.dat.cpu4 trace.dat.cpu9<br>trace.dat.cpu1 trace.dat.cpu14 trace.dat.cpu5<br>trace.dat.cpu10 trace.dat.cpu15 trace.dat.cpu6<br>[root@hwcentos10 Desktop]# cat trace.dat.cpu<br>cat: trace.dat.cpu: No such file or directory<br>
[root@machine0 Desktop]# cat trace.dat.cpu0<br>[root@machine0 Desktop]# tcpc client.c trace.dat.cpu1<br>-bash: tcpc: command not found<br><br></div>why am i getting so much trace.dat.cpu files and tcpc command not found can you please help me out....<br>
<br></div>cli is the executable file for client<br><br></div>---Anil<br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 12:27 AM, Anand Moon <span dir="ltr"><<a href="mailto:moon.linux@yahoo.com" target="_blank">moon.linux@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Anil,<br>
<br>
You need to use "trace-cmd record" command and run you client. For example.<br>
<br>
I chose to write a tcp simple client server application.<br>
Server running on remote machine listening on some port<br>
I executed below command to connect to the server using trace-cmd record<br>
Below command records all the event and function trace in the kernel,<br>
<br>
You can filter these function by passing "-e net:*"<br>
this command will generate a report of all the function that kernel executed.<br>
You can read the report afterwords. using trace-cmd report.<br>
<br>
#sudo trace-cmd record -e all ./tcpc 10.0.0.28<br>
#ls<br>
#tcpc tcpc.c trace.dat<br>
#trace-cmd report<br>
<br>
You can also user perf command to trace the kernel functions.<br>
<br>
#sudo perf record -e probe:tcp_sendmsg<br>
<br>
#perf report<br>
<br>
perf examples can be found below.<br>
<br>
<a href="http://www.brendangregg.com/perf.html" target="_blank">http://www.brendangregg.com/perf.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-Anand Moon<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
On Tuesday, July 15, 2014 10:34 PM, Jeff Haran <<a href="mailto:Jeff.Haran@citrix.com">Jeff.Haran@citrix.com</a>> wrote:<br>
<br>
<br>
<br>
This helps me to see the forest for the trees. And it’s pretty current:<br>
<br>
<a href="http://upload.wikimedia.org/wikipedia/commons/3/37/Netfilter-packet-flow.svg" target="_blank">http://upload.wikimedia.org/wikipedia/commons/3/37/Netfilter-packet-flow.svg</a><br>
<br>
Jeff Haran<br>
<br>
<br>
<a href="mailto:From%3Akernelnewbies-bounces@kernelnewbies.org">From:kernelnewbies-bounces@kernelnewbies.org</a> [mailto:<a href="mailto:kernelnewbies-bounces@kernelnewbies.org">kernelnewbies-bounces@kernelnewbies.org</a>] On Behalf Of Anil Joshi<br>
Sent: Tuesday, July 15, 2014 7:38 AM<br>
To: kernelnewbies<br>
Subject: Path of network packet in kernel<br>
<br>
Hi All,<br>
<br>
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.<br>
<br>
How to do that.<br>
<br>
<br>
Regards<br>
<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br></div>