Author

Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.11.0 - page 723. (Read 5805728 times)

full member
Activity: 133
Merit: 100
Another voice added to the increasing murmur:

In response to Q, after normal/complete console and log output:

./start.sh: line 5:  9166 Segmentation fault      DISPLAY=:0 cgminer -c cgminer.conf 2> logs/$now.log

2.1.0 on Ubuntu 11.04


I also get segfaults when exiting via Q on 2.1.0 (CentOS 6.2 x86_64)
member
Activity: 266
Merit: 36
Another voice added to the increasing murmur:

In response to Q, after normal/complete console and log output:

./start.sh: line 5:  9166 Segmentation fault      DISPLAY=:0 cgminer -c cgminer.conf 2> logs/$now.log

2.1.0 on Ubuntu 11.04
full member
Activity: 133
Merit: 100
Here is my quick and dirty Perl implementation of api-example. Just copy and save this as api-example.pl. Note, you need to have the JSON Perl module installed to use this (perl-JSON for RH-based distros).


Code:
#!/usr/bin/perl -w
#

#
# Simple Perl script to query and parse cgminer API stats in JSON
#
######################
##       Usage      ##
######################
#
# perl api-example.pl command
#
######################
## Revision History ##
######################
#
# v0.02 4/10/2012 JinTu ([email protected])
#       Bugfix: Support for multi element arrays in responses
#
# v0.01 12/28/2011 JinTu ([email protected])
#       First working version. Supports cgminer 2.1.0 API JSON format
#
##

use strict;
use IO::Socket;
use JSON -support_by_pp;

my $cgminer_host = "localhost";
my $cgminer_port = "4028";

my $remote = IO::Socket::INET->new(
                        Proto           => "tcp",
                        PeerAddr        => $cgminer_host,
                        PeerPort        => $cgminer_port,
                                  ) or die "cannot connect to port $cgminer_host:$cgminer_port, $!\n";

my $command;
my $parameter;
if ($ARGV[0]) {
  # look for parameters in addition to a command
  unless (($command,$parameter) = $ARGV[0] =~ m/(.*)\|(.*)/) {
    $command = $ARGV[0];
  }
}
else {
  # We didn't get an argument so default to sending summary
  $command = "summary";
}

# Send the JSON query
if ($parameter) {
  print $remote '{"command":"' . $command . '","parameter":"' . $parameter . '"}';
}
else {
  print $remote '{"command":"' . $command . '"}';
}

# Now read the result
my $response = <$remote>;

print $command . " returned \'$response\'\n";

# Now parse the JSON
my $json = new JSON;

# these are some nice json options to relax restrictions a bit:
my $json_text = $json->allow_nonref->utf8->relaxed->escape_slash->loose->allow_singlequote->allow_barekey->decode($response);

foreach my $tlc (keys %{$json_text}){
  print "\n$tlc\n";
  if ($json_text->{$tlc} =~ /array/i) {
    for (my $i = 0; $i <= (scalar @{$json_text->{$tlc}} - 1); $i++) {
      print "->[$i]\n";
      foreach my $cat (keys %{$json_text->{$tlc}->[$i]}) {
        print "\t$cat=" . $json_text->{$tlc}->[$i]->{$cat} . "\n";
      }
    }
  }
  else {
    # This is not an array so just print it
    print "\t" . $json_text->{$tlc} . "\n";
  }
}


# make sure we close the socket
$remote->close();


This will give you output like the following:
Code:
[JinTu@acheron ]$ perl api-example.pl
summary returned '{"STATUS":[{"STATUS":"S","Code":11,"Msg":"Summary","Description":"cgminer 2.3.1"}],"SUMMARY":[{"Elapsed":17227,"MHS av":855.59,"Found Blocks":0,"Getworks":5060,"Accepted":3546,"Rejected":10,"Hardware Errors":0,"Utility":12.35,"Discarded":373,"Stale":5,"Get Failures":10,"Local Work":0,"Remote Failures":5,"Network Blocks":31,"Total MH":14739525.4682}],"id":1}'

SUMMARY
->[0]
        Local Work=0
        Hardware Errors=0
        Total MH=14739525.4682
        MHS av=855.59
        Stale=5
        Network Blocks=31
        Elapsed=17227
        Rejected=10
        Discarded=373
        Utility=12.35
        Get Failures=10
        Found Blocks=0
        Getworks=5060
        Remote Failures=5
        Accepted=3546

STATUS
->[0]
        Code=11
        Msg=Summary
        STATUS=S
        Description=cgminer 2.3.1

id
        1
Code:
[JinTu@acheron ]$ perl api-example.pl devs
devs returned '{"STATUS":[{"STATUS":"S","Code":9,"Msg":"4 GPU(s)","Description":"cgminer 2.3.1"}],"DEVS":[{"GPU":0,"Enabled":"Y","Status":"Alive","Temperature":76                       .00,"Fan Speed":3108,"Fan Percent":50,"GPU Clock":470,"Memory Clock":150,"GPU Voltage":1.000,"GPU Activity":94,"Powertune":0,"MHS av":195.33,"MHS 5s":192.98,"Acce                       pted":824,"Rejected":4,"Hardware Errors":0,"Utility":2.90,"Intensity":"D","Last Share Pool":0,"Last Share Time":1334101418,"Total MH":3325785.6696},{"GPU":1,"Enab                       led":"Y","Status":"Alive","Temperature":75.50,"Fan Speed":-1,"Fan Percent":50,"GPU Clock":500,"Memory Clock":150,"GPU Voltage":1.000,"GPU Activity":99,"Powertune"                       :0,"MHS av":219.29,"MHS 5s":219.97,"Accepted":888,"Rejected":4,"Hardware Errors":0,"Utility":3.13,"Intensity":"8","Last Share Pool":0,"Last Share Time":1334101419                       ,"Total MH":3733853.3069},{"GPU":2,"Enabled":"Y","Status":"Alive","Temperature":72.50,"Fan Speed":3034,"Fan Percent":50,"GPU Clock":500,"Memory Clock":150,"GPU Vo                       ltage":1.000,"GPU Activity":99,"Powertune":0,"MHS av":220.79,"MHS 5s":220.81,"Accepted":883,"Rejected":2,"Hardware Errors":0,"Utility":3.11,"Intensity":"8","Last                        Share Pool":0,"Last Share Time":1334101386,"Total MH":3759237.2347},{"GPU":3,"Enabled":"Y","Status":"Alive","Temperature":75.00,"Fan Speed":-1,"Fan Percent":50,"G                       PU Clock":500,"Memory Clock":150,"GPU Voltage":1.000,"GPU Activity":0,"Powertune":0,"MHS av":220.07,"MHS 5s":220.24,"Accepted":911,"Rejected":0,"Hardware Errors":                       0,"Utility":3.21,"Intensity":"8","Last Share Pool":0,"Last Share Time":1334101436,"Total MH":3747107.3075}],"id":1}'

DEVS
->[0]
        Total MH=3325785.6696
        Last Share Time=1334101418
        Fan Percent=50
        Fan Speed=3108
        Status=Alive
        Last Share Pool=0
        Utility=2.9
        MHS 5s=192.98
        Temperature=76
        Memory Clock=150
        GPU Activity=94
        Accepted=824
        Hardware Errors=0
        MHS av=195.33
        Enabled=Y
        GPU Voltage=1
        Rejected=4
        GPU Clock=470
        GPU=0
        Intensity=D
        Powertune=0
->[1]
        Total MH=3733853.3069
        Last Share Time=1334101419
        Fan Percent=50
        Fan Speed=-1
        Status=Alive
        Last Share Pool=0
        Utility=3.13
        MHS 5s=219.97
        Temperature=75.5
        Memory Clock=150
        GPU Activity=99
        Accepted=888
        Hardware Errors=0
        MHS av=219.29
        Enabled=Y
        GPU Voltage=1
        Rejected=4
        GPU Clock=500
        GPU=1
        Intensity=8
        Powertune=0
->[2]
        Total MH=3759237.2347
        Last Share Time=1334101386
        Fan Percent=50
        Fan Speed=3034
        Status=Alive
        Last Share Pool=0
        Utility=3.11
        MHS 5s=220.81
        Temperature=72.5
        Memory Clock=150
        GPU Activity=99
        Accepted=883
        Hardware Errors=0
        MHS av=220.79
        Enabled=Y
        GPU Voltage=1
        Rejected=2
        GPU Clock=500
        GPU=2
        Intensity=8
        Powertune=0
->[3]
        Total MH=3747107.3075
        Last Share Time=1334101436
        Fan Percent=50
        Fan Speed=-1
        Status=Alive
        Last Share Pool=0
        Utility=3.21
        MHS 5s=220.24
        Temperature=75
        Memory Clock=150
        GPU Activity=0
        Accepted=911
        Hardware Errors=0
        MHS av=220.07
        Enabled=Y
        GPU Voltage=1
        Rejected=0
        GPU Clock=500
        GPU=3
        Intensity=8
        Powertune=0

STATUS
->[0]
        Code=9
        Msg=4 GPU(s)
        STATUS=S
        Description=cgminer 2.3.1

id
        1
member
Activity: 266
Merit: 36
Code:
--------------------------------------------------------------------------------
 [P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit
 GPU 0:  72.5C 4403RPM | 359.9/361.5Mh/s | A:5435 R:3 HW:0 U:4.99/m I:9
 GPU 1:  76.5C         | 359.8/361.8Mh/s | A:5413 R:10 HW:0 U:4.97/m I:9
 GPU 2:  72.5C 3617RPM | 364.6/361.3Mh/s | A:5284 R:7 HW:0 U:4.85/m I:9
 GPU 3:  67.5C         | 365.7/361.5Mh/s | A:5349 R:5 HW:0 U:4.91/m I:9
 GPU 4:  73.0C 3255RPM | 362.8/361.5Mh/s | A:5391 R:7 HW:0 U:4.95/m I:9
 GPU 5:  76.0C         | 368.0/361.7Mh/s | A:5417 R:10 HW:0 U:4.97/m I:9
--------------------------------------------------------------------------------

The spacing and misalignment problem is still with us, in this instance due to double-digit rejects for a couple of GPUs.  But as indicated by the hyphen borders, LOOK AT ALL THAT WASTED SPACE ON THE RIGHT!!11!!1  Some field widths could be increased.

My plan is to fix this; might take a few days (due to my schedule, not coding time).  If someone else wants to do it, please let me know.
full member
Activity: 133
Merit: 100
Hi Con, It looks like api-example.c, api-example.php, API.java/API.class and miner.php didn't get packaged up in the 2.1.0 source tarball. I see they are there in GIT but the README implies they are included in the main distribution.

newbie
Activity: 36
Merit: 0
Finally my newb time is over so I can thank ckolivas for his great miner.

Initially I was about to ask about 2.0.8's strange behaviour (upon restarts my hash rate would change between 84 and 64 Mhash/s, which is not insignificant). Version 2.1.0 seems to have fixed that (though q for quitting is broken, I can affirm that) - so now I have an average of 84.7 Mhash/s for my Radeon 4830, which is much higher than the table at Mining hardware comparison seems to suggest (and at 69.7 Mhash/s, higher than I was getting with GUIminer). Cheers!
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
if not yet done, try:
sudo aticonfig --install --adapter=all
sudo reboot


Did that after installing fglrx. I know I'm missing something simple.
Have you started Xorg?
member
Activity: 266
Merit: 36
if not yet done, try:
sudo aticonfig --install --adapter=all
sudo reboot

Always copy-paste; never let your brain control your typing.  What I meant was:

sudo aticonfig --initial --adapter=all
sr. member
Activity: 349
Merit: 250
if not yet done, try:
sudo aticonfig --install --adapter=all
sudo reboot


Did that after installing fglrx. I know I'm missing something simple.
   
sudo apt-get -f install
sudo aticonfig -f --initial --adapter=all
sudo chmod 644 /etc/X11/xorg.conf
sudo reboot
donator
Activity: 798
Merit: 500
if not yet done, try:
sudo aticonfig --install --adapter=all
sudo reboot


Did that after installing fglrx. I know I'm missing something simple.
member
Activity: 266
Merit: 36
errr...I broke something  Huh
Code:
miner@miner2:/opt/cgminer-2.1.0-x86_64_built$ ./cgminer -n
No protocol specified
[2011-12-27 20:59:28] Error: Getting Device IDs (num)
[2011-12-27 20:59:28] clDevicesNum returned error, none usable
0 GPU devices detected
miner@miner2:~$ export DISPLAY=:0
miner@miner2:~$ aticonfig --odgc
No protocol specified
aticonfig: This program must be run as root when no X server is active
miner@miner2:~$ sudo aticonfig --odgc
No protocol specified
ERROR - X needs to be running to perform ATI Overdrive(TM) commands
miner@miner2:~$ xhost +
No protocol specified
xhost:  unable to open display ":0"


Remote rig, HDD swapped, Xubuntu 11.10 (I usually use 11.04 but this is what was available on short notice), SDK 2.4 and I ran sudo apt-get install fglrx fglrx-amdcccle fglrx-dev.

if not yet done, try:
sudo aticonfig --install --adapter=all
sudo reboot
donator
Activity: 798
Merit: 500
errr...I broke something  Huh
Code:
miner@miner2:/opt/cgminer-2.1.0-x86_64_built$ ./cgminer -n
No protocol specified
[2011-12-27 20:59:28] Error: Getting Device IDs (num)
[2011-12-27 20:59:28] clDevicesNum returned error, none usable
0 GPU devices detected
miner@miner2:~$ export DISPLAY=:0
miner@miner2:~$ aticonfig --odgc
No protocol specified
aticonfig: This program must be run as root when no X server is active
miner@miner2:~$ sudo aticonfig --odgc
No protocol specified
ERROR - X needs to be running to perform ATI Overdrive(TM) commands
miner@miner2:~$ xhost +
No protocol specified
xhost:  unable to open display ":0"


Remote rig, HDD swapped, Xubuntu 11.10 (I usually use 11.04 but this is what was available on short notice), SDK 2.4 and I ran sudo apt-get install fglrx fglrx-amdcccle fglrx-dev.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Code:
[2011-12-27 14:19:26] Started cgminer 2.1.0
[2011-12-27 14:19:42] Pool 32 slow/down or URL or credentials invalid
[2011-12-27 14:19:42] Long-polling activated for http://us.eclipsemc.com:9009/LP
[2011-12-27 14:19:50] Accepted 00000000.65d7e293.179988b8 GPU 4 thread 4 pool 0
...

As noted yesterday I'm consistently seeing a pool-problem message at startup.  My request to have the problem pool identified was granted -- thank you!  Alas, now I don't know what the ID means:  32?  I have three pools specified in my config.  At least 32 is a power of two, which is always comforting.

32 is the donation pool. Thanks for offering a donation Cheesy
full member
Activity: 373
Merit: 100
When I quit, I get a segmentation fault.  It seems to run fine though.

I do, too. For me, dumping core and analysing it in gdb suggests a bug in ATI's OpenCL driver. (oh, the surprise Undecided)


Code:
[2011-12-27 14:19:26] Started cgminer 2.1.0
[2011-12-27 14:19:42] Pool 32 slow/down or URL or credentials invalid
[2011-12-27 14:19:42] Long-polling activated for http://us.eclipsemc.com:9009/LP
[2011-12-27 14:19:50] Accepted 00000000.65d7e293.179988b8 GPU 4 thread 4 pool 0
...

As noted yesterday I'm consistently seeing a pool-problem message at startup.  My request to have the problem pool identified was granted -- thank you!  Alas, now I don't know what the ID means:  32?  I have three pools specified in my config.  At least 32 is a power of two, which is always comforting.

I get that when activating the donation feature. I guess pool ID 32 is whatever pool the donation goes to. (What's so annoying about this is that it makes cgminer take a pretty long time before it starts mining...)
member
Activity: 266
Merit: 36
Code:
[2011-12-27 14:19:26] Started cgminer 2.1.0
[2011-12-27 14:19:42] Pool 32 slow/down or URL or credentials invalid
[2011-12-27 14:19:42] Long-polling activated for http://us.eclipsemc.com:9009/LP
[2011-12-27 14:19:50] Accepted 00000000.65d7e293.179988b8 GPU 4 thread 4 pool 0
...

As noted yesterday I'm consistently seeing a pool-problem message at startup.  My request to have the problem pool identified was granted -- thank you!  Alas, now I don't know what the ID means:  32?  I have three pools specified in my config.  At least 32 is a power of two, which is always comforting.

Can you post your cgminer config?

I can!

Code:
{
"pools" : [
        {
                "url" : "http://us.eclipsemc.com:9009",
                "user" : "HehHeh_0",
                "pass" : "forward"
        },
        {
                "url" : "http://us.eclipsemc.com:8337",
                "user" : "HehHeh_1",
                "pass" : "incomplete"
        },
        {
                "url" : "http://192.168.168.103:8332",
                "user" : "brec",
                "pass" : "lateral"
        }
],
"failover-only" : true,

"intensity" : "9",
"gpu-engine" : "800",
"gpu-memclock" : "190",
"gpu-fan" : "0-85",
"temp-cutoff" : "95",
"temp-overheat" : "85",
"temp-target" : "75",
"temp-hysteresis" : "3",
"auto-fan" : true,

"donation" : "0.625",
"kernel-path" : "/home/brec/miners/cgminer"
}
hero member
Activity: 742
Merit: 500
Code:
[2011-12-27 14:19:26] Started cgminer 2.1.0
[2011-12-27 14:19:42] Pool 32 slow/down or URL or credentials invalid
[2011-12-27 14:19:42] Long-polling activated for http://us.eclipsemc.com:9009/LP
[2011-12-27 14:19:50] Accepted 00000000.65d7e293.179988b8 GPU 4 thread 4 pool 0
...

As noted yesterday I'm consistently seeing a pool-problem message at startup.  My request to have the problem pool identified was granted -- thank you!  Alas, now I don't know what the ID means:  32?  I have three pools specified in my config.  At least 32 is a power of two, which is always comforting.

Can you post your cgminer config?
member
Activity: 266
Merit: 36
Code:
[2011-12-27 14:19:26] Started cgminer 2.1.0
[2011-12-27 14:19:42] Pool 32 slow/down or URL or credentials invalid
[2011-12-27 14:19:42] Long-polling activated for http://us.eclipsemc.com:9009/LP
[2011-12-27 14:19:50] Accepted 00000000.65d7e293.179988b8 GPU 4 thread 4 pool 0
...

As noted yesterday I'm consistently seeing a pool-problem message at startup.  My request to have the problem pool identified was granted -- thank you!  Alas, now I don't know what the ID means:  32?  I have three pools specified in my config.  At least 32 is a power of two, which is always comforting.
member
Activity: 266
Merit: 36
No, that's a bridge too far... You either set a single value which is the starting speed for auto-fan or it's a static value without auto-fan. Or you set a range which is used by auto-fan.

If I set a single value (starting speed) and auto-fan, what will be the range of speeds that auto-fan will use?
hero member
Activity: 742
Merit: 500
2.0.9 was a development version number only, and yes the minor version upgrade (as opposed to micro version) signifies the feature upgrade to the RPC API.

If you pulled from git and are still getting version 2.0.9 it's because you didn't do ./autogen.sh

You are right, I forgot autogen.

Code:
 cgminer version 2.1.0 - Started: [2011-12-27 21:48:54]
--------------------------------------------------------------------------------
 (5s):1062.4 (avg):1024.2 Mh/s | Q:13  A:10  R:0  HW:0  E:77%  U:16.64/m
 TQ: 4  ST: 4  SS: 0  DW: 0  NB: 1  LW: 0  GF: 0  RF: 0
 Connected to http://goat1.zapto.org:8337 with LP as user redemerald
 Block: 0000038dfc371bb0c6265496d428503a...  Started: [21:48:37]
--------------------------------------------------------------------------------
 [P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit
 GPU 0:  72.0C 4223RPM | 382.2/416.4Mh/s | A:3 R:0 HW:0 U:4.99/m I:8
 GPU 1:  68.5C         | 379.2/404.3Mh/s | A:5 R:0 HW:0 U:8.32/m I:7
 GPU 2:  53.5C 3265RPM | 321.8/339.1Mh/s | A:3 R:0 HW:0 U:4.99/m I:8
--------------------------------------------------------------------------------

When I quit, I get a segmentation fault.  It seems to run fine though.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Quote from: 2.1.0 README
Q: Can you change the autofan/autogpu to change speeds in a different manner?
A: The defaults are sane and safe. I'm not interested in changing them
further. The starting fan speed is set to 85% in auto-fan mode as a safety
precaution, but if a specific fan speed has been set, it will use that first
before adjusting automatically.

This reminded me that there's something I didn't understand about the fairly recent posts on this subject:

If I want to set a specific starting fan speed, I would use the gpu-fan option, right?  But if I also use auto-fan, what would cgminer use as a permissible range for the fan speed percentage?  E.g., suppose I want a range of 0-85, starting speed of 50, and auto-fan.  Can that be done?  Perhaps I don't understand what "has been set" refers to in the quoted README excerpt.
No, that's a bridge too far... You either set a single value which is the starting speed for auto-fan or it's a static value without auto-fan. Or you set a range which is used by auto-fan.
Jump to: