.\" -*- nroff -*- .TH STAP-SERVER 8 @DATE@ "Red Hat" .SH NAME stap\-server \- systemtap server management .SH SYNOPSIS .br [ .B service ] .B stap\-server { .B start | .B stop | .B restart | .B condrestart | .B try\-restart | .B force\-reload | .B status } [ .I options ] .SH DESCRIPTION A systemtap compile server listens for connections from clients (\fIstap\-client\fR) on a secure SSL network port and accepts requests to run the .I stap front end. Each server advertises its presence and configuration on the local network using mDNS (\fIavahi\fR) allowing for automatic detection by clients. .PP The stap\-server script aims to provide: .IP \(bu 4 management of systemtap compile servers as a service. .IP \(bu 4 convenient control over configured servers and individual (ad\-hoc) servers. .SH ARGUMENTS One of the actions below must be specified: .TP .B start Start servers. The specified servers are started. If no server is specified, the configured servers are started. If no servers are configured, a server for the kernel release and architecture of the host is started. If a specified server is already started, this action will be ignored for that server. If a server fails to start, this action fails. .TP .B stop Stop server(s). The specified servers are stopped. If no server is specified, all currently running servers are stopped. If a specified server is not running, this action will be successful for that server. If a server fails to stop, this action fails. .TP .B restart Stop and restart servers. The specified servers are stopped and restarted. If no server is specified, all currently running servers are stopped and restarted. If no servers are running, this action behaves like \fIstart\fR. .TP .B condrestart Stop and restart servers. The specified servers are stopped and restarted. If a specified server is not running, it is not started. If no server is specified, all currently running servers are stopped and restarted. If no servers are running, none will be started. .TP .B try\-restart This action is identical to \fIcondrestart\fR. .TP .B force\-reload Stop all running servers, reload config files and restart the service as if .I start was specified. .TP .B status Print information about running servers. Information about the specified server(s) will be printed. If no server is specified, information about all running servers will be printed. .SH OPTIONS The following options are used to provide additional configuration and to specify servers to be managed: .TP \fB\-c\fR \fIconfigfile\fR This option specifies a global configuration file in addition to the default global configuration file described below. This file will be processed after the default global configuration file. If the \fB\-c\fR option is specified more than once, the last configuration file specified will be used. .TP \fB\-a\fR \fIarchitecture\fR This option specifies the target architecture of the server and is analogous to the \fB\-a\fR option of \fIstap\fR. See the .IR stap (1) manual page for more details. The default architecture is the architecture of the host. .TP \fB\-r\fR \fIkernel\-release\fR This option specifies the target kernel release of the server and is analogous to the \fB\-r\fR option of \fIstap\fR. See the .IR stap (1) manual page for more details. The default release is that of the currently running kernel. .TP \fB\-I\fR \fIpath\fR This option specifies an additional path to be searched by the server(s) for tapsets and is analogous to the \fB\-I\fR option of \fIstap\fR. See the .IR stap (1) manual page for more details. .TP \fB\-R\fR \fIpath\fR This option specifies the location of the systemtap runtime to be used by the server(s) and is analogous to the \fB\-R\fR option of \fIstap\fR. See the .IR stap (1) manual page for more details. .TP \fB\-B\fR \fIoptions\fR This option specifies options to be passed to \fImake\fR when building systemtap modules and is analogous to the \fB\-B\fR option of \fIstap\fR. See the .IR stap (1) manual page for more details. .TP \fB\-i\fR This option is a shortcut which specifies one server for each kernel release installed in \fI/lib/modules/\fR. Previous \fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options will be applied to each server, however previous \fB\-a\fR options will be ignored and the default architecture will be used. .TP \fB\-n\fR \fInickname\fR This option allows the specification of a server configuration by nickname. When \fB\-n\fR is specified, a currently running server with the given nickname will be searched for. If no currently running server with the given nickname is found, a server configuration with the given nickname will be searched for in \fI/etc/stap\-server/conf.d/*.conf\fR, or the path configured in \fI/etc/sysconfig/stap\-server\fR or the config file specified by the \fB\-c\fR option. If a server configuration for the given nickname is found, the \fB\-a\fR, \fB\-r\fR, \fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options for that server will be used as if they were specified on the command line. If no configuration with the given nickname is found, and the action is .I start (or an action behaving like \fIstart\fR (see \fBARGUMENTS\fR), the server will be started with the given nickname. If no configuration with the given nickname is found, and the action is not .I start (or an action behaving like \fIstart\fR), it is an error. If a nickname is not specified for a server which is being started, its nickname will be its process id. .TP \fB\-p\fR \fIpid\fR This option allows the specification of a server configuration by process id. When \fB\-p\fR is specified, a currently running server with the given process id will be searched for. If no such server is found, it is an error. If a server with the given procss id is found, the \fB\-a\fR, \fB\-r\fR, \fB\-I\fR, \fB\-R\fR, \fB\-B\fR and \fB\-u\fR options for that server will be used as if they were specified on the command line. .TP \fB\-u\fR \fIuser\-name\fR Each systemtap compile server is normally run by the user name \fistap\-server\fR (for the initscript) or as the user invoking \fIstap-server\fR, unless otherwise configured (see \fBFILES\fR). This option specifies the user name used to run the server(s). The user name specified must be a member of the group \fIstap\-server\fR. .SH CONFIGURATION Configuration files allow us to: .IP \(bu 4 specify global configuration of logging, server configuration files, status files and other global parameters. .IP \(bu 4 specify which servers are to be started by default. .SH Global Configuration The Global Configuration file (\fI/etc/sysconfig/stap\-server\fR) is a shell script fragment which may contain settings for the following variables: .TP .B CONFIG_PATH Specifies the absolute path of the directory containing the default server configurations (default: \fI/etc/stap\-server/conf.d\fR). .TP .B STAT_PATH Specifies the absolute path of the running server status directory (default: \fI/var/run/stap\-server\fR). .TP .B LOG_FILE Specifies the absolute path of the log file (default: \fI/var/log/stap\-server.log\fR). .TP .B STAP_USER Specifies the userid which will be used to run the server(s) (default: for the initscript \fIstap\-server\fR, otherwise the user running \fIstap-server\fR). .SH Individual Server Configuration Each server configuration file configures a server to be started when no server is specified for the \fIstart\fR action, or an action behaving like the \fIstart\fR action (see \fIARGUMENTS\fR). Each configuration file is a shell script fragment with a filename suffix of \fI.conf\fR. The default location of these files is \fI/etc/stap\-server/conf.d/\fR, but this can be overridden using the \fB\-c\fR option (see \fIOPTIONS\fR). The following variables may be set: .TP .B ARCH Specifies the target architecture for this server and corresponds to the \fB\-a\fR option (see \fIOPTIONS\fR). If \fBARCH\fR is not set, the architecture of the host will be used. .TP .B RELEASE Specifies the kernel release for this server and corresponds to the \fB\-r\fR option (see \fIOPTIONS\fR). If \fBRELEASE\fR is not set, the release of the kernel running on the host will be used. .TP .B BUILD Specifies options to be passed to the \fImake\fR process used by \fIsystemtap\fR to build kernel modules and corresponds to one or more \fB\-B\fR options (see \fIOPTIONS\fR). .TP .B INCLUDE Specifies a list of directories to be searched by the server for tapsets and corresponds to one or more \fB\-I\fR options (see \fIOPTIONS\fR). .TP .B RUNTIME Specifies the directory which contains the systemtap runtime code to be used by this server and corresponds to the \fB\-R\fR option (see \fIOPTIONS\fR). .TP .B USER Specifies the user name to be used to run this server and corresponds to the \fB\-u\fR option (see \fIOPTIONS\fR). .TP .B NICKNAME Specifies the nickname to be used to refer to this server and corresponds to the \fB\-n\fR option (see \fIOPTIONS\fR). .SH SERVER AUTHENTICAION The security of the SSL network connection between the client and server depends on the proper management of server certificates. .PP The trustworthiness of a given systemtap server can not be determined automatically without a trusted certificate authority issuing systemtap server certificates. This is not practical in everyday use and so, clients must authenticate servers against their own database of trusted server certificates. In this context, establishing a given server as trusted by a given client means adding that server\[aq]s certificate to the client\[aq]s database of trusted servers. .PP For the \fIstap\-server\fR initscript, on the local host, this is handled automatically. When the \fIsystemtap\-server\fR package is installed, the server\[aq]s certificate for the default user (\fIstap\-server\fR) is automatically generated and installed. This means that servers started by the \fIstap\-server\fR initscript, with the default user, are automatically trusted by clients on the local host. .PP In order to use a server running on another host, that server\[aq]s certificate must be installed on the client\[aq]s host. See the .IR stap\-authorize\-server\-cert (8) manual page for more details. .SH EXAMPLES See the .IR stapex (3stap) manual page for a collection of sample \fIsystemtap\fR scripts. .PP To start the configured servers, or the default server, if none are configured: .PP .B \& $ [ service ] stap\-server start .PP To start a server for each kernel installed in /lib/modules: .PP .B \& $ [ service ] stap\-server start \-i .PP To obtain information about the running server(s): .PP .B \& $ [ service ] stap\-server status .PP To start a server like another one, except targeting a different architecture, by referencing the first server\[aq]s nickname: .PP .B \& $ [ service ] stap\-server start \-n \fINICKNAME\fR \-a \fIARCH\fR .PP To stop one of the servers by referencing its process id (obtained by running \fBstap\-server status\fR): .PP .B \& $ [ service ] stap\-server stop \-p \fIPID\fR .PP To stop all running servers: .PP .B \& $ [ service ] stap\-server stop .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 As a network server, stap-server should be activated with care in order to limit the potential effects of bugs or mischevious users. Consider the following prophylactic measures. .TP 1 Run stap-server as an unprivileged user, never as root. .TP 2 Run stap-server with resource limits that impose maximum cpu time, file size, memory consumption, in order to bound the effects of processing excessively large or bogus inputs. .TP 3 Run stap-server with a $TMPDIR environment variable that points to a separate and/or quota-enforced directory, in order to prevent filling up of important filesystems. .TP 4 Activate network firewalls to limit stap-client connections to relatively trustworthy networks. .PP The systemtap server and its related utilities use the Secure Socket Layer (SSL) as implemented by Network Security Services (NSS) for network security. The NSS tool .I certutil is used for the generation of certificates. The related certificate databases must be protected in order to maintain the security of the system. Use of the utilities provided will help to ensure that the proper protection is maintained. The systemtap client will check for proper access permissions before making use of any certificate database. .SH FILES .TP /etc/sysconfig/stap\-server/ Global configuration file. .TP /etc/stap\-server/conf.d/*.conf Configuration files for default servers. .TP /var/run/stap\-server/ Default location of status files for running servers. .TP /var/log/stap\-server.log Default log file. .TP /lib/modules/ Location of installed kernels. .SH SEE ALSO .IR stap (1), .IR staprun (8), .IR stap\-client (8), .IR stap\-authorize\-server\-cert (8), .IR stapprobes (3stap), .IR stapfuncs (3stap), .IR stapex (3stap), .IR ulimit (1), .IR NSS , .IR certutil .SH BUGS Use the Bugzilla link of the project web page or our mailing list. .nh .BR http://sources.redhat.com/systemtap/ ", " . .hy