Commit 2832d0c 1 parent 5e998b8 commit 2832d0c Copy full SHA for 2832d0c
File tree 7 files changed +59
-4
lines changed
7 files changed +59
-4
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ <h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a><
45
45
< var class ="Ar "> btf_file name version</ var > </ td >
46
46
</ tr >
47
47
</ table >
48
+ < br />
49
+ < table class ="Nm ">
50
+ < tr >
51
+ < td > < code class ="Nm "> quark-btf < code class ="Fl "> -V</ code > </ code > </ td >
52
+ < td > </ td >
53
+ </ tr >
54
+ </ table >
48
55
</ section >
49
56
< h1 class ="Sh " id ="DESCRIPTION "> < a class ="permalink " href ="#DESCRIPTION "> DESCRIPTION</ a > </ h1 >
50
57
The < code class ="Nm "> quark-btf</ code > program prints out the kernel structures
@@ -86,6 +93,8 @@ <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIP
86
93
< dd > Increase
87
94
< a class ="permalink " href ="#quark_verbose "> < i class ="Em " id ="quark_verbose "> quark_verbose</ i > </ a > ,
88
95
can be issued multiple times.</ dd >
96
+ < dt id ="V "> < a class ="permalink " href ="#V "> < code class ="Fl "> -V</ code > </ a > </ dt >
97
+ < dd > Print version and exit.</ dd >
89
98
</ dl >
90
99
< section class ="Sh ">
91
100
< h1 class ="Sh " id ="EXIT_STATUS "> < a class ="permalink " href ="#EXIT_STATUS "> EXIT
@@ -146,7 +155,7 @@ <h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
146
155
</ div >
147
156
< table class ="foot ">
148
157
< tr >
149
- < td class ="foot-date "> October 4 , 2024</ td >
158
+ < td class ="foot-date "> October 14 , 2024</ td >
150
159
< td class ="foot-os "> Linux</ td >
151
160
</ tr >
152
161
</ table >
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ <h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a><
31
31
< var class ="Ar "> maxnodes</ var > ]</ td >
32
32
</ tr >
33
33
</ table >
34
+ < br />
35
+ < table class ="Nm ">
36
+ < tr >
37
+ < td > < code class ="Nm "> quark-mon < code class ="Fl "> -V</ code > </ code > </ td >
38
+ < td > </ td >
39
+ </ tr >
40
+ </ table >
34
41
</ section >
35
42
< h1 class ="Sh " id ="DESCRIPTION "> < a class ="permalink " href ="#DESCRIPTION "> DESCRIPTION</ a > </ h1 >
36
43
The < code class ="Nm "> quark-mon</ code > program listens to all incoming
@@ -95,6 +102,8 @@ <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIP
95
102
sorted by time, and the second by pid plus time. Exits after
96
103
< var class ="Ar "> maxnodes</ var > has been reached. This is used purely for
97
104
internal debugging.</ dd >
105
+ < dt id ="V "> < a class ="permalink " href ="#V "> < code class ="Fl "> -V</ code > </ a > </ dt >
106
+ < dd > Print version and exit.</ dd >
98
107
</ dl >
99
108
< section class ="Sh ">
100
109
< h1 class ="Sh " id ="BACKEND_SELECTION "> < a class ="permalink " href ="#BACKEND_SELECTION "> BACKEND
@@ -161,7 +170,7 @@ <h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
161
170
</ div >
162
171
< table class ="foot ">
163
172
< tr >
164
- < td class ="foot-date "> September 19 , 2024</ td >
173
+ < td class ="foot-date "> October 14 , 2024</ td >
165
174
< td class ="foot-os "> Linux</ td >
166
175
</ tr >
167
176
</ table >
Original file line number Diff line number Diff line change 16
16
.Nm quark-btf
17
17
.Op Fl v
18
18
.Fl g Ar btf_file name version
19
+ .Nm quark-btf Fl V
19
20
.Sh DESCRIPTION
20
21
The
21
22
.Nm
@@ -58,6 +59,8 @@ Matching can be partial.
58
59
Increase
59
60
.Em quark_verbose ,
60
61
can be issued multiple times.
62
+ .It Fl V
63
+ Print version and exit.
61
64
.El
62
65
.Sh EXIT STATUS
63
66
.Nm
Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ static int fflag;
16
16
static int gflag ;
17
17
static int lflag ;
18
18
19
+ static void
20
+ disply_version (void )
21
+ {
22
+ printf ("%s-%s\n" , program_invocation_short_name , QUARK_VERSION );
23
+ printf ("License: Apache-2.0\n" );
24
+ printf ("Copyright (c) 2024 Elastic NV\n" );
25
+
26
+ exit (0 );
27
+ }
28
+
19
29
static void
20
30
usage (void )
21
31
{
@@ -27,6 +37,7 @@ usage(void)
27
37
program_invocation_short_name );
28
38
fprintf (stderr , "usage: %s [-v] [-g btf_file name version]\n" ,
29
39
program_invocation_short_name );
40
+ fprintf (stderr , "usage: %s -V\n" , program_invocation_short_name );
30
41
31
42
exit (1 );
32
43
}
@@ -218,7 +229,7 @@ main(int argc, char *argv[])
218
229
int ch ;
219
230
const char * path = NULL ;
220
231
221
- while ((ch = getopt (argc , argv , "bf:glv " )) != -1 ) {
232
+ while ((ch = getopt (argc , argv , "bf:glvV " )) != -1 ) {
222
233
switch (ch ) {
223
234
case 'b' :
224
235
bflag = 1 ;
@@ -238,6 +249,9 @@ main(int argc, char *argv[])
238
249
case 'v' :
239
250
quark_verbose ++ ;
240
251
break ;
252
+ case 'V' :
253
+ disply_version ();
254
+ break ;
241
255
default :
242
256
usage ();
243
257
}
Original file line number Diff line number Diff line change 10
10
.Op Fl C Ar filename
11
11
.Op Fl l Ar maxlength
12
12
.Op Fl m Ar maxnodes
13
+ .Nm quark-mon Fl V
13
14
.Sh DESCRIPTION
14
15
The
15
16
.Nm
@@ -82,6 +83,8 @@ Exits after
82
83
.Ar maxnodes
83
84
has been reached.
84
85
This is used purely for internal debugging.
86
+ .It Fl V
87
+ Print version and exit.
85
88
.El
86
89
.Sh BACKEND SELECTION
87
90
If no backend option is specified,
Original file line number Diff line number Diff line change @@ -58,12 +58,23 @@ priv_drop(void)
58
58
err (1 , "error dropping privileges" );
59
59
}
60
60
61
+ static void
62
+ display_version (void )
63
+ {
64
+ printf ("%s-%s\n" , program_invocation_short_name , QUARK_VERSION );
65
+ printf ("License: Apache-2.0\n" );
66
+ printf ("Copyright (c) 2024 Elastic NV\n" );
67
+
68
+ exit (0 );
69
+ }
70
+
61
71
static void
62
72
usage (void )
63
73
{
64
74
fprintf (stderr , "usage: %s [-bDefkstv] "
65
75
"[-C filename ] [-l maxlength] [-m maxnodes]\n" ,
66
76
program_invocation_short_name );
77
+ fprintf (stderr , "usage: %s -V\n" , program_invocation_short_name );
67
78
68
79
exit (1 );
69
80
}
@@ -86,7 +97,7 @@ main(int argc, char *argv[])
86
97
nqevs = 32 ;
87
98
graph_by_time = graph_by_pidtime = graph_cache = NULL ;
88
99
89
- while ((ch = getopt (argc , argv , "bC:Degklm:tsv " )) != -1 ) {
100
+ while ((ch = getopt (argc , argv , "bC:Degklm:tsvV " )) != -1 ) {
90
101
const char * errstr ;
91
102
92
103
switch (ch ) {
@@ -141,6 +152,9 @@ main(int argc, char *argv[])
141
152
case 'v' :
142
153
quark_verbose ++ ;
143
154
break ;
155
+ case 'V' :
156
+ display_version ();
157
+ break ;
144
158
default :
145
159
usage ();
146
160
}
Original file line number Diff line number Diff line change 4
4
#ifndef _QUARK_H_
5
5
#define _QUARK_H_
6
6
7
+ /* Version is shared between library and utilities */
8
+ #define QUARK_VERSION "0.1a"
9
+
7
10
/* Misc types */
8
11
#include <stdio.h>
9
12
You can’t perform that action at this time.
0 commit comments