summaryrefslogtreecommitdiffstats
path: root/stap-server.8.in
blob: ffee8dfac857edb7b6defc313692803c49e5e936 (plain)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
.\" -*- nroff -*-
.TH STAP-SERVER 8 @DATE@ "Red Hat"
.SH NAME
stap-server \- systemtap server and related utilities

.SH SYNOPSIS

.br
.B stap\-start\-server
.br
.B stap\-find\-servers
[
.B \-\-all
]
.br
.B stap\-find\-or\-start\-server
.br
.B stap\-stop\-server
.I PID
.br
.B stap\-client
[
.I ARGUMENTS
]

.SH DESCRIPTION

The systemtap server listens for connections from
.I stap\-client
on the local network and accepts requests to run the
.I stap
front end.

.PP
The
.I stap\-start\-server
program attempts to start a systemtap server (\fIstap-serverd\fP)
on the local host. Upon
successful startup, the server listens for connections on a random port and
advertises its presence on the local network using the
.I avahi
daemon. If the server is successfully started, its process id is
echoed to stdout and the exit code is 0. Otherwise, nothing is echoed and the exit code is 1.

.PP
The
.I stap\-find\-servers
program attempts to find systemtap servers running on the local network.
The details of any servers found are echoed to stdout.
If servers are found, then the exit code is 0, otherwise it is 1.

.PP
The
.I stap\-find\-or\-start\-server
program attempts to find a compatible systemtap server running on the local network
using
.IR stap\-find\-servers .
If a compatible server is found,
.I stap\-find\-or\-start\-server
echos '0' to stdout and the exit code is 0. Otherwise
.I stap\-find\-or\-start\-server
attempts to start a server on the local network using
.IR stap\-start\-server .
If successful, the process id of the new server is echoed to stdout and the
exit code is 0. If no server can be found or started, nothing is echoed
to stdout and the exit code is 1.

.PP
The
.I stap\-stop\-server
program verifies that the given process id is that of a running systemtap server
on the local host and, if so, attempts to shut down the server by sending it the
SIGTERM signal. If a process id is provided and it is that of a running systemtap
server, the exit code is 0. Otherwise the exit code is 1.
.I stap\-stop\-server
does not verify that the server actually shuts down.

.PP
The
.I stap\-client
program is analagous to the
.I stap
front end except that it attempts to find a compatible systemtap server on the
local network and then attempts to use that server for actions related to
passes 1 through 4. Pass 5 actions, if requested, are performed on the localhost
using
.IR staprun .
Upon successful completion, the exit code is 0. Otherwise the exit code
is 1.

.SH OPTIONS
The
.I stap\-find\-servers
program supports the following option.  Any other option
is ignored.
.TP
.B \-\-all
Instructs
.I stap\-find\-servers
to report all systemtap servers on the local network regardless of compatibility.
The default behavior is to report only servers which are compatible with
systemtap on the local host.

.SH ARGUMENTS
The
.I stap\-stop\-server
program requires a process id argument which identifies the server to be stopped.

.PP
The
.I stap\-client
program accepts the same arguments and options as the
.I stap
front end.

.SH EXAMPLES
See the 
.IR stapex (5)
manual page for a collection of sample scripts.
.PP
Here is a very basic example of how to use
.IR stap\-client .
.PP
To find out if a compatible systemtap server is running on your local network
.PP
\& $ stap\-find\-servers
.PP
If no servers are reported, you can start one using
.PP
\& $ stap\-start\-server
.PP
You could also have accomplished both of the previous two steps using
.PP
\& $ stap\-find\-or\-start\-server
.PP
To compile and execute a simple example using the server
.PP
\& $ stap\-client \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq]
.br
\& Hello World!
.PP
If a process id was echoed by
.I stap\-start\-server
or
.I stap\-find\-or\-start\-server
then you can stop the server using
.PP
\& $ stap\-stop\-server PID
.PP
where PID is the process id that was echoed.


.SH SAFETY AND SECURITY
Systemtap is an administrative tool.  It exposes kernel internal data
structures and potentially private user information.  See the 
.IR stap (1)
manual page for additional information on safety and security.

.PP
The systemtap server and its related utilities are prototypes only. NO NETWORK
SECURITY OF ANY KIND IS CURRENTLY PROVIDED. These programs should only be used
among trusted hosts on a trusted network.

.SH SEE ALSO
.IR stap (1),
.IR staprun (8),
.IR stapprobes (5),
.IR stapfuncs (5),
.IR stapex (5),

.SH BUGS
Use the Bugzilla link off of the project web page or our mailing list.
.nh
.BR http://sources.redhat.com/systemtap/ ", " <systemtap@sources.redhat.com> .
.hy