Search content
Sort by

Showing 8 of 8 results by jogger1
Post
Topic
Board Hardware
Re: GekkoScience 2Pac BM1384 Stickminer Official Support Thread
by
jogger1
on 18/04/2018, 16:29:41 UTC
Don’t attach to the screen.
Run your main script file inside it.
Thanks vh, i think i figured out a decent crontab with an added @reboot command. So every 4 hours i start by killall screens, rerun the miner script after 5 minutes and then reboot my machine at 1am and start everything up again. Testing it today seems to be working so far, will test it the rest of the week to see how successful my method is.

Thanks for the help!
Post
Topic
Board Hardware
Re: GekkoScience 2Pac BM1384 Stickminer Official Support Thread
by
jogger1
on 17/04/2018, 23:04:38 UTC

Yes, ^M is interpreted by screen to send a (Cr) into the terminal.

The remaining piece:

forever run cgminer with a restart every 4 hours.

second terminal
Code:
while [ true ]; do
    timeout 4h /home/pi/git/vthoang/cgminer/cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64
    sleep 5
done

finishing it up:

runtask.sh
Code:
#!/bin/bash
screen_name=miner1

if [[ `screen -ls | grep $screen_name | wc -l` -eq 0 ]]; then
    screen -dmS $screen_name
fi

screen -S $screen_name -X stuff ^C^C^C

screen -S $screen_name -X stuff "
while [ true ]; do
    timeout 4h /home/pi/git/vthoang/cgminer/cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64
    sleep 5
done
"

crontab
Code:
@reboot /home/pi/git/vthoang/cgminer/runtask.sh


on reboot:
check for existing screens, and attach to confirm
Code:
screen -ls
screen -x miner1



So my script writing abilities arent that good, but im just trying to make a simple script (i mean ELI5 simple) and here is what i got so far.

Code:
#!/bin/bash
screen -dmS miner1
screen -S miner1 -X stuff "timeout 10s /home/pi/git/vthoang/cgminer/cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64 ^M
done"
screen -S miner1 -r

Now here is where i am stuck. (i know i have this timeout at 10s) but once the timeout is done the screen goes back to command line and the rest of my script doesnt run. Now when i type in exit on the command line then the next part of my script starts up (which is a replica of the above script). I have tried everything to get the exit command to go into the command line after the first part of the script runs, but nothing happens.

What can i do to get my screen to exit so the rest of my script can run?

Thanks and sorry for the elementary abilities. I am having fun learning on the way, it has taken me 5 days to get where i am now!

Here is where i am stuck

Code:
#!/bin/bash
{
#
#first instance
#
screen -dmS miner1
screen -S miner1 -X stuff "timeout 10s /home/pi/git/vthoang/cgminer/cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64 ^M
done"
screen -S miner1 -r

i need this to insert exit into the command line and go

#
#second instance
#
screen -dmS miner1
screen -S miner1 -X stuff "timeout 30s /home/pi/git/vthoang/cgminer/cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64 ^M
done"
screen -S miner1 -r

i need this to insert exit into the command line and go

#
#third instance
#
screen -dmS miner1
screen -S miner1 -X stuff "killall screen
exit"
screen -S miner1 -r

} 2>&1 | tee script-error.log
Post
Topic
Board Hardware
Re: GekkoScience 2Pac BM1384 Stickminer Official Support Thread
by
jogger1
on 17/04/2018, 11:53:54 UTC
You'll lose cgminer's interactive ui that way.
Practice a little bit of screen manipulation first, then revisit the script.

open two bash terminals

first terminal
Code:
screen -dmS miner1

second terminal
Code:
screen -x miner1

first terminal
Code:
screen -S miner1 -X stuff "/home/pi/git/vthoang/cgminer/cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64 ^M"

first terminal
Code:
pkill cgminer

first terminal
Code:
screen -S mine -X stuff "/home/pi/git/vthoang/cgminer/cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64 ^M"


Very cool, i see it working when i manually input the commands (it seems i had to install screen into raspbian stretch first). Now i will have to make it into a script. Thanks vh!

One question, what does the ^M do at the end of the cgminer configs command? I dont see that in the list of configs for cgminer.
Post
Topic
Board Hardware
Re: GekkoScience 2Pac BM1384 Stickminer Official Support Thread
by
jogger1
on 16/04/2018, 20:07:10 UTC
./autogen.sh: 4: ./autogen.sh: autoreconf: not found

You are moving forward a few steps, which is a good sign.
NOOBS probably left out some things not found by default in the raspbian stretch lite image used as a base to create those initial post instructions.

Code:
sudo apt-get install -y autoconf


Hey vh, not sure if you can help, but i am trying to set up a crontab with a script to automatically stop and restart the miner on a pi raspbian stretch. Not sure why this script isnt working but can anyone lend a hand on what is wrong with my script?

Here is my script

runtask.sh

Code:
#!/bin/bash
pkill cgminer
CURRENTDATE=`date`
echo Cron Job Started: ${CURRENTDATE} >>/home/pi/git/vthoang/cgminer/runtask-log.txt
sleep 5
cd ~/git/vthoang/cgminer/
./cgminer --gekko-2pac-freq 180 -o stratum+tcp://bch.viabtc.com:3333 -u usaminer.2 -p 1 --suggest-diff 64
CURRENTDATE=`date`
echo Cron Job Finished: ${CURRENTDATE} >>/home/pi/CronOutput/cron.txt
exit

In my crontab i have

Code:
* */4 * * * pi /home/pi/git/vthoang/cgminer/runtask.sh >> /home/pi/git/vthoang/cgminer/taskerror.log 2>&1

I keep getting all sort of errors with different edits i try, but the one thing that always works in the script is pkill cgminer after that nothing works.

The script always stops at whatever i do especially at cd ~/git/vthoang/cgminer - all the different ways i have tried dont work.

Is there something that you guys have done that makes a good crontab script work with cgminer? I know in cgminer i can schedule start and stop arguments, but those are only one offs for one time in the day. I wanted to be able to start and restart cgminer at 4 hour increments everyday.

Thanks for anyone who can help on this.  Have sepnt the last 4 days trying to get this work with no success.
Post
Topic
Board Hardware
Re: GekkoScience 2Pac BM1384 Stickminer Official Support Thread
by
jogger1
on 11/04/2018, 16:34:56 UTC
Hello jogger1,
the view is alway on the pot, so the heat sink on the side away from you, with the usb port facing down.
I have no actual amp values. But there is a table with an overview of values in post #1. I had found them not perfectly correct but nearly.
If you want to adjust the fequency up, just do it and check for HW errors comming in. If there are any, turn the pot a bit clockwise until there are no new HW errors coming in. If your hub isn´t strong enough the stick will zombie. That´s the easiest way to check.
But I think at 2 or 3 o´clock 200 MHz should be possible.

So what does the vcore part do on the left hand side? I have my usb multimeter hooked up to my stick but i dont see that reading on there? When i turn my pot clockwise to the right (2 oclock 3 oclock position) my amps go down, when i turn my pot to the left counterclockwise (to the 1 oclock noon position) i see my amps increase to like 1.69, am i reading something wrong or understanding something wrong?
Post
Topic
Board Hardware
Re: GekkoScience 2Pac BM1384 Stickminer Official Support Thread
by
jogger1
on 11/04/2018, 13:29:06 UTC
currently have the pots pointing towards 5 o'clock running at 250htz. i get about 24hrs until they need restarting with ~9 hardwre faults.

still tweeking. my aim is to have them running @ 300 stable. we'll see. but its good fun getting it all work. the long term plan it to have 5 of these running on a ras-pi in a little cooled box that i'm designing so it can sit on my desk at work :-)

zac

Are you still running one at a time? Are you able to run one alone at 200 MHz at 3 o´clock? I think that 3 Amps isn´t enough for 250 MHz to run stable.
What happens after 24 hours? Do they go zombie?

In my experience putting them into a box isn´t the best solution. I tried this, even with an open case and two fans. They get hotter than with my current setup, open just inside the hub with the arctic breeze fans.

Hello der_wasi, when you say in some of your comments you turn the pot clockwise to say the 3 oclock or 5 oclock position, which way is the stick facing with the usb towards you or the heatsink towards you? And what are your amps reading when you get to 200 or higher? I am running my sticks at 150 at 1.19amps clock about 2 oclock position, these pot are sensitive when you move them, but would like to try it at 175 or 190ish to see what i can get out of these.

Thanks for clarifying.
Post
Topic
Board Computer hardware
Re: [FOR SALE/DONATION] GekkoScience 2Pac USB stick FACTORY SECONDS
by
jogger1
on 14/12/2017, 04:54:47 UTC
Ok, just so i understand i believe these seconds have HW errors at stock speeds (pot at 2 oclock and 100mhz) but work with no errors at overclocked speeds like 200 to 250?
Post
Topic
Board Computer hardware
Re: [FOR SALE/DONATION] GekkoScience 2Pac USB stick FACTORY SECONDS
by
jogger1
on 14/12/2017, 03:00:31 UTC
I would like to get some of these, PM sent. Thanks!