X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttctl%2Fltt-armall.sh;h=d73cdbaaf349f94bd5996ad681f5a2bae8f44a50;hb=a4dc603fbbc706fbad0b6dcf4b2b56239494e45b;hp=9eda365490dc5052b6cfc65a766dd0f4ff7e55b1;hpb=fde9c319224e496655850ff59c38b8a8659146ee;p=ltt-control.git diff --git a/lttctl/ltt-armall.sh b/lttctl/ltt-armall.sh index 9eda365..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,9 +64,13 @@ if [ ! ${NETWORK} ]; then TESTS="${TESTS} -path '*/net/*_extended' -prune -o" fi -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 echo 1 > ${marker} -done < <(eval "find '${MARKERSROOT}' ${TESTS} -name metadata -prune -o -name enable -print0") +done