Bitcoin Forum
March 28, 2024, 09:09:51 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: [BOUNTY 5BTC] cgminer: add getwork proxy functionality  (Read 8983 times)
zefir (OP)
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



View Profile
September 04, 2013, 07:40:20 AM
 #21

ye from what i can see on bitminter site in "latest shifts" speed is the same like with stratum proxy
only one whats bothering me is blade stats page
with stratum total speed = 13xxx and 99 efficiency but with bfgminer its 12600-12800 with 96 efficiency ;p

Ah, that you mean.

Look into the source code: in driver-getwork.c:handle_getwork() you see how results are processed. The blades sometimes send submit request with empty work field (unclear why this happens), which are counted as HW errors and rejected as 'unknown-work'. Then there are those 'H-not-zero' rejects with a wrong nonce, plus the 'stale' ones.

I assume that the stratum-proxy does not reject some of them (e.g. the empty ones) and since the efficiency provided by the blades is the ratio of accepted to requested work items it differs between bfgminer and stratum-proxy (with bfgminer being more accurate).

My long term values for efficiency reported by blades is 96.4% and matches the expected numbers quite well.

The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
hanti
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
September 04, 2013, 12:22:49 PM
 #22

ok thx for explanation all clear now Wink

liyingfei
Newbie
*
Offline Offline

Activity: 46
Merit: 0



View Profile WWW
September 13, 2013, 12:04:49 PM
 #23

Are you aware of the build process required to follow (pre-reqs, autogen, configure, make)? If not, be sure to read the READMEs.
thx
yes I have done all pre-reqs

我也遇到了这个问题 ubuntu server ,恳请知道 如何解决?

 CC     bfgminer-httpsrv.o
In file included from httpsrv.c:15:0:
/usr/include/microhttpd.h:497:3: error: unknown type name ‘intptr_t’
/usr/include/microhttpd.h:830:5: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:868:46: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:893:55: error: unknown type name ‘va_list’
/usr/include/microhttpd.h:1085:57: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:1087:57: error: unknown type name ‘MHD_ContentReaderCallback’
/usr/include/microhttpd.h:1197:54: error: unknown type name ‘MHD_PostDataIterator’
make[2]: *** [bfgminer-httpsrv.o] Error 1
make[2]: Leaving directory `/root/bfgminer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/bfgminer'
make: *** [all] Error 2

I am working with Linux.
Code:
$ lsb_release -irc
Distributor ID: Ubuntu
Release: 13.04
Codename: raring

$ uname -a
Linux PC 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ gcc --version
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Just tried with a fresh clone of the GIT repository and it worked.

Step-by-Step:
1. ensure you have the required libs installed
Code:
sudo apt-get install libjansson-dev libmicrohttpd-dev libncurses5-dev uthash-dev libcurl4-openssl-dev

2. clone the GIT repository
Code:
git clone https://github.com/luke-jr/bfgminer.git

3. prepare and build
Code:
cd bfgminer
./autogen.sh
./configure --disable-opencl --disable-bitforce --disable-adl --disable-modminer --disable-ztex --disable-avalon --disable-icarus --disable-modminer --disable-x6500
make

If this fails for you, and you have a different system, please post a bug report at https://github.com/luke-jr/bfgminer/issues




thanks for your post   but 。。。。

root@ubuntu:/home/enki/bfgminer# ./bfgminer -V
bfgminer 3.2.0
root@ubuntu:/home/enki/bfgminer# ./bfgminer --http-port
 [2013-09-10 00:05:35] ./bfgminer: --http-port: unrecognized option
rockxie
Sr. Member
****
Offline Offline

Activity: 284
Merit: 254


View Profile
September 27, 2013, 12:00:35 AM
Last edit: October 13, 2013, 02:24:01 PM by rockxie
 #24

Are you aware of the build process required to follow (pre-reqs, autogen, configure, make)? If not, be sure to read the READMEs.
thx
yes I have done all pre-reqs

我也遇到了这个问题 ubuntu server ,恳请知道 如何解决?

 CC     bfgminer-httpsrv.o
In file included from httpsrv.c:15:0:
/usr/include/microhttpd.h:497:3: error: unknown type name ‘intptr_t’
/usr/include/microhttpd.h:830:5: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:868:46: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:893:55: error: unknown type name ‘va_list’
/usr/include/microhttpd.h:1085:57: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:1087:57: error: unknown type name ‘MHD_ContentReaderCallback’
/usr/include/microhttpd.h:1197:54: error: unknown type name ‘MHD_PostDataIterator’
make[2]: *** [bfgminer-httpsrv.o] Error 1
make[2]: Leaving directory `/root/bfgminer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/bfgminer'
make: *** [all] Error 2

I am working with Linux.
Code:
$ lsb_release -irc
Distributor ID: Ubuntu
Release: 13.04
Codename: raring

$ uname -a
Linux PC 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ gcc --version
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Just tried with a fresh clone of the GIT repository and it worked.

Step-by-Step:
1. ensure you have the required libs installed
Code:
sudo apt-get install libjansson-dev libmicrohttpd-dev libncurses5-dev uthash-dev libcurl4-openssl-dev

2. clone the GIT repository
Code:
git clone https://github.com/luke-jr/bfgminer.git

3. prepare and build
Code:
cd bfgminer
./autogen.sh
./configure --disable-opencl --disable-bitforce --disable-adl --disable-modminer --disable-ztex --disable-avalon --disable-icarus --disable-modminer --disable-x6500
make

If this fails for you, and you have a different system, please post a bug report at https://github.com/luke-jr/bfgminer/issues




thanks for your post   but 。。。。

root@ubuntu:/home/enki/bfgminer# ./bfgminer -V
bfgminer 3.2.0
root@ubuntu:/home/enki/bfgminer# ./bfgminer --http-port
 [2013-09-10 00:05:35] ./bfgminer: --http-port: unrecognized option

./configure --disable-opencl --disable-bitforce --disable-adl --disable-modminer --disable-ztex --disable-avalon --disable-icarus --disable-modminer --disable-x6500 --with-libmicrohttpd
zefir (OP)
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



View Profile
September 27, 2013, 05:31:48 AM
 #25

./configure --disable-opencl --disable-bitforce --disable-adl --disable-modminer --disable-ztex --disable-avalon --disable-icarus --disable-modminer --disable-x6500 --with-microhttpd


Must have been added only lately, was enabled by default initially.

Anyway, from numerous users I know that the getwork server is working quite well on Linux systems. There are / were some issues with specific OS / libmicrohttpd version combinations, but once solved, the efforts pay off immediately. To serve ~150 clients over stratum-proxy, I had to use a dual-Xeon machine - now a tiny netbook does the job.

bbxx
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


cryptoshark


View Profile WWW
September 27, 2013, 10:13:49 AM
 #26

Are you aware of the build process required to follow (pre-reqs, autogen, configure, make)? If not, be sure to read the READMEs.
thx
yes I have done all pre-reqs

我也遇到了这个问题 ubuntu server ,恳请知道 如何解决?

 CC     bfgminer-httpsrv.o
In file included from httpsrv.c:15:0:
/usr/include/microhttpd.h:497:3: error: unknown type name ‘intptr_t’
/usr/include/microhttpd.h:830:5: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:868:46: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:893:55: error: unknown type name ‘va_list’
/usr/include/microhttpd.h:1085:57: error: unknown type name ‘uint64_t’
/usr/include/microhttpd.h:1087:57: error: unknown type name ‘MHD_ContentReaderCallback’
/usr/include/microhttpd.h:1197:54: error: unknown type name ‘MHD_PostDataIterator’
make[2]: *** [bfgminer-httpsrv.o] Error 1
make[2]: Leaving directory `/root/bfgminer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/bfgminer'
make: *** [all] Error 2

I am working with Linux.
Code:
$ lsb_release -irc
Distributor ID: Ubuntu
Release: 13.04
Codename: raring

$ uname -a
Linux PC 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ gcc --version
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Just tried with a fresh clone of the GIT repository and it worked.

Step-by-Step:
1. ensure you have the required libs installed
Code:
sudo apt-get install libjansson-dev libmicrohttpd-dev libncurses5-dev uthash-dev libcurl4-openssl-dev

2. clone the GIT repository
Code:
git clone https://github.com/luke-jr/bfgminer.git

3. prepare and build
Code:
cd bfgminer
./autogen.sh
./configure --disable-opencl --disable-bitforce --disable-adl --disable-modminer --disable-ztex --disable-avalon --disable-icarus --disable-modminer --disable-x6500
make

If this fails for you, and you have a different system, please post a bug report at https://github.com/luke-jr/bfgminer/issues




thanks for your post   but 。。。。

root@ubuntu:/home/enki/bfgminer# ./bfgminer -V
bfgminer 3.2.0
root@ubuntu:/home/enki/bfgminer# ./bfgminer --http-port
 [2013-09-10 00:05:35] ./bfgminer: --http-port: unrecognized option

./configure --disable-opencl --disable-bitforce --disable-adl --disable-modminer --disable-ztex --disable-avalon --disable-icarus --disable-modminer --disable-x6500 --with-microhttpd


hi i have newest rasbian and pi512
i have configured with microhttpd
but same result
unrecognized option

bfgminer 3.2.90

to reproduce

git clone https://github.com/luke-jr/bfgminer.git
./autogen.sh
 ./configure --disable-opencl --disable-bitforce --disable-adl --disable-modminer --disable-ztex --disable-avalon --disable-icarus --disable-modminer --disable-x6500 --with-microhttpd
make
./bfgminer --http-port 8332
 [2013-09-27 10:13:16] ./bfgminer: --http-port: unrecognized option

thanks




bbxx
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


cryptoshark


View Profile WWW
September 27, 2013, 04:04:32 PM
 #27

i found an error

should be --with-microhttpd
instead of --with-libmicrohttpd

now it works

but workers are SGW0 1 etc
not like in blade user configuration
zefir (OP)
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



View Profile
September 27, 2013, 04:20:51 PM
 #28

i found an error

should be --with-microhttpd
instead of --with-libmicrohttpd

now it works

but workers are SGW0 1 etc
not like in blade user configuration

Workers are just counted up incrementally based on their username - which is very useful since it allows you to partition your farm arbitrary. In my setup, I have 8 racks of blades operating. I give all blades within a rack the same username, resulting in bfgminer treating them as unit, i.e. I see SGW0-7 and immediately know which rack has problems.

In effect, you have a fine-grained statistics chain: each blade reports individual stats; bfgminer reports stats per rack; pool reports global stats. You could even add more intermediate stats layers by connecting bfgminer instances hierarchically, e.g. one main bfgminer serving over getwork server other bfgminers for your sub-domains.

bbxx
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


cryptoshark


View Profile WWW
September 27, 2013, 06:05:18 PM
 #29

yeah but i have 5 blades and solomining shitcoins for fun.

blades goes sick often and then i have to restart them, problem is to keep them in proper numbers i have to turn them on in order it is annoying Smiley

if instead SGW-0 would be SGW-0-workername (from the auth lan blade) it would be much easier for everybody Smiley
rockxie
Sr. Member
****
Offline Offline

Activity: 284
Merit: 254


View Profile
October 12, 2013, 02:23:35 PM
 #30

I always met a problem of "Segmentation fault (core dumped)" after running for a while, and the terminal closed automaticly. (ubuntu)

Any ideas?
zefir (OP)
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



View Profile
October 12, 2013, 05:37:26 PM
 #31

I always met a problem of "Segmentation fault (core dumped)" after running for a while, and the terminal closed automaticly. (ubuntu)

Any ideas?

Crashes happen with any miner now and then. You need to run bfgminer from a looping script to prevent your boards from idling.

I am using this one:
Code:
#!/bin/bash

ROOTDIR="$HOME/usr/bin"
MINER_BIN="$ROOTDIR/bfgminer"
CFG="$ROOTDIR/BEB-bfgminer.conf"
STARTLOG="$ROOTDIR/miner_startlog.txt"
LOG="$ROOTDIR/miner.log"

miner_run() {
MINER="$MINER_BIN --http-port 8332 -Q 50 -c $CFG"
echo "Starting '$MINER' at $(date)..." >> $STARTLOG
$MINER 2>> $LOG
echo "Terminated at $(date)" >> $STARTLOG
}

while true; do
miner_run
sleep 5
done

exit 0

Save this as $HOME/usr/bin/BEB-bfgminer.sh and adapt the related variables for your configuration. Run this script with screen and you have the perfect control over it for local and remote access. To have it started during boot-up, add this line to your /etc/rc.local:
Code:
sudo -u <your_username> screen -dmS "BEB-bfgminer" /home/<your_username>/usr/bin/BEB-bfgminer.sh

To attach to the miner's screen session, run
Code:
screen -r BEB-bfgminer
to detach from the screen session press <Control-a><d>.

If you happened to forget detaching and want to attach from a different terminal / location, you can force detaching the previous session and take over with
Code:
screen -rd BEB-bfgminer

Finally, you can follow the log from local or remote sessions with
Code:
tail -f $HOME/usr/bin/miner.log


Happy mining Wink

Luke-Jr
Legendary
*
Offline Offline

Activity: 2576
Merit: 1186



View Profile
October 12, 2013, 05:40:07 PM
 #32

Crashes aren't a given, but I'd need at least a backtrace to try to debug it :/

zefir (OP)
Donator
Hero Member
*
Offline Offline

Activity: 919
Merit: 1000



View Profile
October 12, 2013, 09:24:23 PM
 #33

Crashes aren't a given, but I'd need at least a backtrace to try to debug it :/

Right, fighting the symptoms is always the second best choice.

Problem is, I never found a crash report or core dump while running bfgminer on my Ubuntu system, but from the startlog I know it restarts every now and then (in the order of once per week). Since this happens without interaction, I conclude those must be crashes - which might not be correct.

Luke-Jr
Legendary
*
Offline Offline

Activity: 2576
Merit: 1186



View Profile
October 12, 2013, 09:58:47 PM
 #34

ulimit -c unlimited #to enable core dumps Smiley

rockxie
Sr. Member
****
Offline Offline

Activity: 284
Merit: 254


View Profile
October 15, 2013, 09:49:58 AM
 #35

I always met a problem of "Segmentation fault (core dumped)" after running for a while, and the terminal closed automaticly. (ubuntu)

Any ideas?

Crashes happen with any miner now and then. You need to run bfgminer from a looping script to prevent your boards from idling.

I am using this one:
Code:
#!/bin/bash

ROOTDIR="$HOME/usr/bin"
MINER_BIN="$ROOTDIR/bfgminer"
CFG="$ROOTDIR/BEB-bfgminer.conf"
STARTLOG="$ROOTDIR/miner_startlog.txt"
LOG="$ROOTDIR/miner.log"

miner_run() {
MINER="$MINER_BIN --http-port 8332 -Q 50 -c $CFG"
echo "Starting '$MINER' at $(date)..." >> $STARTLOG
$MINER 2>> $LOG
echo "Terminated at $(date)" >> $STARTLOG
}

while true; do
miner_run
sleep 5
done

exit 0

Save this as $HOME/usr/bin/BEB-bfgminer.sh and adapt the related variables for your configuration. Run this script with screen and you have the perfect control over it for local and remote access. To have it started during boot-up, add this line to your /etc/rc.local:
Code:
sudo -u <your_username> screen -dmS "BEB-bfgminer" /home/<your_username>/usr/bin/BEB-bfgminer.sh

To attach to the miner's screen session, run
Code:
screen -r BEB-bfgminer
to detach from the screen session press <Control-a><d>.

If you happened to forget detaching and want to attach from a different terminal / location, you can force detaching the previous session and take over with
Code:
screen -rd BEB-bfgminer

Finally, you can follow the log from local or remote sessions with
Code:
tail -f $HOME/usr/bin/miner.log


Happy mining Wink


Thank you zefir ,this is useful to me  Grin
Pages: « 1 [2]  All
  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!