brintos

brintos / linux-shallow public Read only

0
0
Text · 484 B · c32db29 Raw
25 lines · plain
1#!/bin/bash2# description: syscall top3# args: [comm] [interval]4n_args=05for i in "$@"6do7    if expr match "$i" "-" > /dev/null ; then8	break9    fi10    n_args=$(( $n_args + 1 ))11done12if [ "$n_args" -gt 2 ] ; then13    echo "usage: sctop-report [comm] [interval]"14    exit15fi16if [ "$n_args" -gt 1 ] ; then17    comm=$118    interval=$219    shift 220elif [ "$n_args" -gt 0 ] ; then21    interval=$122    shift23fi24perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/sctop.py $comm $interval25