Author

Topic: Trying to write a health monitor but keep getting "No Protocol Specified" (Read 2110 times)

member
Activity: 98
Merit: 11
Figured it out. I needed the following env vars set.

Code:
## Environment variables
export AMDAPPSDKSAMPLESROOT=/opt/AMD-APP-SDK-v2.4-lnx64
export LD_LIBRARY_PATH=/opt/AMD-APP-SDK-v2.4-lnx64/lib/x86_64:
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/phoenix-1.50_patched
export AMDAPPSDKROOT=/opt/AMD-APP-SDK-v2.4-lnx64
export HOME=/home/user
export LOGNAME=user
export DISPLAY=:0
export _=/usr/bin/env

sr. member
Activity: 313
Merit: 250
I am just guessing, but the "No protocol specified" sounds like it comes from the Xserver?

I am collecting some infos with collectd and I had to export Xauthority too, like
export XAUTHORITY=/home/USER_LOGGED_INTO_X_AND_IS_MINING/.Xauthority

But my script runs as the same user which is running the miners.
If you run this as a different user you could try "xauth merge /home/USER_LOGGED_INTO_X_AND_IS_MINING/.Xauthority"
and then the export stuff after that. Or you can play around with xhost and allow localhost for everything or something like that.

Greetings
nnn
member
Activity: 98
Merit: 11
Linux question here. I've got the following code to grab health stats and each command works on its own when I login as a regular user. Some boxes execute ok without having an active X session on my console (via ssh), others require the X session. The GPUs are running fine and my mining is fine. The problem is when I try to run these commands from a shell script. They all complain about "No Protocol Specified". How can I fix this so they will run from a shell script via crontab?

Code:
export DISPLAY=:0
export AMDAPPSDKROOT=/opt/AMD-APP-SDK-v2.4-lnx64
export AMDAPPSDKSAMPLESROOT=/opt/AMD-APP-SDK-v2.4-lnx64
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH}
FAN=`/usr/bin/aticonfig --pplib-cmd "get fanspeed 0"|grep "Fan Speed"|awk -F: '{print $3}'`
TEMP=`/usr/bin/aticonfig --odgt --adapter=$DEVICE | grep -o '[0-9][0-9].[0-9][0-9]' | sed 's/\.[0-9][0-9]//g'`
CLOCK=`/usr/bin/aticonfig --odgc --adapter=$DEVICE | grep "Current Clock"| grep -o '[0-9][0-9][0-9]'|head -n 1`
MEM=`/usr/bin/aticonfig --odgc --adapter=$DEVICE | grep "Current Clock"| grep -o '[0-9][0-9][0-9][0-9]'|tail -n 1`
Jump to: