1 # Copyright (C) 2009 Benjamin Poirier
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, write to the Free Software Foundation, Inc.,
15 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 DEBUGFSROOT
=$
(grep ^debugfs
/proc
/mounts |
head -n 1 |
awk '{print $2}')
18 MARKERSROOT
=${DEBUGFSROOT}/ltt
/markers
21 echo "Usage: $0 [OPTION]..." > /dev
/stderr
22 echo "Disconnect lttng markers" > /dev
/stderr
24 echo "Options:" > /dev
/stderr
25 printf "\t-q Quiet mode, suppress output\n" > /dev
/stderr
26 printf "\t-h Print this help\n" > /dev
/stderr
30 if [ ! "${DEBUGFSROOT}" ]; then
31 echo "Error: debugfs not mounted" > /dev
/stderr
35 if [ ! -d "${MARKERSROOT}" ]; then
36 echo "Error: LTT trace controller not found (did you compile and load LTTng?)" > /dev
/stderr
40 while getopts "qh" options
; do
49 shift $
((${OPTIND} - 1))
51 (eval "find '${MARKERSROOT}' -name metadata -prune -o -name enable -print") |
while read -r marker
; do
52 grep "^1$" "${marker}" -q
56 if [ ! ${QUIET} ]; then
57 echo "Disconnecting ${marker%/enable}"
This page took 0.033574 seconds and 4 git commands to generate.