]> sourceware.org Git - systemtap.git/blob - stap-start-server
Ensure that a systemtap server is available if 'server' is specified
[systemtap.git] / stap-start-server
1 #!/bin/bash
2
3 # Start a systemtap server
4 #
5 # Copyright (C) 2008 Red Hat Inc.
6 #
7 # This file is part of systemtap, and is free software. You can
8 # redistribute it and/or modify it under the terms of the GNU General
9 # Public License (GPL); either version 2, or (at your option) any
10 # later version.
11
12 # This script attempts to start a systemtap server and echoes the
13 # process id, if successful.
14
15 # start the server
16 stap-serverd </dev/null >/dev/null 2>&1 &
17 server_pid=$!
18
19 # Exit if the server did not start ok
20 (ps | grep -q $server_pid) || exit 1
21
22 # The server started ok. Echo its process id.
23 echo $server_pid
24 exit 0
This page took 0.040247 seconds and 6 git commands to generate.