dr00g
Newbie
Offline
Activity: 48
Merit: 0
|
|
February 02, 2014, 11:54:00 AM Last edit: February 02, 2014, 12:05:31 PM by dr00g |
|
That's a lot of changes! There is a little bug though, pool 3 to 5 will never get added. You can do something like this: # Check if pool variable exist, else initialize so script doesn't break below if {![info exists pool1]} {set pool1 ""} if {![info exists pool2]} {set pool2 ""} if {![info exists pool3]} {set pool3 ""} if {![info exists pool4]} {set pool4 ""} if {![info exists pool5]} {set pool5 ""} # Add pools which are not empty if {$pool1 ne ""} {append mining_command "-o $pool1 -u $pool1_user -p $pool1_pass "} if {$pool2 ne ""} {append mining_command "-o $pool2 -u $pool2_user -p $pool2_pass "} if {$pool3 ne ""} {append mining_command "-o $pool3 -u $pool3_user -p $pool3_pass "} if {$pool4 ne ""} {append mining_command "-o $pool4 -u $pool4_user -p $pool4_pass "} if {$pool5 ne ""} {append mining_command "-o $pool5 -u $pool5_user -p $pool5_pass "} Btw, awesome job on the php timeout, been wanting that, but I couldn't figure how to do it! That is funny enough how I learned about ASIC hang when I was troubleshooting what actually made it hang up - both ASIC hang and sometimes when doing OC (or voltage change I seem to remember having experienced too) hangs up the miner so you can't quit, or will recieve API replies. Would it be possible to throw the php timeout interval as a variable from the tcl script? Just so it's easier to costumize, if needed
|
|
|
|
mig5000
|
|
February 02, 2014, 12:38:26 PM |
|
jdape : Would you have any idea why I was/am getting these PHP errors ?
Thanks
|
|
|
|
jdape (OP)
|
|
February 02, 2014, 06:11:04 PM |
|
That's a lot of changes!
There is a little bug though, pool 3 to 5 will never get added.
Hmm. It seems to work. Here's the code I am using now: if {$pool3 != ""} {append mining_command " -o $pool3 -u $pool3_user -p $pool3_pass "} If pool3 is specified in the config, it appends the pool3 variables to the mining command. Btw, awesome job on the php timeout, been wanting that, but I couldn't figure how to do it! That is funny enough how I learned about ASIC hang when I was troubleshooting what actually made it hang up - both ASIC hang and sometimes when doing OC (or voltage change I seem to remember having experienced too) hangs up the miner so you can't quit, or will recieve API replies. Thanks! It was a PITA to figure out actually. Documentation wasn't very clear on timeouts in php. Would it be possible to throw the php timeout interval as a variable from the tcl script? Just so it's easier to costumize, if needed Hmm. I don't know how one could do that since the variables in that string (the api file) are specifically not being interpreted by TCL.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
jdape (OP)
|
|
February 02, 2014, 06:15:37 PM |
|
jdape : Would you have any idea why I was/am getting these PHP errors ?
Thanks
That could happen if your cgminer/sgminer is not listening to API commands, or not listening to them on the correct hostname/port. You need --api-listen and you should be listening on 127.0.0.1 (localhost) port 4028.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
dr00g
Newbie
Offline
Activity: 48
Merit: 0
|
|
February 02, 2014, 06:24:51 PM |
|
Oh, didn't notice you put those lines in the middle of the script, just looked it (too) quickly through!
The reason I have a few lines to initialize is because then you can "deactivate" a pool from starting next time by simply commenting the poolx variable, instead of switching pool numbers or urls around. Have been thinking if this could be done in an even smarter way, will look into that later...
|
|
|
|
jdape (OP)
|
|
February 02, 2014, 06:26:21 PM |
|
Oh, didn't notice you put those lines in the middle of the script, just looked it (too) quickly through!
The reason I have a few lines to initialize is because then you can "deactivate" a pool from starting next time by simply commenting the poolx variable, instead of switching pool numbers or urls around. Have been thinking if this could be done in an even smarter way, will look into that later...
Great point. I will have to change it to allow that behavior.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
jdape (OP)
|
|
February 02, 2014, 06:59:56 PM |
|
Done.
# Changed pool configuration. Now you can comment out unused pools or leave them blank.
Note: In 0.1b12 the pool variables have changed format so copy/pasting old pool info into this latest download will break the script. You'll need to enter the actual address, username, and password as required.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
dr00g
Newbie
Offline
Activity: 48
Merit: 0
|
|
February 02, 2014, 07:47:21 PM |
|
Sweet implementation, much smoother than mine! Now you can also cleanup 50 % of your todo!
|
|
|
|
jdape (OP)
|
|
February 02, 2014, 07:49:27 PM |
|
haha... yea. That feature is *almost* working
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
jdape (OP)
|
|
February 02, 2014, 08:19:51 PM |
|
Hi there! Could you help me to resolve the following issue. I have added this line:"*/5 * * * * root /home/my username/cgmon.tcl >/dev/null 2>&1" to crontab and after the system boots nothing happens but in 5 minutes cgmon starts. Does it happens because my PC connects to internet through wifi and it takes 10-15 seconds to connect to router after booting and therefore after booting cgminer cood not connect to the pool and only after checking of cgmon in 5 minutes it restarts cgminer again? Thank you.
By default the cronjob runs every fifth minute of the hour. So your miner would get started within 5 minutes of booting. If you want, you can change */5 to */1 or */2 so it checks every minute or two instead.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
jdape (OP)
|
|
February 02, 2014, 08:24:11 PM |
|
Hi there! Could you help me to resolve the following issue. I have added this line:"*/5 * * * * root /home/my username/cgmon.tcl >/dev/null 2>&1" to crontab and after the system boots nothing happens but in 5 minutes cgmon starts. Does it happens because my PC connects to internet through wifi and it takes 10-15 seconds to connect to router after booting and therefore after booting cgminer cood not connect to the pool and only after checking of cgmon in 5 minutes it restarts cgminer again? Thank you.
By default the cronjob runs every fifth minute of the hour. So your miner would get started within 5 minutes of booting. If you want, you can change */5 to */1 or */2 so it checks every minute or two instead. FYI, having your miner start four times a day, via a 5 minute cronjob would on average potentially waste 0.6% of your daily mining time, vs a 1 minute cronjob. Perhaps I should change the default cronjob to 1, 2, or 3 minutes? Of course the reboots themselves could cause that much loss too... The nice thing about using cgmon.tcl for me, is that I can see which GPU's are clocked too high and slowly lower those clock speeds until the GPU becomes stable over multiple days or weeks.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
jdape (OP)
|
|
February 02, 2014, 08:28:32 PM |
|
FYI, having your miner start four times a day, via a 5 minute cronjob would on average potentially waste 0.6% of your daily mining time, vs a 1 minute cronjob.
Actually it could be twice that much loss since cgmon.tcl only has a chance to catch the problem once every 5 minutes... The next version will have a recommended cron time of every 2 minutes.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
jdape (OP)
|
|
February 02, 2014, 08:32:51 PM |
|
cgmon b12 released http://www.forked.net/~apex/cgmon/cgmon.tclChanges: # 0.1b12 # Added check for connection reset when using cgminer API. # Moved share monitoring option into config section. # Changed pool configuration. Now you can comment out unused pools or leave them blank. # Added option to disable email notifications when cgmon.tcl is run by hand. Keeps the inbox spam down when adjusting settings, etc. # Cleaned up some code. # Changed cronjob default to every 2 minutes. If you have an existing cronjob, you'll need to edit /etc/crontab yourself to make this change.
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
MrBobC
Member
Offline
Activity: 110
Merit: 10
|
|
February 03, 2014, 03:25:48 PM |
|
When cgmon restarts cgminer, I find my hashrate is less than half what it was before, despite all the same settings. Does the restart command not include (in windows terms) setx use_gpu_alloc 100 and the gpu_use_sync_objects 1? Also, any word on the reboot if the hash rate falls below xx?
|
|
|
|
rorbit
Newbie
Offline
Activity: 34
Merit: 0
|
|
February 03, 2014, 04:43:07 PM |
|
Thanks for the PHP time out catch. That should do it.
|
|
|
|
Angela8488
|
|
February 03, 2014, 05:43:54 PM |
|
OS: CentOS 6.2 X64 cgmon 0.1b13 couldn't execute "shutdown": no such file or directory while executing "exec shutdown -r now" (procedure "reboot" line 5) invoked from within "reboot" (procedure "check_status" line 175) invoked from within "check_status" (file "/usr/local/bin/cgmon.tcl" line 421) [root@rig ~]# whereis shutdown shutdown: /sbin/shutdown /usr/share/man/man8/shutdown.8.gz /usr/share/man/man3p/shutdown.3p.gz /usr/share/man/man2/shutdown.2.gz
|
|
|
|
dr00g
Newbie
Offline
Activity: 48
Merit: 0
|
|
February 03, 2014, 06:24:20 PM |
|
Try changing:
"exec shutdown -r now"
To: "exec reboot"
That should work in CentOS.
|
|
|
|
jdape (OP)
|
|
February 04, 2014, 02:17:46 AM |
|
OS: CentOS 6.2 X64 cgmon 0.1b13 couldn't execute "shutdown": no such file or directory while executing "exec shutdown -r now" (procedure "reboot" line 5) invoked from within "reboot" (procedure "check_status" line 175) invoked from within "check_status" (file "/usr/local/bin/cgmon.tcl" line 421) [root@rig ~]# whereis shutdown shutdown: /sbin/shutdown /usr/share/man/man8/shutdown.8.gz /usr/share/man/man3p/shutdown.3p.gz /usr/share/man/man2/shutdown.2.gz Fixed. Thanks!
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
jdape (OP)
|
|
February 04, 2014, 02:21:02 AM |
|
When cgmon restarts cgminer, I find my hashrate is less than half what it was before, despite all the same settings. Does the restart command not include (in windows terms) setx use_gpu_alloc 100 and the gpu_use_sync_objects 1? Also, any word on the reboot if the hash rate falls below xx?
Hmm. Take a look at /tmp/cgmon-mine.sh. That's the file that has the mining command. It should also contain: export DISPLAY=:0 export GPU_MAX_ALLOC_PERCENT=100 export GPU_USE_SYNC_OBJECTS=1
You could try running /tmp/cgmon-mine.sh directly and see if that gets you the full hashrate. If it does, I expect the problem could be with the way cgminer is started from crontab. What OS are you using?
|
Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
|
|
|
MrBobC
Member
Offline
Activity: 110
Merit: 10
|
|
February 04, 2014, 03:01:48 AM |
|
That file looked fine. BAMT 1.3
|
|
|
|
|