summaryrefslogtreecommitdiffstats
path: root/stap-stop-server
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-08-06 12:06:06 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-08-06 12:06:06 -0400
commit3c4371661f144c331dd55ee6be8dab57ec2323c8 (patch)
tree217ccf5864840f14670138b592d90eceacc75fa3 /stap-stop-server
parent44ab6f3be72e7b5eeaa2514cea0553b87007ee9c (diff)
parent0317fad416059781b7a152296c1d8b5a012bf925 (diff)
downloadsystemtap-steved-3c4371661f144c331dd55ee6be8dab57ec2323c8.tar.gz
systemtap-steved-3c4371661f144c331dd55ee6be8dab57ec2323c8.tar.xz
systemtap-steved-3c4371661f144c331dd55ee6be8dab57ec2323c8.zip
Merge commit 'origin/master' into pr4225
* commit 'origin/master': Use relative instead of absolute line. (bug 6611) move post-0.7 news tidbit to the top Add test for $$vars, $$params, $$locals. typographical tweaks for embedded script code Add $$vars, $$parms, $$locals Rename $path to $pathname of syscall tapset for 2.6.27 Correct several tests for 2.6.27 c code generation: assert C indentation/nesting cancels out at appropriate points Tweak test_installcheck for helloworld.meta and traceio2.meta. Run both tests for installcheck tests. No need for random suffix file cmdline and sysinfo files in the Ensure that a systemtap server is available if 'server' is specified session.h (struct systemtap_session): Added itrace_derived_probe * syscalls2.stp: Add sys_unlinkat. Fix on_each_cpu() call for kernels >2.6.26. Remove unused STAPCONF_MODULE_NSECTIONS
Diffstat (limited to 'stap-stop-server')
-rwxr-xr-xstap-stop-server30
1 files changed, 30 insertions, 0 deletions
diff --git a/stap-stop-server b/stap-stop-server
new file mode 100755
index 00000000..5afcf705
--- /dev/null
+++ b/stap-stop-server
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Start a systemtap server
+#
+# Copyright (C) 2008 Red Hat Inc.
+#
+# This file is part of systemtap, and is free software. You can
+# redistribute it and/or modify it under the terms of the GNU General
+# Public License (GPL); either version 2, or (at your option) any
+# later version.
+
+# This script attempts to stop a systemtap server with the
+# given pid.
+
+# Get the process id.
+pid=$1
+if test "X$pid" = "X"; then
+ echo "Usage: $0 PROCESS_ID" >&2
+ exit 1
+fi
+
+# Verify that it is a systemtap server
+(ps -a | grep stap-serverd | grep -q $pid)
+if test $? != 0; then
+ echo "$pid is not a systemtap server"
+ exit 1
+fi
+
+# Try to kill the server
+kill -s SIGTERM $pid