stap-server

Langue: en

Version: 2009-01-21 (CentOS - 06/07/09)

Section: 8 (Commandes administrateur)

NAME

stap-server - systemtap server and related utilities

SYNOPSIS


stap-start-server
stap-find-servers [ --all ]
stap-find-or-start-server
stap-stop-server PID
stap-client [ ARGUMENTS ]

DESCRIPTION

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

The stap-start-server program attempts to start a systemtap server (stap-serverd) 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 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.

The 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.

The stap-find-or-start-server program attempts to find a compatible systemtap server running on the local network using stap-find-servers. If a compatible server is found, stap-find-or-start-server echos '0' to stdout and the exit code is 0. Otherwise stap-find-or-start-server attempts to start a server on the local network using 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.

The 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. stap-stop-server does not verify that the server actually shuts down.

The stap-client program is analagous to the 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 staprun. Upon successful completion, the exit code is 0. Otherwise the exit code is 1.

OPTIONS

The stap-find-servers program supports the following option. Any other option is ignored.
--all
Instructs 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.

ARGUMENTS

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

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

EXAMPLES

See the stapex(5) manual page for a collection of sample scripts.

Here is a very basic example of how to use stap-client.

To find out if a compatible systemtap server is running on your local network

$ stap-find-servers

If no servers are reported, you can start one using

$ stap-start-server

You could also have accomplished both of the previous two steps using

$ stap-find-or-start-server

To compile and execute a simple example using the server

$ stap-client -e 'probe begin { printf("Hello World!\n"); exit() }'
Hello World!

If a process id was echoed by stap-start-server or stap-find-or-start-server then you can stop the server using

$ stap-stop-server PID

where PID is the process id that was echoed.

SAFETY AND SECURITY

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

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.

SEE ALSO

stap(1), staprun(8), stapprobes(5), stapfuncs(5), stapex(5),

BUGS

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