]>
sourceware.org Git - systemtap.git/blob - stap-stop-server
3 # Start a systemtap server
5 # Copyright (C) 2008 Red Hat Inc.
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
12 # This script attempts to stop a systemtap server with the
17 if test "X$pid" = "X"; then
18 echo "Usage: $0 PROCESS_ID" >&2
22 # Verify that it is a systemtap server
23 (ps
-e |
grep stap-serverd |
grep -q $pid)
25 echo "$pid is not a systemtap server" >&2
29 # Try to kill the server
31 while kill -s SIGTERM
$pid > /dev
/null
2>&1; do
34 # If we've tried and failed to kill the server for around 10
35 # seconds (20 * 0.5 seconds), quit.
37 if test $i -ge 20; then
38 echo "$pid not shutting down" >&2
This page took 0.041929 seconds and 6 git commands to generate.