Learning Linux routing code with SYSTEMTAP

Source: Internet
Author: User
Tags systemtap

Http://bbs.chinaunix.net/thread-4090162-1-1.html


First, why do you want to do this
read kernel route subsystem code, when I understand the relationship between the data structure and control process,
is still inappropriate, there is always a "paper on the end of light, I know this thing to preach" feeling.
at this time, Systemtap can play a big role.

Second, prepare to work
Install SYSTEMTAP, kernel, kernel-debuginfo, Kernel-debuginfo-common, etc.
Uname-r
2.6.38.6-26.rc1.fc15.i686

Http://ftp.jaist.ac.jp/pub/Linux ... 26.rc1.fc15.src.rpm

Rpmbuild--rebuild--target=i686--without PAE--without perf--with firmware--without debug KERNEL-2.6.38.6-26.RC1.FC15.SRC.RPM

Three, scripting
This script is written for 2.6.38.6-26 code, and if you use a different kernel version,
needs to be modified accordingly. Need to rename to Route.tap.
<ignore_js_op> route.tap.tar.gz  (171 Bytes, download times:  

Four, run

run at one terminal:
stap-v route.tap |tee log

Run at another terminal:
IP route flush Cache
SSH 10.66.66.66

Five: Parse
parses the log file and you can see the entire route lookup process.

such as  <ignore_js_op> log.tar.gz  (1.07 KB, Download number of times:  

Fish drinking water, lengnuanzizhi, fun in it!

Learning Linux routing code with SYSTEMTAP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.