Fix to get onos pid in onos-jpenable
This fix fetches pid by searching for karaf.main.Main
rather than karaf.jar
Change-Id: Iad1c5c79ddc1be4787ba9550dddab10ce9bcc592
diff --git a/tools/test/bin/onos-jpenable b/tools/test/bin/onos-jpenable
index 806510f..f6370ec 100755
--- a/tools/test/bin/onos-jpenable
+++ b/tools/test/bin/onos-jpenable
@@ -8,7 +8,7 @@
export JPROFILER_ROOT=${JPROFILER_ROOT:-/opt/jprofiler9}
ssh $ONOS_USER@${1:-$OCI} "
- pid=\$(ps -ef | grep karaf.jar | grep -v grep | cut -c10-15 | tr -d ' ')
+ pid=\$(ps -ef | grep org.apache.karaf.main.Main | grep -v grep | cut -c10-15 | tr -d ' ')
if [ -n \"\$pid\" ]; then
echo \"Enabling profiling for ONOS process \$pid on \$(hostname)...\"
$JPROFILER_ROOT/bin/jpenable --gui --pid=\$pid --port=8849