Bitcoin Forum
December 07, 2016, 10:54:35 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 ... 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 [205] 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 ... 830 »
  Print  
Author Topic: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.9.2  (Read 4821095 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.
jake262144
Full Member
***
Offline Offline

Activity: 210


View Profile
February 20, 2012, 09:35:24 AM
 #4081

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.
1481108075
Hero Member
*
Offline Offline

Posts: 1481108075

View Profile Personal Message (Offline)

Ignore
1481108075
Reply with quote  #2

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

Activity: 1918


Linux since 1997 RedHat 4


View Profile
February 20, 2012, 10:30:26 AM
 #4082

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"

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
neptop
Sr. Member
****
Offline Offline

Activity: 314


View Profile
February 20, 2012, 10:34:20 AM
 #4083

I hope I didn't miss anything, but isn't it impossible to see the worksize if you let cgminer choose it?

BitCoin address: 1E25UJEbifEejpYh117APmjYSXdLiJUCAZ
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
February 20, 2012, 10:37:33 AM
 #4084

I hope I didn't miss anything, but isn't it impossible to see the worksize if you let cgminer choose it?
--verbose -D

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
Diapolo
Hero Member
*****
Offline Offline

Activity: 769



View Profile WWW
February 20, 2012, 11:03:53 AM
 #4085

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

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2002


Ruu \o/


View Profile WWW
February 20, 2012, 11:05:53 AM
 #4086

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.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at kano.is, solo mine at solo.ckpool.org
-ck
Diapolo
Hero Member
*****
Offline Offline

Activity: 769



View Profile WWW
February 20, 2012, 11:12:33 AM
 #4087

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

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
lituar
Member
**
Offline Offline

Activity: 75


View Profile
February 20, 2012, 02:14:58 PM
 #4088

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?

Why dont you get paid by every file downloaded? Yes, you can. uploaded.to
Help? Donate.
BTC - 1NhcitLsepHod6bP8kpdi6qTzDGrThjitK
LTC - Lgfdw4gU4X3DLRqLknfSEivoa34VAagV3F
cablepair
Hero Member
*****
Offline Offline

Activity: 854


https://btc-republic.com/index.php?ref=cablepair


View Profile WWW
February 20, 2012, 02:19:22 PM
 #4089

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
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
February 20, 2012, 02:35:50 PM
 #4090

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?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
February 20, 2012, 02:38:19 PM
 #4091

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.
matthewh3
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
February 20, 2012, 02:41:36 PM
 #4092

Sorry if this has already been asked or shown but how do you install CGMINER on Ubuntu  Huh

_Vince_
Jr. Member
*
Offline Offline

Activity: 33


View Profile
February 20, 2012, 02:51:00 PM
 #4093

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



tnkflx
Sr. Member
****
Offline Offline

Activity: 346


View Profile
February 20, 2012, 02:53:51 PM
 #4094

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?

| Operating electrum.be & us.electrum.be |
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
February 20, 2012, 02:55:56 PM
 #4095

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?
_Vince_
Jr. Member
*
Offline Offline

Activity: 33


View Profile
February 20, 2012, 03:01:56 PM
 #4096

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?

This machine I also need to use it for something else, not a dedicated miner.

I am using a minimal version of Ubuntu Natty; without xdm,gdm or gnome. I installed xfce4 and startx directly from rc.local

The script was running fine if I run it from terminal; but not from cron

What kind of env does cgminer need?

I set DISPLAY already (although not needed if I don't want monitoring functions); execute cgminer from full path. What else?

kano
Legendary
*
Offline Offline

Activity: 1918


Linux since 1997 RedHat 4


View Profile
February 20, 2012, 03:36:04 PM
 #4097

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?

I have already put up a pull request a while ago (4 hours) which is somewhat related to this Smiley

Basically it restricts all RPC API access to only be allowed to run commands that return data.
If you use the --api-allow command you can put W: in front of any IP/subnets that you want to have privileged access (Write access)

This means that you can put something like W:MYIP,0/0 on --api-allow and then you can let anyone read it (that you tell) but only MYIP is allowed to send commands like 'switchpool', 'gpuintensity', 'save', 'quit' (i.e. all the commands that change something)
Of course  you can have as many W:IP and W:IP/sub as you like  - then put 0/0 on the end.
The first match decides the access.

To have true password access, I would implement a secure protocol in the API.
Passing clear text passwords/keys is rather pointless.

Yes I have been thinking about this for a few weeks and decided to implement the simplest of the two options already today Smiley
We'll see if ckolivas thinks it's OK or not tomorrow when he wakes up.

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
vapourminer
Legendary
*
Offline Offline

Activity: 893

what is this "brake pedal" you speak of?


View Profile
February 20, 2012, 05:24:04 PM
 #4098

ck, youre a machine Smiley

I miss the donation bit as it was a "set-and-forget" option but I understand the reasons for dropping it.

of course now i have to actually pay attention and donate manually again. *grumble*workworkwork* *sigh*

kidding about the grumbling of course.

sent 1.221122 BTC your way.
urlord
Newbie
*
Offline Offline

Activity: 28



View Profile
February 20, 2012, 07:08:31 PM
 #4099

Hi, I'm using the linux-usb-cgminer instructions and just tried 2.2.7 , seems to be working fine,  Should I know upgrade from 2.4 SDK?
P_Shep
Legendary
*
Offline Offline

Activity: 924


View Profile WWW
February 20, 2012, 07:31:43 PM
 #4100

Kano: API issue...

Setting intensity to 'D' doesn't seem to work.
Can set other values fine 0, 1, 2 etc., but when D is sent it reverts to 0.
Pages: « 1 ... 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 [205] 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 ... 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!