Bitcoin Forum
May 07, 2024, 04:47:46 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Trying to write a health monitor but keep getting "No Protocol Specified"  (Read 2080 times)
shotgun (OP)
Member
**
Offline Offline

Activity: 98
Merit: 11



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.
1715057266
Hero Member
*
Offline Offline

Posts: 1715057266

View Profile Personal Message (Offline)

Ignore
1715057266
Reply with quote  #2

1715057266
Report to moderator
1715057266
Hero Member
*
Offline Offline

Posts: 1715057266

View Profile Personal Message (Offline)

Ignore
1715057266
Reply with quote  #2

1715057266
Report to moderator
1715057266
Hero Member
*
Offline Offline

Posts: 1715057266

View Profile Personal Message (Offline)

Ignore
1715057266
Reply with quote  #2

1715057266
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715057266
Hero Member
*
Offline Offline

Posts: 1715057266

View Profile Personal Message (Offline)

Ignore
1715057266
Reply with quote  #2

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

Activity: 313
Merit: 250



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 (OP)
Member
**
Offline Offline

Activity: 98
Merit: 11



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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!