Netfilter-packet-flow.svg

 

 

调试网络的方法:(Debugging the kernel using Ftrace)

 $ watch -n1 -d sudo cat /proc/net/snmp
$ watch -n1 -d sudo cat /proc/net/dev
 

1. $ sudo mount -t debugfs nodev debug

2. $ echo ip_rcv > set_graph_function

3. $ echo function_graph > current_tracer

4. $ echo 0 > tracing_on turn off trace, default is on

5. all log is on trace file

 

更多的文章,请看 内核目录下面的 $ ls Documentation/trace/events.txt Documentation/trace/tracepoints.txt  

 

你可能感兴趣的:(filter)