Bitcoin Forum
December 03, 2016, 11:47:15 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 ... 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 [556] 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 ... 830 »
  Print  
Author Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.9.2  (Read 4815075 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
PSL
Member
**
Offline Offline

Activity: 113


View Profile
June 17, 2013, 07:29:12 PM
 #11101

One of files in GIT repository is source api-example.c

There is an instruction to compile this program at the begging of source:
Code:
gcc api-example.c -I compat/jansson -o cgminer-api

Unfortunately, it is not working some CL/cl.h file is missing...

This is a patch to fix it:

Code:
$ git diff
diff --git a/api-example.c b/api-example.c
index 71b5b00..90cfe5b 100644
--- a/api-example.c
+++ b/api-example.c
@@ -23,7 +23,6 @@
 #include <sys/types.h>
 
 #include "compat.h"
-#include "miner.h"
 
 #if defined(unix)
        #include <errno.h>
@@ -284,7 +283,7 @@ int main(int argc, char *argv[])
                if (strcmp(argv[1], "-?") == 0
                ||  strcmp(argv[1], "-h") == 0
                ||  strcmp(argv[1], "--help") == 0) {
-                       fprintf(stderr, "usAge: %s [command [ip/host [port]]]\n", argv[0]);
+                       fprintf(stderr, "Usage: %s [command [ip/host [port]]]\n", argv[0]);
                        return 1;
                }
 

Once fixed and compiled, it can control cgminer, like this:
Code:
./cgminer-api 'addpool|http://p2pool.org:9327,Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH,x'

./cgminer-api 'pools|' locahost 4028

./cgminer-api -h
Usage: ./cgminer-api [command [ip/host [port]]]
1480765635
Hero Member
*
Offline Offline

Posts: 1480765635

View Profile Personal Message (Offline)

Ignore
1480765635
Reply with quote  #2

1480765635
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
PSL
Member
**
Offline Offline

Activity: 113


View Profile
June 17, 2013, 07:42:13 PM
 #11102

I cannot add p2pool through API:
Code:
echo "addpool|http://p2pool.org:9327,Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH,x" | nc localhost 4028
STATUS=S,When=1371456527,Code=55,Msg=Added pool 'http://p2pool.org:9327',Description=cgminer 3.2.2|

I don't understand why but newline is a troublemaker for stratum configurations. This command works, pool is added and it is alive (-n was added to echo):
Code:
echo -n "addpool|http://p2pool.org:9327,Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH,x" | nc localhost 4028
STATUS=S,When=1371456527,Code=55,Msg=Added pool 'http://p2pool.org:9327',Description=cgminer 3.2.2|

JSON syntax works too:
Code:
echo '{"command":"addpool", "parameter":"http://p2pool.org:9327,Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH,x"}' | nc localhost 4028
{"STATUS":[{"STATUS":"S","When":1371504122,"Code":55,"Msg":"Added pool 'http://p2pool.org:9327'","Description":"cgminer 3.2.2"}],"id":1}

I think I miss an API command, to FREEZE cgminer; something like that is needed to remove active pools and to load new configuration. With current API, I can do it but I have to use tricks to remove active pools and the result is not perfect. There is always one pool that is active and active pool cannot be removed even  it is disabled. And when pool 0 is removed, it is replaced with the last pool, so order is changed, etc. Well, it is tricky to replace pools through API...

BTW, I play with API because drivers for 7790 at Linux are so bad that I cannot restart cgminer; to change cgminer configuration, I have to reboot PC. HD7790 is stable it runs ok but when I quit cgminer, I cannot start it again until I reboot PC; and there is other bug that autologin to X doesn't work when you have more than one 7790, so manual login is required.
moroz
Newbie
*
Offline Offline

Activity: 22


View Profile
June 17, 2013, 08:21:01 PM
 #11103

I cannot add p2pool through API:
Code:
echo "addpool|http://p2pool.org:9327,Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH,x" | nc localhost 4028
STATUS=S,When=1371456527,Code=55,Msg=Added pool 'http://p2pool.org:9327',Description=cgminer 3.2.2|

I don't understand why but newline is a troublemaker for stratum configurations. This command works, pool is added and it is alive (-n was added to echo):
Code:
echo -n "addpool|http://p2pool.org:9327,Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH,x" | nc localhost 4028
STATUS=S,When=1371456527,Code=55,Msg=Added pool 'http://p2pool.org:9327',Description=cgminer 3.2.2|

I think I miss an API command, to FREEZE cgminer; something like that need it to remove active pools and to load new configuration. With current API, I can do it but I have to use tricks to remove active pools and the result is not perfect. There is always one pool that is active and active pool cannot be removed even  it is disabled. And when pool 0 is removed, it is replaced with the last pool, so order is changed, etc. Well, it is tricky to replace pools through API...


Nice workaround! This stratum behavior is strange tho.
About active zero pool, atm i am trying: add new pools, switch new pools to highest priority, disable and remove old ones (with delays). It is working.
I was thinking of adding all of the pools to default cgminer config and disable them at startup. Bring em up when necessary (enable/increase priority). This should circumvent any add/remove glitches.
PSL
Member
**
Offline Offline

Activity: 113


View Profile
June 17, 2013, 08:34:09 PM
 #11104

I was thinking of adding all of the pools to default cgminer config and disable them at startup. Bring em up when necessary (enable/increase priority). This should circumvent any add/remove glitches.

I already tried this before but there is a trouble with startum (again!! ;-) pools. When I disable stratum pool, cgminer ignores that pool is disabled at feeds data from disabled stratum and it can be something you don't want because stratum for LTC has different information than stratum for FTC; I use --failover-only switch.
atomicchaos
Hero Member
*****
Offline Offline

Activity: 616


View Profile
June 17, 2013, 08:57:24 PM
 #11105

Worker Units Question:

I was under the impression, that the Worker Units (WU) is not supposed to exceed the hash rate under normal circumstances. I have numerous rigs running both version 3.2 and 3.1.1 that have been solo mining for over 5+ days non-stop that have a WU number higher than the hash rate. Does this mean they've all been "lucky", or?

Example #1 - Hash rate for 3 x 7970 = 2.141 Mh/s (Scrypt) / WU: 2269.1/m
Example #2 - Hash rate for 3 x 7950 = 1.877 Mh/s (Scrypt) / WU: 2115.5/m
Example #3 - Hash rate for 2 x 7950 = 1.276 Mh/s (Scrypt) / WU: 1442.0/m

Another 6 of my 11 rigs exhibit the same thing. What am I missing? I realize this is a good thing, but I would like to better understand how it is higher than the hash rate over a long period of time.

BTC:113mFe2e3oRkZQ5GeqKhoHbGtVw16unnw2
kano
Legendary
*
Online Online

Activity: 1918


Linux since 1997 RedHat 4


View Profile
June 17, 2013, 09:27:46 PM
 #11106

One of files in GIT repository is source api-example.c

...

This is a patch to fix it:

Code:

-                       fprintf(stderr, "usAge: %s [command [ip/host [port]]]\n", argv[0]);
+                       fprintf(stderr, "Usage: %s [command [ip/host [port]]]\n", argv[0]);


...
Hey!
Don't remove my name from it thanks!
I wrote it.


...

If you have Java installed on the machine you can also simply say java API ...

Or if you have PHP php api-example.php ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
Tesla71
Sr. Member
****
Offline Offline

Activity: 257



View Profile
June 17, 2013, 09:29:30 PM
 #11107

Can someone explain to me how failover should work or what I should use for pools which are getting ddos atacked ?

I actually have the problem that my main pool getting ddos'd and cgminer did not switch to failover though the mining devices are doing nothing for abaout 10 second per minute and then going back hashing.

It only switches if the pool is not reachable at all.

BTC: 13p54x1vmb8TbwbDXHYTepHafpVv9uaCaP         BQC: bRZSnMcf9cJLpmFf5HqoJGBYMsS4weHbWJ                TRC: 1AT87GqRXN6PD1f4Ji92pBqeHU43NoFWhR
LTC: LYdKeaTeQPLdi2Jgf2yQjTC2LNZoF88JFC              NVC: 4RyEAWoL1Gu8iy23YB8XDutYB2rChijiuC
Buy / sell BTC via SEPA: https://www.bitcoin.de/r/7966am
juhakall
Sr. Member
****
Offline Offline

Activity: 422



View Profile
June 17, 2013, 10:42:15 PM
 #11108

A little while ago the difficulty went up to 19.3M.

I'm running two instances of CGMiner 3.2.1 and they both reported going to 19.3M.  About 10 minutes later one of them went back to 15.6m.  And now about 15 minutes after that it went back to 19.3M.

Any idea what just happened here?  Has anyone else ever seen something like this before?
Thanks,
Sam
Can't imagine what happened there unless you have multiple pools that were disagreeing about what the current block is.

I'm seeing the same thing on multiple rigs, which have all been restarted after the difficulty change. One was started only two hours ago, and it's already flipped between 15.6M and 19.3M three times. I have six pools configured: BitMinter, Bitparking, Ozcoin, Slush, Deepbit & 50BTC. Running a git version of 3.2.2 compiled today. I'll try enabling debug output on some rig and pastebin the relevant parts.
neil_mccauley
Jr. Member
*
Offline Offline

Activity: 46


View Profile
June 18, 2013, 04:57:32 AM
 #11109

I have a problem with the ASIC Miner USB Erupters and CGMiner 3.1.1.  
I had two working fine with CGMiner 3.1.1 on my computer then I shipped them to someone else and now they can't get one of the USB Miners to work.

Steps taken on the affected computer:
Installed zadig
Installed USBtoUARTBridgeVCPDrivers
Rebooted the computer, did not change any of the drivers.  Zadig reports that the Erupter is using the correct USB to UART driver.

Verified that the Erupters are using COM5 and COM7 in device manager

Ran CGMiner 3.1.1 with the following arguments:
cgminer-nogpu.exe --icarus-options 115200:1:1 --icarus-timing 3.0=100 -S //./COM5 -S //./COM7

One of the devices works fine and one always gives the following error:
Started cgminer 3.1.1
Icarus Detect: Test failed at //./COM5: get 00000000, should: 000187a2
Reset failed! not an Avalon? (0: c1 4f 87 64)
Avalon: Goto idle mode

The device on COM7 always works so I'm trying to find out if it is a software problem or a hardware problem.  Any help is appreciated.  Thanks in advance.

EDIT: I read 3.2.2 will fix many usb issues.  Will give that a shot and report back.
kano
Legendary
*
Online Online

Activity: 1918


Linux since 1997 RedHat 4


View Profile
June 18, 2013, 10:07:12 AM
 #11110

3.1.1 doesn't use the WinUSB driver for 'Icarus' devices - it uses the serial-USB driver on windows.
3.2* uses WinUSB that Zadig will install for you.

(Icarus devices are: Icarus, Lancelot, Asicminer USB and Cairnsmore1)

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
June 18, 2013, 10:17:55 AM
 #11111

I would recommend switching the ports between the two devices.  In Windows, I imagine that will use the same COM ports for the opposite devices.  In that case, if COM7 is doing what COM5 was, you've narrowed it down to the device (or USB cable maybe), and if it's still COM5, you can try a different USB port to eliminate that.  Also, in Windows you can probably change the com port numbers used.  I've never messed with any dedicated mining hardware, but most USB serial port COM numbers can be changed in device manager.
-Redacted-
Sr. Member
****
Offline Offline

Activity: 378



View Profile
June 18, 2013, 02:56:25 PM
 #11112

Double check in control panel under Devices and Printers.  Do both devices show up at the bottom?  And if so, are they at COM5 and COM7 ?  It's possible that only one of them is configured as a COM device.  I ran into that...

If you've moved to 3.2.x and the WinUSB driver via zadig, then all bets are off.  I've got hubs that only a few ports work in, hubs where all ports work, and hubs where none of the ports work under 3.2.1.  Depends a great deal on the hub.   Cheap $5 hubs seem to mostly work.  $25 seven port D-Link hubs don't work at all.

I run 30 miners under 3.1.1 configured as com ports in Anker 10 port USB 3.0 hubs.  I can run exactly zero of them for more than 2 minutes after upgrading via zadig to the WINUSB driver and switching to 3.2.1 - I've spent hours trying to configure things for direct USB and failed.  I've quit trying.  I can get a few of them running, but after a few minutes they go Zombie and cgminer freezes up and quits responding.  They all run perfectly under 3.1.1 using the SIlicon Labs USB to UART driver and running them as COM devices.

Now hanging out on Atomic-Trade.com...
neil_mccauley
Jr. Member
*
Offline Offline

Activity: 46


View Profile
June 18, 2013, 05:02:28 PM
 #11113

Thank you all for the suggestions.  I did verify under "Ports" in device manager that they are listed at COM5 and COM7.  I am still using the USB to UART drivers with 3.1.1, will give a shot at WinUSB drivers with 3.2.2.

No hub is being used, I tried the ports in the front of the desktop as well as the ports in the back of the computer, directly on the motherboard.  No hub is being used.  I will do more troubleshooting and report back with my results.
Blisk
Sr. Member
****
Offline Offline

Activity: 312


View Profile WWW
June 18, 2013, 07:55:10 PM
 #11114

I use cgminer only for gpu mining and also think that somehow 3.1.1 works better then newest cgminer.

actudoran
Full Member
***
Offline Offline

Activity: 161


View Profile
June 18, 2013, 07:56:14 PM
 #11115

3.1.1 doesn't use the WinUSB driver for 'Icarus' devices - it uses the serial-USB driver on windows.
3.2* uses WinUSB that Zadig will install for you.

(Icarus devices are: Icarus, Lancelot, Asicminer USB and Cairnsmore1)

Thanks man ! you're a star !
Trongersoll
Sr. Member
****
Offline Offline

Activity: 448


Retired Software Engineer


View Profile
June 18, 2013, 08:11:49 PM
 #11116

This is not a complaint or  request for help. First, i'm running 3.1.1. I just consolidated 7 ASICminer USB sticks that had been running fine plugged into various USB ports into one Anker 10 port USB Hub with a fan on it. I haven't gone on to 3.2 series because the Anker is USB 3.0. What i've found is that two sticks are only averaging 200Mh/s and are get significantly more HW errors than the others. They are ICA 3 and ICA 6, i find that the numbers are multiples of 3 interesting and thought it might of interest to  the Devs. Perhaps not. I'm going to let things run as is until it is announced that 3.2 series is USB 3.0 compatible. thanks for the great job guys.

Sounds like 3.2.2 has some USB 3.0 fixes; give it a shot.

well, i decided to look into my two flakey usb sticks. i narrowed it down to two and they only did 200Mh/s regardless of where they were plugged in. i decided to try 3.2.2 to see if it would work with my setup. well after a painful build process(took a bit of searching to find the command to install libusb-1.0, and to figure out how to include icarus in the build) i got it running. It seems to be rock solid so far and the two flakey usb sticks are now doing 300Mh/s. i'm guessing that there was a marginal timing issue with 3.1.1. So... I'm a happy camper for now. I still have a two GPU rig to get running so i figure i'm in for more pain. hopefully this will get easier as i do it more often.

*insert appropriate begging line here* 
BTC: 1CS6AV7VnjcPLxaTFoUhTjXK4mQCTzfSxE
Doge: DB22tiynvXKg7SyPpnH9jyfitKLTZb6ejc
Moebius327
Hero Member
*****
Offline Offline

Activity: 686



View Profile
June 18, 2013, 09:11:05 PM
 #11117

I am trying to run this miner on my brother's 7970 rig. He needs to play his Battlefield 3.

Goal: mine 24/7 but allow my brother to play BF3 without fps drops

What I have tried and didn't work:

-I d (result = Fans skyrocketing, fps drops)
-I 0 (or anything under 0 uses 70%+ CPU)
--auto-gpu --temp-target 65 (same result as -I d)


Can someone please help me find the right line of arguments? I am willing to give a bounty of 0.1 BTC

Thanks in advance!

Tips: 1A1SSSg3i54E2g8cAQJ1FCEZFvFvWYbcxA
Offering Loans and Escrow Service
gyverlb
Hero Member
*****
Offline Offline

Activity: 896



View Profile
June 18, 2013, 09:19:22 PM
 #11118

I am trying to run this miner on my brother's 7970 rig. He needs to play his Battlefield 3.

Goal: mine 24/7 but allow my brother to play BF3 without fps drops

What I have tried and didn't work:

-I d (result = Fans skyrocketing, fps drops)
-I 0 (or anything under 0 uses 70%+ CPU)
--auto-gpu --temp-target 65 (same result as -I d)


Can someone please help me find the right line of arguments? I am willing to give a bounty of 0.1 BTC

Thanks in advance!

Code:
-I d --gpu-dyninterval 1 --temp-target 75
increase temp-target if the noise is too much, increase gpu-dyninterval to increase hashrate until fps drops

Edit: and don't mine scrypt coins, I don't think you can without hurting fps whatever setting you use

P2pool tuning guide
Trade BTC for €/$ at bitcoin.de (referral), it's cheaper and faster (acts as escrow and lets the buyers do bank transfers).
Tip: 17bdPfKXXvr7zETKRkPG14dEjfgBt5k2dd
Moebius327
Hero Member
*****
Offline Offline

Activity: 686



View Profile
June 18, 2013, 09:27:44 PM
 #11119

I am trying to run this miner on my brother's 7970 rig. He needs to play his Battlefield 3.

Goal: mine 24/7 but allow my brother to play BF3 without fps drops

What I have tried and didn't work:

-I d (result = Fans skyrocketing, fps drops)
-I 0 (or anything under 0 uses 70%+ CPU)
--auto-gpu --temp-target 65 (same result as -I d)


Can someone please help me find the right line of arguments? I am willing to give a bounty of 0.1 BTC

Thanks in advance!

Code:
-I d --gpu-dyninterval 1 --temp-target 75
increase temp-target if the noise is too much, increase gpu-dyninterval to increase hashrate until fps drops

Edit: and don't mine scrypt coins, I don't think you can without hurting fps whatever setting you use


Thanks for your feedback. The thing is I am getting 75C° with -I d, but the fans are going wild.And this is without even playing. Isn't there a way to limit the hashrate (300 Mh/s for example) ? 

Tips: 1A1SSSg3i54E2g8cAQJ1FCEZFvFvWYbcxA
Offering Loans and Escrow Service
gyverlb
Hero Member
*****
Offline Offline

Activity: 896



View Profile
June 18, 2013, 09:34:56 PM
 #11120

I am trying to run this miner on my brother's 7970 rig. He needs to play his Battlefield 3.

Goal: mine 24/7 but allow my brother to play BF3 without fps drops

What I have tried and didn't work:

-I d (result = Fans skyrocketing, fps drops)
-I 0 (or anything under 0 uses 70%+ CPU)
--auto-gpu --temp-target 65 (same result as -I d)


Can someone please help me find the right line of arguments? I am willing to give a bounty of 0.1 BTC

Thanks in advance!

Code:
-I d --gpu-dyninterval 1 --temp-target 75
increase temp-target if the noise is too much, increase gpu-dyninterval to increase hashrate until fps drops

Edit: and don't mine scrypt coins, I don't think you can without hurting fps whatever setting you use


Thanks for your feedback. The thing is I am getting 75C° with -I d, but the fans are going wild.And this is without even playing. Isn't there a way to limit the hashrate (300 Mh/s for example) ? 

I assume you use --auto-fan ? Then if the fans are going wild this is because the GPU is too hot compared to the temp target. You can raise temp-target (on a 7970 I had to use 80 and even 85 in some situations).
If you use a low gpu-dyninterval, it should reduce your hashrate and the power used by the GPU: it should slow down your fan(s). If it can't bring it down enough you could test -I 1 (if the dynamic setting doesn't lower the intensity to 1) if -I 0 and lower doesn't work for you.

P2pool tuning guide
Trade BTC for €/$ at bitcoin.de (referral), it's cheaper and faster (acts as escrow and lets the buyers do bank transfers).
Tip: 17bdPfKXXvr7zETKRkPG14dEjfgBt5k2dd
Pages: « 1 ... 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 [556] 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 ... 830 »
  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!