run-monitor-libnetmon.sh 441 Bytes
Newer Older
1
#!/bin/sh
2 3 4

if [ $# != 2 ]; then
    echo "Usage: $0 pid eid"
5 6 7
    exit 1;
fi

8 9 10 11 12 13 14
PID=$1
EID=$2

SCRIPT=`which $0`
SCRIPT_LOCATION=`dirname $SCRIPT`
BIN_LOCATION=$SCRIPT_LOCATION/../libnetmon/
BIN=netmond
15

16 17 18 19
if ! [ -x $BIN_LOCATION/$BIN ]; then
    echo "$BIN_LOCATION/$BIN missing - run 'gmake' in $BIN_LOCATION to build it"
    exit 1;
fi
20

21 22
echo "Starting up netmond for $PID $EID";
$BIN_LOCATION/$BIN | python monitor.py ip-mapping.txt $PID $EID