X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttctl%2Fltt-armall.sh;h=d73cdbaaf349f94bd5996ad681f5a2bae8f44a50;hb=a4dc603fbbc706fbad0b6dcf4b2b56239494e45b;hp=307f0b13f6084d1112105beea794c51bab874ed7;hpb=d7a3410b5ce5a9cf33c488f8602e9976bef90eeb;p=ltt-control.git diff --git a/lttctl/ltt-armall.sh b/lttctl/ltt-armall.sh index 307f0b1..d73cdba 100755 --- a/lttctl/ltt-armall.sh +++ b/lttctl/ltt-armall.sh @@ -14,7 +14,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -DEBUGFSROOT=$(grep ^debugfs /proc/mounts | head -1 | awk '{print $2}') +DEBUGFSROOT=$(grep ^debugfs /proc/mounts | head -n 1 | awk '{print $2}') MARKERSROOT=${DEBUGFSROOT}/ltt/markers usage () { @@ -24,6 +24,7 @@ usage () { echo "Options:" > /dev/stderr printf "\t-l Also activate locking markers (high traffic)\n" > /dev/stderr printf "\t-n Also activate detailed network markers (large size)\n" > /dev/stderr + printf "\t-i Also activate input subsystem events (security implication: records keyboard inputs)\n" > /dev/stderr echo "" > /dev/stderr printf "\t-q Quiet mode, suppress output\n" > /dev/stderr printf "\t-h Print this help\n" > /dev/stderr @@ -45,6 +46,7 @@ while getopts "lnqh" options; do l) LOCKING="0";; n) NETWORK="0";; q) QUIET="0";; + i) INPUT="0";; h) usage; exit 0;; \?) usage; @@ -62,7 +64,11 @@ if [ ! ${NETWORK} ]; then TESTS="${TESTS} -path '*/net/*_extended' -prune -o" fi -(eval "find '${MARKERSROOT}' ${TESTS} -name metadata -prune -o -name enable -print0") | while read -r -d $'\0' marker; do +if [ ! ${INPUT} ]; then + TESTS="${TESTS} -name input -prune -o" +fi + +(eval "find '${MARKERSROOT}' ${TESTS} -name metadata -prune -o -name enable -print") | while read -r marker; do if [ ! ${QUIET} ]; then echo "Connecting ${marker%/enable}" fi