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