diff options
Diffstat (limited to 'common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh')
-rw-r--r-- | common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh b/common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh new file mode 100644 index 00000000..3fc74e52 --- /dev/null +++ b/common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +ACTION=$1 + +function start_remote_agent { + if [ -z "`cat /proc/modules | grep amdtPwrProf`" ]; then + insmod /opt/codexl/amdtPwrProf.ko + fi + export DISPLAY=:0 + /opt/codexl/CodeXLRemoteAgent +} + +function stop_remote_agent { + killall -q CodeXLRemoteAgent-bin + if [ -n "`cat /proc/modules | grep amdtPwrProf`" ]; then + rmmod amdtPwrProf + fi +} + +if [ $ACTION = "start" ]; then + echo "START the remote agent" + stop_remote_agent + start_remote_agent +else + echo "STOP the remote agent" + stop_remote_agent +fi |