MinorMiner
Member
Offline
Activity: 73
Merit: 10
|
|
July 02, 2013, 12:28:45 AM |
|
Ah, that's awesome. Thank you so much for pointing me at it. I've compiled cgminer and used it for a while but was not aware of the API stuff. Certainly wasn't aware of the php stuff included in the source these days. So yes, I think you're right. I have the tools available and will get on with a monitoring thing. Thanks
|
All contributions gratefully received 1G6Wia22Jnpz2DUisA5EoAC6KJ7MHm6QyP
|
|
|
kano
Legendary
Offline
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
|
|
July 02, 2013, 12:34:34 AM |
|
I have a bunch of scripts I run that do certain tests. This (old) one checks if an ICA hasn't returned a share in too long. On the old serial-USB the ICA would just stop returning results for no reason on rare occasions. A cgminer restart (basically resetting the serial-USB connection completely) would clear the problem. So it sends a quit to cgminer if it detects that situation. Obviously it doesn't contain everything required, but consider it a starting point if you want to do something. i.e. do it yourself Consider this a pointer to do something you want that's not really that difficult to do and the interface is already in cgminer. i.e. no cgminer changes required. ... tools.php has e.g. all the socket/api code like in miner.php and sets $rigs and also has the msg()/txtmsg()/doabort()/dowarn() functions ... among other things In my case the msg function runs a little java program I wrote to popup a windows on my screen with the message ... <?php session_start(); # include_once('tools.php'); # global $icas; # $icas = array(); // Rigs with ICA's # function process() { global $miner, $port; global $haderror, $error, $rigs; global $icas, $dis;
if ($rigs == null or count($rigs) == 0) doabort("No rigs defined");
foreach ($rigs as $rig) { $now = time(); if (isset($dis[$rig])) { if (($now - $dis[$rig]) > 90) { unset($dis[$rig]); txtmsg("Reenabling $rig"); } else continue; }
$parts = explode(':', $rig, 3); if (count($parts) < 2) doabort("Invalid rig '$rig'"); else { $miner = $parts[0]; $port = $parts[1];
$process0 = getapi($rig, 'summary'); if ($process0 === false) continue;
if (!isset($process0['SUMMARY']['Elapsed'])) { handle($rig, "Error on '$rig'\n(Missing SUMMARY/Elapsed)"); continue; }
$el = $process0['SUMMARY']['Elapsed'];
$process = getapi($rig, 'devs'); if ($process === false) continue;
$now = time(); $when = $process['STATUS']['When'];
if (isset($process['STATUS']['Description'])) $des = $process['STATUS']['Description']; else $des = $rig;
$gotone = false; foreach ($process as $dev => $details) { if (isset($details['Name']) && $details['Name'] == 'ICA') { $gotone = true;
// force a message from each rig with an ICA if (!isset($icas[$rig])) { $icas[$rig] = 'on'; msg("Monitoring: ICAs on $des"); }
if (isset($details['Last Valid Work'])) { // Give it 60s if ($el > 60 && $el < 5184000) // 60days { $lst = $details['Last Valid Work'];
if (($when - $lst) > 180) { msg("$dev=ICA".$details['ID']." on $des (Elapsed=$el when-lst=".($when-$lst).")\nSending API quit (then sleeping for 900s)");
$process = api('quit');
sleep(900); } } } } }
if (!$gotone) { $dis[$rig] = time() + (60*60*24*365.25*10);
dowarn("$des has no ICAs\nRestart monitoring disabled");
if (count($dis) == count($rigs)) doabort("No rigs to monitor"); } } } } # while (true) { process(); sleep(5); } # ?>
Edit: oh yeah, I run cgminer in a loop so it always restarts after a quit (after a 5s sleep).
|
|
|
|
MineForeman.com
Legendary
Offline
Activity: 896
Merit: 1000
|
|
July 02, 2013, 01:11:19 AM |
|
As a slightly alternitive way to how kano does it you can use this PHP function from MinePeon;- function cgminer($command, $parameter) {
$command = array ( "command" => $command, "parameter" => $parameter );
$jsonCmd = json_encode($command);
$host = "127.0.0.1"; $port = 4028;
$client = stream_socket_client("tcp://$host:$port", $errno, $errorMessage);
if ($client === false) { throw new UnexpectedValueException("Failed to connect: $errorMessage"); } fwrite($client, $jsonCmd); $responce = stream_get_contents($client); fclose($client); $responce = preg_replace("/[^[:alnum:][:punct:]]/","",$responce); $responce = json_decode($responce, true); return $responce;
}
Using that and the API-README you can get cgminer to do anything you want, for example;- cgminer("restart", ""); Will restart your miner and;- $stats = cgminer("devs", ""); Will return a nicely formatted array with all of your mining devices stats. Neil (P.S. look at https://github.com/MineForeman/MinePeonWebUI if you want more examples)
|
|
|
|
btcmonkey
Newbie
Offline
Activity: 20
Merit: 0
|
|
July 02, 2013, 03:14:37 AM |
|
Hello, On my Raspberry Pi I am having the issue described here (describing the same issue in Ubuntu 12.04LTS): http://bitcoin.stackexchange.com/questions/11829/bitcoin-erupters-not-stable-on-ubuntu-and-cgminer-3-3Basically in 3.3.1 (or 3.2.1, 3.2.0) with 1 USB AsicMiner Erupter, on a USB2.0 hub all is good hashing around 333MHs stable. If I add a second stick (or more) hashrate jumps all around with all chips eventually getting SICK and restarting. Built following instructions and verifying prereqs. I'm rebuilding an Ubuntu box to try to reproduce there. Any tips on something I may be doing wrong or ideas on the problem?
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4256
Merit: 1644
Ruu \o/
|
|
July 02, 2013, 03:21:53 AM |
|
Hello, On my Raspberry Pi I am having the issue described here (describing the same issue in Ubuntu 12.04LTS): http://bitcoin.stackexchange.com/questions/11829/bitcoin-erupters-not-stable-on-ubuntu-and-cgminer-3-3Basically in 3.3.1 (or 3.2.1, 3.2.0) with 1 USB AsicMiner Erupter, on a USB2.0 hub all is good hashing around 333MHs stable. If I add a second stick (or more) hashrate jumps all around with all chips eventually getting SICK and restarting. Built following instructions and verifying prereqs. I'm rebuilding an Ubuntu box to try to reproduce there. Any tips on something I may be doing wrong or ideas on the problem? Only cgminer 3.1.1 is stable with that hardware, using the old serial usb interface. We moved to a new driver model from 3.2.0+ for this sort of hardware and it has proved problematic for this hardware when multiple are in use. Oh and we do update our code a LOT, it's just that we hit a snag with this hardware and the new driver model and have as yet been unable to resolve it.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4256
Merit: 1644
Ruu \o/
|
|
July 02, 2013, 03:31:25 AM |
|
I don't understand how bfgminer got this working without zadig but cgminer needs it?
BFG and CGMiner both used to use the FTDI drivers for USB devices. CGMiner switched to libusb, but requires you to reinstall new drivers. Once you do it one, it should be all set. I understand that part, but why make people do the extra step? bfgminer doesn't need it when ASIC's are run there. Because direct USB is better, plain and simple. (inb4 Luke-jr's trolling) Define better. Hashes more? Once it's working properly (see caveats regarding multiple lancelot based hardware not working properly so far), lower overhead, lower cpu, scaleable to higher hashrates for the same hardware, less points of failure (no driver between cgminer and the device), lower latencies and finer control over the device. See the Avalon and BFLSC performance for examples of it working successfully.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
Antuam
Legendary
Offline
Activity: 1722
Merit: 1005
|
|
July 02, 2013, 08:51:50 AM |
|
Hello. First, sorry for my english. I want to start using CGMINER 3.3.1, but I have some problems. I have 2 GPUs. According to the GUIMINER, the card is the 7970 0-0 and the 7870 is 0-1, but with the CGMINER is backwards. Now, in the PCIe 16x is connect 7870, and the PCIe 1x 7870 The 7870 with the MSI afterburner up to 1210. And the 7970 up to 1100 This is the configuration I use. http://pool:port cgminer.exe-o-u username-p password-I 13 - auto-fan - auto-gpu - gpu-engine 1100,1210 - gpu-memclock 950.1060 - gpu -PowerTune 20,20 And I get these values GPU 0 (7970) -> 680Mhash GPU 1 (7870) -> 340Mhash With GUIMINER the values that I have are: 7970 -> 660Mhash 7870 -> 440Mhash Any suggestions? Thanks in advance. Antuam
|
|
|
|
Zanatos666
Sr. Member
Offline
Activity: 280
Merit: 250
Sometimes man, just sometimes.....
|
|
July 02, 2013, 01:26:51 PM |
|
Hello. First, sorry for my english. I want to start using CGMINER 3.3.1, but I have some problems. I have 2 GPUs. According to the GUIMINER, the card is the 7970 0-0 and the 7870 is 0-1, but with the CGMINER is backwards. Now, in the PCIe 16x is connect 7870, and the PCIe 1x 7870 The 7870 with the MSI afterburner up to 1210. And the 7970 up to 1100 This is the configuration I use. http://pool:port cgminer.exe-o-u username-p password-I 13 - auto-fan - auto-gpu - gpu-engine 1100,1210 - gpu-memclock 950.1060 - gpu -PowerTune 20,20 And I get these values GPU 0 (7970) -> 680Mhash GPU 1 (7870) -> 340Mhash With GUIMINER the values that I have are: 7970 -> 660Mhash 7870 -> 440Mhash Any suggestions? Thanks in advance. Antuam I have flip flopped my cards before and the still show up as the same GPU in CGMiner. I dont know what determines it, and I dont care as long as it doesnt change and my settings get messed up. If you are using CGMiner to adjust your clocks, dont use MSI. CGMiner can control all of your functions right from it (including voltage tweaking). As for your settings, I think you may need to separate them out and use -d to declare the GPU number you are tweaking since they have different settings. I havent had much success with that on the command line, I suck at that. So I use a config file instead (have a 5870 and 5830 in same machine, one running at 1000 and other running at 950).
|
Squiggly letters, written really fast, with a couple of dots for good measure.
|
|
|
Trongersoll
|
|
July 02, 2013, 06:39:54 PM |
|
lets try this again i have two video cards installed. the primary one, a 7970, is in a PCIe X16 slot and mines fine. the second, is a 7950 in a PCIe X4 slot and cgminer doesn't see it as being enabled. aticonfig sees them both. i have a resistor in the 7950's DVI connector to dummy it. i loaded the latest catalyst package. Since cgminer mines fine on the one board i'm guessing that the SDK is loaded as part of catalyst? i'm using cgminer-3.3.1-x86_64-built The MB conector on the X is a full connector and i'm on an extender,
aticonfig --lsa * 0. 01:00.0 AMD Radeon HD 7900 Series 1. 04:00.0 AMD Radeon HD 7900 Series
* - Default adapter
./cgminer -n [2013-07-02 14:19:59] CL Platform 0 vendor: Advanced Micro Devices, Inc. [2013-07-02 14:19:59] CL Platform 0 name: AMD Accelerated Parallel Processing [2013-07-02 14:19:59] CL Platform 0 version: OpenCL 1.2 AMD-APP (1084.4) [2013-07-02 14:19:59] Platform 0 devices: 1 [2013-07-02 14:19:59] 0 Tahiti [2013-07-02 14:19:59] Failed to ADL_Adapter_ID_Get. Error -10 [2013-07-02 14:19:59] This error says the device is not enabled [2013-07-02 14:19:59] Failed to ADL_Adapter_ID_Get. Error -10 [2013-07-02 14:19:59] This error says the device is not enabled [2013-07-02 14:19:59] GPU 0 AMD Radeon HD 7900 Series hardware monitoring enabled [2013-07-02 14:19:59] 1 GPU devices max detected [2013-07-02 14:19:59] USB all: found 7 devices - listing known devices [2013-07-02 14:19:59] No known USB devices
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4256
Merit: 1644
Ruu \o/
|
|
July 02, 2013, 10:38:24 PM |
|
lets try this again i have two video cards installed. the primary one, a 7970, is in a PCIe X16 slot and mines fine. the second, is a 7950 in a PCIe X4 slot and cgminer doesn't see it as being enabled. aticonfig sees them both. i have a resistor in the 7950's DVI connector to dummy it. i loaded the latest catalyst package. Since cgminer mines fine on the one board i'm guessing that the SDK is loaded as part of catalyst? i'm using cgminer-3.3.1-x86_64-built The MB conector on the X is a full connector and i'm on an extender,
aticonfig --lsa * 0. 01:00.0 AMD Radeon HD 7900 Series 1. 04:00.0 AMD Radeon HD 7900 Series
* - Default adapter
./cgminer -n [2013-07-02 14:19:59] CL Platform 0 vendor: Advanced Micro Devices, Inc. [2013-07-02 14:19:59] CL Platform 0 name: AMD Accelerated Parallel Processing [2013-07-02 14:19:59] CL Platform 0 version: OpenCL 1.2 AMD-APP (1084.4) [2013-07-02 14:19:59] Platform 0 devices: 1 [2013-07-02 14:19:59] 0 Tahiti [2013-07-02 14:19:59] Failed to ADL_Adapter_ID_Get. Error -10 [2013-07-02 14:19:59] This error says the device is not enabled [2013-07-02 14:19:59] Failed to ADL_Adapter_ID_Get. Error -10 [2013-07-02 14:19:59] This error says the device is not enabled [2013-07-02 14:19:59] GPU 0 AMD Radeon HD 7900 Series hardware monitoring enabled [2013-07-02 14:19:59] 1 GPU devices max detected [2013-07-02 14:19:59] USB all: found 7 devices - listing known devices [2013-07-02 14:19:59] No known USB devices
As per the GPU-README... have you reconfigured xorg for the 2nd device? Have you exported the DISPLAY variable? Are you using a driver version that needs a dummy plug? etc..
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
Trongersoll
|
|
July 02, 2013, 11:11:54 PM |
|
hmmm... i read the readme's honest. I ran the aticonfig .... --initial thing. i did export DISPLAY=:0 as for "needing" the plug jumper(Dummy Plug), i figured doing it wouldn't hurt. If the aticonfig isn't the xorg thing you are talking about i'll go read it again. Is there anymore data that i can get ya that might help? I believe this should be working and am baffled that it isn't. This is what i did to dummy it: http://blog.zorinaq.com/?e=11
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4256
Merit: 1644
Ruu \o/
|
|
July 02, 2013, 11:14:35 PM |
|
hmmm... i read the readme's honest. I ran the aticonfig .... --initial thing. i did export DISPLAY=:0 as for "needing" the plug jumper(Dummy Plug), i figured doing it wouldn't hurt. If the aticonfig isn't the xorg thing you are talking about i'll go read it again. Is there anymore data that i can get ya that might help? I believe this should be working and am baffled that it isn't. This is what i did to dummy it: http://blog.zorinaq.com/?e=11Did you do aticonfig with "-f" as well? Try a different driver version? AMD are awesome at reinventing old bugs with newer drivers.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
Trongersoll
|
|
July 02, 2013, 11:29:51 PM |
|
hmmm... i read the readme's honest. I ran the aticonfig .... --initial thing. i did export DISPLAY=:0 as for "needing" the plug jumper(Dummy Plug), i figured doing it wouldn't hurt. If the aticonfig isn't the xorg thing you are talking about i'll go read it again. Is there anymore data that i can get ya that might help? I believe this should be working and am baffled that it isn't. This is what i did to dummy it: http://blog.zorinaq.com/?e=11Did you do aticonfig with "-f" as well? Try a different driver version? AMD are awesome at reinventing old bugs with newer drivers. you are saying that i should try older versions of Catalyst? The aticonfig initialize was copied from the readme and pasted on the command line.
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4256
Merit: 1644
Ruu \o/
|
|
July 02, 2013, 11:31:33 PM |
|
you are saying that i should try older versions of Catalyst?
Yes I am saying that.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
Trongersoll
|
|
July 03, 2013, 12:31:34 AM |
|
i think i have hardware issues. i powwered the machine off and it wouldn't reboot until i took the second video card out. I'm going to try some different risers tomorrow.
|
|
|
|
PatMan
|
|
July 03, 2013, 01:02:22 AM |
|
Dodgy risers are a pain in the face. Still, better those being screwed than your gpu's eh? I always try to keep a few spares around just in case...
|
|
|
|
il_minatore
|
|
July 03, 2013, 11:22:14 AM |
|
Under win 7 x64 I have cgminer crash with this problem:
Firma problema: Nome evento problema: APPCRASH Nome applicazione: cgminer.exe Versione applicazione: 0.0.0.0 Timestamp applicazione: 51bdb352 Nome modulo con errori: StackHash_0a9e Versione modulo con errori: 0.0.0.0 Timestamp modulo con errori: 00000000 Codice eccezione: c0000005 Offset eccezione: 00000000 Versione SO: 6.1.7601.2.1.0.256.48 ID impostazioni locali: 1040 Informazioni aggiuntive 1: 0a9e Ulteriori informazioni 2: 0a9e372d3b4ad19135b953a78882e789 Ulteriori informazioni 3: 0a9e Ulteriori informazioni 4: 0a9e372d3b4ad19135b953a78882e789
|
|
|
|
-ck (OP)
Legendary
Offline
Activity: 4256
Merit: 1644
Ruu \o/
|
|
July 03, 2013, 01:03:58 PM |
|
For Avalon users not watching the avalon asic users thread, I have posted updated Avalon firmware with all the overclocking options now in the git master code, and fixed a bug which would occasionally make the avalon fail to start. http://ck.kolivas.org/apps/cgminer/avalon/20130703/The new avalon options are: --avalon-auto Adjust avalon overclock frequency dynamically for best hashrate --avalon-cutoff <arg> Set avalon overheat cut off temperature (default: 60) --avalon-fan <arg> Set fanspeed percentage for avalon, single value or range (default: 20-100) --avalon-freq <arg> Set frequency range for avalon-auto, single value or range --avalon-options <arg> Set avalon options baud:miners:asic:timeout:freq --avalon-temp <arg> Set avalon target temperature (default: 50) The interface has been modified to allow any arbitrary speed so you can overclock it. Suggest no higher than 325 for batch 1 due to power limitations! Most settle at 350ish, but I set mine a little lower to avoid hardware issues.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
stormos
Newbie
Offline
Activity: 56
Merit: 0
|
|
July 03, 2013, 03:28:43 PM |
|
Is there a way to obtain gpu hashing speed with Khash/s precision when using API? It'll be very usefull for scrypt miners tuning
|
|
|
|
xyzzy099
Legendary
Offline
Activity: 1066
Merit: 1098
|
|
July 03, 2013, 06:41:35 PM |
|
This may be a dumb question, but I can't find an answer, despite a lot of searching...
When using CGMiner to mine Litecoin (--scrypt) CGMiner reports the network difficulty as ~55.1m, but the Litecoin client says the network difficulty is 841.46756083.
Why do these numbers disagree so drastically?
|
Libertarians: Diligently plotting to take over the world and leave you alone.
|
|
|
|