Pages:
Author

Topic: poclbm autostart on Ubuntu 10.10? (30 BTC) - page 2. (Read 11268 times)

full member
Activity: 238
Merit: 100
February 24, 2011, 08:03:09 AM
#14
Is there any way to permanently set the clock (aticonfig --odsc=x,x) and fanspeed values so that they don't change after the reboot?

Fanspeed, no: resets after each X restart to auto.  Clock, yes:
Code:
aticonfig --odcc --adapter=all
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
February 24, 2011, 07:51:25 AM
#13
Is there any way to permanently set the clock (aticonfig --odsc=x,x) and fanspeed values so that they don't change after the reboot?
full member
Activity: 238
Merit: 100
February 22, 2011, 01:46:32 PM
#12
Hm, so what is the "own X screen" thing? In fact at least the aticonfig utility worked as root. I tried running poclbm as root, but then of course it failed because root doesn't have the SDK variables set (I suppose). Maybe it would have worked as root
It would have worked if you had set LD_CONFIG_PATH and DISPLAY variables.

Quote
The confusing thing was that if I tried to ssh before logging in on the PC, it wouldn't work (poclbm would only find the CPU), and once I logged in on the PC it would work. So I guess by logging in on the PC directly (without ssh), I got to "own the X screen"? I always used the export DISPLAY=:0 line...

X server is what controls the screen. If you do not log in through console and start your gnome session, it is "owned" by gdm, the display that shows login prompt. Since you do not control the screen, you cannot send commands to the graphics card. Either you need to login via console (and then the operating system recognizes that you control the screen), or mine as root that can do anything.

Quote
However, I already sent 10 BTC to Raulo because I promised to send some coins in the other threat about basic setup.

I wish I already had more BTC to spend :-)

Thanks. I wish you luck.
newbie
Activity: 47
Merit: 0
February 22, 2011, 01:22:12 PM
#11
Quote
DISPLAY and SDK paths are all you need. And if you do not own X screen (i.e., did not logged in via console before), you have to be root.

Hm, so what is the "own X screen" thing? In fact at least the aticonfig utility worked as root. I tried running poclbm as root, but then of course it failed because root doesn't have the SDK variables set (I suppose). Maybe it would have worked as root.

The confusing thing was that if I tried to ssh before logging in on the PC, it wouldn't work (poclbm would only find the CPU), and once I logged in on the PC it would work. So I guess by logging in on the PC directly (without ssh), I got to "own the X screen"? I always used the export DISPLAY=:0 line...

Bounty for gusti - OK. I still didn't get round to trying it. My mother just came to visit, so please be patient - might even be a couple of days before I can try it.

However, I already sent 10 BTC to Raulo because I promised to send some coins in the other threat about basic setup.

I wish I already had more BTC to spend :-)

full member
Activity: 238
Merit: 100
February 22, 2011, 11:22:43 AM
#10
Quote
Any ideas what might be causing the problems with ssh?

DISPLAY and SDK paths are all you need. And if you do not own X screen (i.e., did not logged in via console before), you have to be root.

What errors do you have?

Quote
Is there a straightforward way to turn the log file into a rotating log?

Without killing poclbm, you would have to modify the poclbm source to log into files. 

If you don't mind killing poclbm, this script would do the trick

Code:
#!/bin/bash
#adjust the step to your needs
step=86400
 while true; do
   suffix=`date +%s`                                                                                                                                                               
   name=mininglog.$suffix                                                                                                                                                           
   echo $suffix >$name                                                                                                                                                             
   date >>$name                                                                                                                                                                     
   ./poclbm.py -v -f 2 -d 1 -o ***  -p 8332 -u **** --pass=**** -w 128 -r 60  >>$name   &                       
    sleep $step
# killing the old miner
   ps auxw |grep poclbm|grep 8332|awk '{print $2}' |xargs kill
# put date
   date >>$name                                                                                                                                                                     
   date +%s >>$name                                                                                                                                                                         
 done   

It will create a log with Unix time as the suffix and will add starting and ending timestamps to the log.

P.S. I don't claim the original bounty. It should go to gusti. 
legendary
Activity: 1099
Merit: 1000
February 22, 2011, 11:00:45 AM
#9
Thanks, will try that later. I guess my question was a bit premature, as I had not even really tried a startup script. I first tried to start poclbm via ssh and it failed, so I just assumed the same problem would appear with autostart.

Any ideas what might be causing the problems with ssh?

Anyway, once I got it working (the autostart), I'll send the BTC.

Is there a straightforward way to turn the log file into a rotating log?

Surely the "export display" option was missing.
You can rotate the logs with logrotate utility.
newbie
Activity: 47
Merit: 0
February 22, 2011, 10:55:58 AM
#8
Thanks, will try that later. I guess my question was a bit premature, as I had not even really tried a startup script. I first tried to start poclbm via ssh and it failed, so I just assumed the same problem would appear with autostart.

Any ideas what might be causing the problems with ssh?

Anyway, once I got it working (the autostart), I'll send the BTC.

Is there a straightforward way to turn the log file into a rotating log?
full member
Activity: 238
Merit: 100
February 22, 2011, 09:56:44 AM
#7
Doing that only does not work with e.g. DiabloMiner
You need to call the start script from a 2nd. machine 

Original poster asked for poclbm.

I can only confirm that a script in /etc/rc.local that sets DISPLAY and SDK paths works. Just tested.

For two cores, one has to run each separately in background
Code:
./poclbm -d 1 -params > output1 2>&1 &
./poclbm -d 2 -params > output2 2>&1 &

The same script can set fan speed (which resets each Xorg restart).

 
legendary
Activity: 1099
Merit: 1000
February 22, 2011, 09:32:33 AM
#6
Any script that sets SDK library paths, DISPLAY=:0 and runs as root should do the trick.

Doing that only does not work with e.g. DiabloMiner
You need to call the start script from a 2nd. machine 
legendary
Activity: 1099
Merit: 1000
February 22, 2011, 09:31:12 AM
#5
OK, here we go.
You need to add your start command in /etc/init.d/rc.local

rc.local must be :

export LD_LIBRARY_PATH=/usr/lib
export LD_LIBRARY_PATH=/ati-stream-sdk-v2.1-lnx32/lib/x86
export DISPLAY=:0
/bitcoin-0.3.19/bin/32/bitcoind  >> bitcoind.log 2>&1 &
sleep 5
poclbm (options)   >> poclbm.log 2>&1 &


If that does not work (as in DiabloMiner) you need to call rc.local from a 2nd machine, like :

ssh 192.168.0.2 /etc/init.d/rc.local

where 192.168.0.2 is your ubuntu machine, and you already have passwordless auth between ubuntu and 2nd
machine.
full member
Activity: 238
Merit: 100
February 22, 2011, 09:29:30 AM
#4
Any script that sets SDK library paths, DISPLAY=:0 and runs as root should do the trick.

edit:

Code:
export DISPLAY=:0
export LD_LIBRARY_PATH=/path/to/sdk:$LD_LIBRARY_PATH
pocmldir/poclbm.py --parametes

Put the script is some file and  run it from /etc/rc.local

I'll test it and post it after I reboot the machine Smiley
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
February 22, 2011, 09:25:03 AM
#3
Posted. Wink
legendary
Activity: 1099
Merit: 1000
February 22, 2011, 09:19:17 AM
#2
I will take the job.
Do you wish the solution be posted public or private ?
newbie
Activity: 47
Merit: 0
February 22, 2011, 09:05:21 AM
#1
Hi,

I offer 30BTC if somebody can help me to get poclbm to autostart. I already have bitcoind starting automatically, and poclbm works if I login on the mining computer and start it. Currently the environment variables for the Ati Stream SDK are only set for the user I login with.

However, I want it to run automatically when the PC boots up, without anybody logging in.

I have a Radeon 5970 card (2 GPUs).

Thanks!
Pages:
Jump to: