-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnettrace.spec
50 lines (33 loc) · 1.04 KB
/
nettrace.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Summary: A skb (network package) trace tool for kernel
Name: nettrace
Version: %{getenv:VERSION}
Release: %{getenv:RELEASE}
License: GPL
BuildRoot:%{_tmppath}/%{name}-%{version}-%{release}-root
Group: Development/Tools
Source0:%{name}-%{version}.tar.gz
# URL:
Requires:bcc,python3-bcc
%description
nettrace is is a powerful tool to trace network packet and diagnose
network problem inside kernel on TencentOS.
It make use of eBPF and BCC.
'skb' is the struct that used in kernel to store network package.
By tracing kernel function and tracepoint (with the help of kprobe
based on eBPF) that handle skb, nettrace is able to show the path
of skb bypass inside kernel network stack. Therefor, some network
issue (such as package drop) can be solved simply.
%prep
%setup -q
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
DESTDIR=$RPM_BUILD_ROOT/opt/nettrace/
%files
%defattr (-,root,root,0755)
/opt/nettrace/
/usr/sbin/nettrace
/usr/share/man/man8/nettrace.8.gz
/usr/share/bash-completion/completions/nettrace
%doc
%changelog