24 lines · 485 B · Text
RawDownload
#!/bin/bash# description: syscall top# args: [comm] [interval]n_args=0for i in "$@"do    if expr match "$i" "-" > /dev/null ; then	break    fi    n_args=$(( $n_args + 1 ))doneif [ "$n_args" -gt 2 ] ; then    echo "usage: sctop-report [comm] [interval]"    exitfiif [ "$n_args" -gt 1 ] ; then    comm=$1    interval=$2    shift 2elif [ "$n_args" -gt 0 ] ; then    interval=$1    shiftfiperf trace $@ -s ~/libexec/perf-core/scripts/python/sctop.py $comm $interval