Author

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

donator
Activity: 1218
Merit: 1079
Gerald Davis
kano would it be possible to include a secret key for RPC in the config.

something like:
Code:
"api-key" : "this-is-my-secret-it-must-be-included-in-all-API-calls-when-active".

I always hate when people use user/password when there is only one possible username so I think key works fine.

I would like to publicly host my monitoring webpages along with database for historical performance, etc.  For privacy reasons I would prefer to put this on a webserver unrelated to my physical location/IP.  

Also ANUBIS and "cgminer web monitor" seem to be popular but can be tough for newbies to setup.  With breaking version changes staying up to date can add to workload.  The authors could provide public hosting (as a paid service) but some level of security would be a good idea before punching holes in firewalls. IP Address limiting works but is harder to manage.  

I don't image this being very difficult to implement:
a) api-key is off by default.
b) if api-key is set then any RPC call needs to include the key as a JSON parameter or the call fails.

Your thoughts?
sr. member
Activity: 349
Merit: 250
Could you guys help me with cron and cgminer? I need a sample script that can use to start cgminer from cron

I tried many different methods but could not make it; cgminer just did not run and did not create any log output

The same script was used to start phoenix without any problem! What a headache for me Sad

Why do you need a cron script to start cgminer? Just add it to your startup scripts. Which distribution are you using?
newbie
Activity: 33
Merit: 0
Could you guys help me with cron and cgminer? I need a sample script that can use to start cgminer from cron

I tried many different methods but could not make it; cgminer just did not run and did not create any log output

The same script was used to start phoenix without any problem! What a headache for me Sad



legendary
Activity: 1372
Merit: 1003
Sorry if this has already been asked or shown but how do you install CGMINER on Ubuntu  Huh
donator
Activity: 1218
Merit: 1079
Gerald Davis
ckvolias

2.2.7 has some serious problems in windows if pool 0 is not live

takes a very long time just to start and then it starts to show gpus as sick when they are not
does not happen if the pool 0 is live

this may have been the case in 2.2.6 and not noticed it , have a feeling it has something to do with your new pool probing setup


+1 I had a similar issue:

Not sure if it occurred on other versions but I had a network cable become unplugged (I swear it wasn't me) it seemed to hang forever without reporting connectivity issues.
donator
Activity: 1218
Merit: 1079
Gerald Davis
What is the best/preferred way to do log rotation with cgminer? I'm finding the logs pretty big and would like to manage them automatically.

Since all other functionality of cgminer can be controlled via config file could conman consider adding some log configs.

Code:
"log" : "off(default)|static|dynamic"  dynamic appends timestamp to filename
"logname" : "./cgminer.log" (default) | C:\logs\blahblahblah | /etc/logs/cgminer/cg-log"  
"logrotate" : "100"  max size of file (bytes, MB, GB, lines, etc)

If there is enough interest from both developers and users maybe a bounty is in order?
hero member
Activity: 896
Merit: 1000
Buy this account on March-2019. New Owner here!!
ckvolias

2.2.7 has some serious problems in windows if pool 0 is not live

takes a very long time just to start and then it starts to show gpus as sick when they are not
does not happen if the pool 0 is live

this may have been the case in 2.2.6 and not noticed it , have a feeling it has something to do with your new pool probing setup
member
Activity: 75
Merit: 10
Guys i have a problem with cgminer 2.2.6/2.2.7 and my 6950. I am running catalyst 11.6 and the amd sdk 2.4. But when i try to ./configure, cgminer returns "OpenCL not found". And the binary dont initialize.

Someone knows how do i fix this?
hero member
Activity: 772
Merit: 500
That overrides any user specified values. The defaults are fine for now. New SDKs and if any faster kernels come up, I will change them.

As I said it should not override user-defaults (and I did not include any check for this, as my code was just an example ^^), but offer one place for kernel-specific settings ... well if you don't like the idea okay.

Code:
switch (clState->chosen_kernel) {
case KL_POCLBM:
if (strstr(name, "Tahiti") && strstr(vbuff, "844.4")) {
if (!opt_vectors) clState->preferred_vwidth = 1;
if (!opt_worksize) clState->work_size = 64;
}
case KL_DIAKGCN:
if (strstr(name, "Tahiti")) {
if (!opt_vectors) clState->preferred_vwidth = 2;
if (!opt_worksize) clState->work_size = 256;
}
}

Dia
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
That overrides any user specified values. The defaults are fine for now. New SDKs and if any faster kernels come up, I will change them.
hero member
Activity: 772
Merit: 500
Con, may I suggest a change to CGMINER code, which I don't want to do by myself, as I don't know how you would prefer it to be implemented. It would be a good thing to have one place in ocl.c, where optimal defaults for kernels could be placed.

Something like this (only example values here), which is used, if the user does not specify any settings. It could also include some detections for SDK versions, as this has impact on optimal parameters, too. Should be a rather small change, but removes the need for special solutions, like the one where you forced -w 64 for poclbm on Tahiti (which seems to be the default for all kernels on Tahiti, which could be counterproductive).

Code:
switch (clState->chosen_kernel) {
case KL_POCLBM:
if (strstr(name, "Tahiti") && strstr(vbuff, "844.4")) {
clState->preferred_vwidth = 1;
clState->work_size = 64;
}
else if (strstr(name, "Tahiti") && strstr(vbuff, "851.4")) {
clState->preferred_vwidth = 1;
clState->work_size = 128;
}
case KL_DIAKGCN:
if (strstr(name, "Tahiti")) {
clState->preferred_vwidth = 2;
clState->work_size = 256;
}
else if (strstr(name, "Cypress")) {
clState->preferred_vwidth = 8;
clState->work_size = 256;
}
}

Dia
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
I hope I didn't miss anything, but isn't it impossible to see the worksize if you let cgminer choose it?
--verbose -D
sr. member
Activity: 314
Merit: 251
I hope I didn't miss anything, but isn't it impossible to see the worksize if you let cgminer choose it?
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
If the RPC API is enabled ... you can exit a bit more cleanly than just killing cgminer:
Code:
echo -n quit | nc 127.0.0.1 4028
You would of course enable the API via the extra option "--api-listen"
full member
Activity: 210
Merit: 100
What is the best/preferred way to do log rotation with cgminer? I'm finding the logs pretty big and would like to manage them automatically.
... Is there a way to force that thru a postrotate script?
Code:
/var/log/cgminer.log
{
        rotate 7
        daily
        missingok
        notifempty
        delaycompress
        compress
        postrotate
#add something here
        endscript
}


::EDIT:: use COPYTRUNCATE, as recommended by johnyj

Code:
/var/log/cgminer.log
{
        rotate 7
        daily
        missingok
        notifempty
        delaycompress
        compress
        copytruncate
}
Done! Thanks again johnyj.

Not without killing cgminer:
Code:
 /*sub-optimal solution removed*/

Another approach (more complex but avoiding the necessity of periodical cgminer restarts) is, instead of logging cgminer's output directly to the target file, run the logging through an intermediary that will follow the file name (eg. a program using fopen, fflush, and fclose for each write to the target logfile).
Piping standard output and errors with |& is your friend here, example: ls asdasdasdasd |& grep asd > ls.log


I have the same concern, maybe just make a new one (create) after archiving it
Cgminer keeps writing to the same FILE DESCRIPTOR completely ignoring the name change.
legendary
Activity: 1988
Merit: 1012
Beyond Imagination
What is the best/preferred way to do log rotation with cgminer? I'm finding the logs pretty big and would like to manage them automatically.

I'm starting with "cgminer 2>>/var/log/cgminer.log"

I was just adding a logrotate config based off the rsyslog one and what I noticed is that cgminer doesn't open a new log file after the current one is archived. Is there a way to force that thru a postrotate script?

eg. /etc/logrotate.d/cgminer
Code:
/var/log/cgminer.log
{
        rotate 7
        daily
        missingok
        notifempty
        delaycompress
        compress
        postrotate
#add something here
        endscript
}

I have the same concern, maybe just make a new one (create) after archiving it
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
Con, I can confirm 2.2.6 Test works with 898.1 on Windows ... binaries are generated fine!
Did some tests with current diakgcn and it seems performance should not change with latest OpenCL runtime, but perhaps there are new ways to squeeze out a bit more performance Cheesy.

Edit: Which intensity do you use, when comparing kernel performance?
-I 11 seems the best for GCN on linux. Any more and the CPU usage starts to climb. On windows there's no way to set GPU_USE_SYNC_OBJECTS=1 so I believe intensity 9 is the best.
legendary
Activity: 4634
Merit: 1851
Linux since 1997 RedHat 4
What is the best/preferred way to do log rotation with cgminer? I'm finding the logs pretty big and would like to manage them automatically.

I'm starting with "cgminer 2>>/var/log/cgminer.log"

I was just adding a logrotate config based off the rsyslog one and what I noticed is that cgminer doesn't open a new log file after the current one is archived. Is there a way to force that thru a postrotate script?
...
That's coz YOU never close it ...
redirection "2>>" will of course never close it's output file while the process is running.
You'd have to kill cgminer and start it again
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
What is the best/preferred way to do log rotation with cgminer? I'm finding the logs pretty big and would like to manage them automatically.

I'm starting with "cgminer 2>>/var/log/cgminer.log"

I was just adding a logrotate config based off the rsyslog one and what I noticed is that cgminer doesn't open a new log file after the current one is archived. Is there a way to force that thru a postrotate script?

eg. /etc/logrotate.d/cgminer
Code:
/var/log/cgminer.log
{
        rotate 7
        daily
        missingok
        notifempty
        delaycompress
        compress
        postrotate
#add something here
        endscript
}
full member
Activity: 193
Merit: 100
Im using the --gpu-platform 1 switch to make cgminer use the stream 2.1 sdk but it keeps crashing, it tries to start threads on the 6530 integrated card.
Using a A6 apu with a 5850 and 5750.
Jump to: