]> sourceware.org Git - systemtap.git/blob - stap-stop-server
PR13313 cont'd, fix regexp for [+-]D[+-]D[+-]D(...) operand case
[systemtap.git] / stap-stop-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 stop a systemtap server with the
13 # given pid.
14
15 # Get the process id.
16 pid=$1
17 if test "X$pid" = "X"; then
18 echo "Usage: $0 PROCESS_ID" >&2
19 exit 1
20 fi
21
22 # Verify that it is a systemtap server
23 (ps -e | grep stap-serverd | grep -q $pid)
24 if test $? != 0; then
25 echo "$pid is not a systemtap server" >&2
26 exit 1
27 fi
28
29 # Try to kill the server
30 kill -s SIGTERM $pid
This page took 0.038197 seconds and 5 git commands to generate.