Bitcoin Forum
November 24, 2017, 11:01:15 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Trying to write a health monitor but keep getting "No Protocol Specified"  (Read 1977 times)
shotgun
Member
**
Offline Offline

Activity: 98



View Profile
July 23, 2011, 06:30:09 AM
 #1

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`

<luke-jr> Catholics do not believe in freedom of religion.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511564475
Hero Member
*
Offline Offline

Posts: 1511564475

View Profile Personal Message (Offline)

Ignore
1511564475
Reply with quote  #2

1511564475
Report to moderator
1511564475
Hero Member
*
Offline Offline

Posts: 1511564475

View Profile Personal Message (Offline)

Ignore
1511564475
Reply with quote  #2

1511564475
Report to moderator
1511564475
Hero Member
*
Offline Offline

Posts: 1511564475

View Profile Personal Message (Offline)

Ignore
1511564475
Reply with quote  #2

1511564475
Report to moderator
nomnomnom
Sr. Member
****
Offline Offline

Activity: 312



View Profile
July 24, 2011, 05:19:15 PM
 #2

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
shotgun
Member
**
Offline Offline

Activity: 98



View Profile
July 24, 2011, 07:20:21 PM
 #3

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


<luke-jr> Catholics do not believe in freedom of religion.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!