-
Notifications
You must be signed in to change notification settings - Fork 2
/
quark-btf.8
118 lines (118 loc) · 2.65 KB
/
quark-btf.8
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
.Dd $Mdocdate$
.Dt QUARK-BTF 8
.Os
.Sh NAME
.Nm quark-btf
.Nd query quark BTF offsets
.Sh SYNOPSIS
.Nm quark-btf
.Op Fl bv
.Op Fl f Ar btf_file
.Op Ar targets ...
.Nm quark-btf
.Op Fl bv
.Fl l
.Ar version
.Nm quark-btf
.Op Fl v
.Fl g Ar btf_file name version
.Nm quark-btf
.Fl h
.Nm quark-btf Fl V
.Sh DESCRIPTION
The
.Nm
program prints out the kernel structures offsets used by quark.
.Pp
If operands are given, the output is curbed for those specified
.Ar targets .
The exit status is the number of failed
.Ar targets .
.Pp
The options are as follows:
.Bl -tag -width Dtb
.It Fl b
Also print the offset in bits.
.It Fl f Ar btf_file
Print all offsets quark would use from
.Ar btf_file .
.It Fl g Ar btf_file name version
Generate the internal btf C structure used by quark.
.Bl -tag -width btf_file
.It Ar btf_file
is a the path to the btf.
.It Ar name
is a human identifier, like ubuntu-22.
.It Ar version
is the kernel version as returned by
.Em uname -r .
.El
.Pp
This option is only used to generate
.Pa btfhub.c
via
.Pa genbtf.sh ,
chances are you'll never need this.
.It Fl h
Display this manpage.
.It Fl l Ar version
Lookup the kernel
.Em version
in the compiled btfhub table from quark and print which kernel quark would use.
Matching can be partial.
.It Fl v
Increase
.Em quark_verbose ,
can be issued multiple times.
.It Fl V
Print version and exit.
.El
.Sh EXIT STATUS
.Nm
exits with 1 if it can't resolve all BTF symbols, 0 otherwise.
.Sh EXAMPLES
Running:
.Dl $ quark-btf
.Pp
outputs:
.Bd -literal
cred.cap_ambient 80
cred.cap_bset 72
cred.cap_effective 64
cred.cap_inheritable 48
cred.cap_permitted 56
cred.egid 28
cred.euid 24
cred.gid 12
cred.sgid 20
cred.suid 16
cred.uid 8
cred.user 136
dentry.d_name.name 40
dentry.d_parent 24
fs_struct.pwd.dentry 48
fs_struct.pwd.mnt 40
fs_struct.root.dentry 32
mm_struct.(anon).start_stack 368
mount.mnt 32
mount.mnt_mountpoint 24
task_struct.comm 3008
task_struct.cred 2992
task_struct.exit_code 2364
task_struct.fs 3056
task_struct.mm 2336
task_struct.pid 2464
task_struct.start_boottime 2816
task_struct.tgid 2468
vfsmount.mnt_root 0
.Ed
.Sh SEE ALSO
.Xr quark_event_dump 3 ,
.Xr quark_process_lookup 3 ,
.Xr quark_queue_block 3 ,
.Xr quark_queue_close 3 ,
.Xr quark_queue_get_epollfd 3 ,
.Xr quark_queue_get_events 3 ,
.Xr quark_queue_get_stats 3 ,
.Xr quark_queue_open 3 ,
.Xr quark-mon 8