最近更新时间:2023-11-27 16:17:47
例如内核版本为3.10.0-957.1.3.el7.x86_64
# uname -r #
# 3.10.0-957.1.3.el7.x86_64
下载centosrpm包,从中找到对应内核版本的RPM
如未找到可从centos官方获取
https://wiki.centos.org/HowTos/I_need_the_Kernel_Source
# rpm -ivh kernel-devel-3.10.0-327.el7.x86_64.rpm
# sudo yum install rpm-build redhat-rpm-config asciidoc hmaccalc perl-ExtUtils-Embed pesign xmlto
$ sudo yum install audit-libs-devel binutils-devel elfutils-devel elfutils-libelf-devel gcc
$ sudo yum install ncurses-devel newt-devel numactl-devel pciutils-devel python-devel zlib-devel
下载ttm源码
# tar -zxvf kgwttm.tar.gz
# cd kgwttm
# ./build.sh
# rpm -ivh *.rpm
# sh /usr/local/bin/kgwttm-insmod.sh
# lsmod |grep kgwttm
下载ttm源码
# tar -zxvf kgwttm.tar.gz
# cd kgwttm
# make
# sock_def_readable_addr=`cat /proc/kallsyms | grep sock_def_readable | awk '{print $1}'`
# insmod kgwttm.ko sk_data_ready_addr="0x$sock_def_readable_addr"
纯净模式