Pages:
Author

Topic: cgmon - mining monitor for Linux - auto restart, reboot, sick gpu, ASIC, &more - page 13. (Read 48363 times)

newbie
Activity: 48
Merit: 0
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...
sr. member
Activity: 269
Merit: 250
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.
sr. member
Activity: 269
Merit: 250
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:
Code:
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! Smiley
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 Smiley
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.
sr. member
Activity: 324
Merit: 250
jdape : Would you have any idea why I was/am getting these PHP errors ?

Thanks
newbie
Activity: 48
Merit: 0
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! Smiley
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 Smiley
sr. member
Activity: 269
Merit: 250
whew.

# 0.1b11
#   Added detection of unresponsive cgminer/sgminer.

The API file has changed.   If you have been using a previous version of cgmon and you want to enable this feature -- delete /tmp/cgmon-api.php (or just reboot the computer).  It will get recreated automatically on the next run. 
full member
Activity: 127
Merit: 100
I am wondering can i custom the default screen session name (dot+hostname ) to anything i want.
can you provide a variable in next version
sr. member
Activity: 269
Merit: 250
aaaaand 10.

# 0.1b10
#   Added support for up to 5 mining pools.
#   Now really checks to see if the mining command worked and if miner is running.  Sends email/notice upon success.  If not, displays suggestion for fixing. 
#   Now logs the command used to mine for success and failure.   Easier troubleshooting.
#   Cleaned up configuration and instructions.
#   Now has GPU options at the top of cgmon.tcl since that line gets edited the most.
sr. member
Activity: 256
Merit: 250
Is there a guide somewhere to set this up for BAMT. Sorry, I don't have a PhD in Linux to understand all the shit inside the file when I open it in leafpad. Shit, it took me long enough just to find where the hell it saved it to. But I definately would love the features this says it can offer. So I am willing to learn.
sr. member
Activity: 269
Merit: 250
0.1b9 is out.

# 0.1b8
#   All messages now correctly specify the currently running mining software (i.e. cgminer or sgminer, etc.)
# 0.1b9
#   Fixed bug with custom cgminer_path
#   If a local mining_exec is found and no executable is installed globally nor via custom_path, local exec will be used.
#   The actual mining command is now displayed when mining is attempted.  This will help immensely with finding problems.   Thanks for the idea dr00g!
sr. member
Activity: 269
Merit: 250
where is cgmon.tcl at BAMT?

You can place it anywhere in your BAMT installation.  Sorry If I have misunderstood your question.

sr. member
Activity: 269
Merit: 250
Also had a few issues with Xubuntu, but good old 12.10 seem to work for me...

Thinking about trying to use CentOS instead, if not a smaller, more suitable distro for mining.

Btw, it doesn't seem like the cron job is writing to the logfile, unless I change it to this:
* * * * * root /home/username/cgmon.tcl >> /home/username/cgmon.log

Else it ends up as a log file in /root/cgmon.log.
On another note, might be because I had set my logpath to ~/cgmon.log, and then it runs as root... Just a little heads up!

I too was losing messages when running via root Smiley

The last few cgmon versions use this for the logfile location:

Code:
set cgmon_logfile "~$mining_user/cgmon.log"

This way the messages always go to the correct location. 

sr. member
Activity: 269
Merit: 250
Hi, thanks for the script.

I've undervolted my 7950 and am now looking for stable clock speeds.  CGMon did its job and restarted after two crashes during the night.  Are these crashes due to undervolting bad for the card?

CGMon works well until I induce what I think is an AMD driver crash by manually increasing the clock speeds.  The entire system goes down.  OS is unresponsive.  I can't SSH in.

However, the cron job continues to call CGMon every five minutes.

After a hard reboot I checked the log files.  Each time CGMon was started it hung at this point:

# cgminer IS running.  Check if GPUs are healthy.
catch {exec php -f $cgminer_api notify | grep "=>" | grep "Last Not Well"} argx

Any ideas?

Sounds like cgmon is waiting to get a reply from cgminer/sgminer but because cgminer or sgminer is frozen, cgmon doesnt know what to do.    I'll add a new feature shortly to detect this situation and reboot as appropriate.
newbie
Activity: 48
Merit: 0
Also had a few issues with Xubuntu, but good old 12.10 seem to work for me...

Thinking about trying to use CentOS instead, if not a smaller, more suitable distro for mining.

Btw, it doesn't seem like the cron job is writing to the logfile, unless I change it to this:
* * * * * root /home/username/cgmon.tcl >> /home/username/cgmon.log

Else it ends up as a log file in /root/cgmon.log.
On another note, might be because I had set my logpath to ~/cgmon.log, and then it runs as root... Just a little heads up!
newbie
Activity: 9
Merit: 0
funkycold:
Good to hear you fixed it, it was for that reason I originally added that line, helps you out quite a lot, especially when you are tired! Wink

rorbit:
I have a few times myself experienced that touching the clock speeds when, in my case, sgminer is running, and it locks up.
Doesn't always happen though...

bobers:
As it should (you guys with BAMT will have to give us some feedback) already work in BAMT, it's pretty easy to install.
If it will be included in BAMT as default, well, that is up to jdape and the BAMT developer Smiley

Never Liked BAMT (sorry just my Opinion). It kept giving me errors, had a terrible experience with it. Ubuntu is the only way to go IMO not even Xubuntu.
newbie
Activity: 48
Merit: 0
funkycold:
Good to hear you fixed it, it was for that reason I originally added that line, helps you out quite a lot, especially when you are tired! Wink

rorbit:
I have a few times myself experienced that touching the clock speeds when, in my case, sgminer is running, and it locks up.
Doesn't always happen though...

bobers:
As it should (you guys with BAMT will have to give us some feedback) already work in BAMT, it's pretty easy to install.
If it will be included in BAMT as default, well, that is up to jdape and the BAMT developer Smiley
member
Activity: 73
Merit: 10
where is cgmon.tcl at BAMT?
newbie
Activity: 34
Merit: 0
Hi, thanks for the script.

I've undervolted my 7950 and am now looking for stable clock speeds.  CGMon did its job and restarted after two crashes during the night.  Are these crashes due to undervolting bad for the card?

CGMon works well until I induce what I think is an AMD driver crash by manually increasing the clock speeds.  The entire system goes down.  OS is unresponsive.  I can't SSH in.

However, the cron job continues to call CGMon every five minutes.

After a hard reboot I checked the log files.  Each time CGMon was started it hung at this point:

# cgminer IS running.  Check if GPUs are healthy.
catch {exec php -f $cgminer_api notify | grep "=>" | grep "Last Not Well"} argx

Any ideas?
newbie
Activity: 9
Merit: 0
Try adding an extra line:

At line 102:
# cgminer is not running, restart it.
notice "$cgminer_exec not running, starting..."
notice "$mining_command"

With the extra line you can see the cgminer command when you run cgmon. Makes it a little easier to debug invalid arguments.

Thx thats a great addition!

I having an issue starting sgminer from cgmon.
It says "sgminer not running, starting.....
then it shows my config file (with your new addition line 102 command)
sgminer started successfully"

but nothing.....sgminer doesnt start at all...

If i start sgminer manually, it works...

Any ideas whats going on? cgminer doesnt have this issue.
here is what im doing different from cgminer to sgminer

set cgminer_exec "sgminer"
set cgminer_path "/my/path/to/sgminer/"
set use_sgminer "yes"

again, I have a shell file which starts sgminer just fine...but why isnt cgmon working?

what am i missing here?




UPDATE!!!!   

I had a "-" missing in front of the "I" in my config file.....aaarrrgghhhhhhhhh........
if it wasnt for your new command line 102  addition i would have never seen the mistake!!!

Great WORK!!! you saved me hours of debugging!!!

thx


sr. member
Activity: 324
Merit: 250
/home/miner/sgminer-4.0.0/sgminer --api-listen  -o stratum+tcp://XXXX -u XXX-p XXX-g 1 -w 256 --gpu-engine 1100 --gpu-memclock 1250 --xintensity 409 --thread-concurrency 21568 -g 1 --auto-fan --temp-target 75 --gpu-powertune 20 --queue 1 --scan-time 7 --expiry 28


My command line... Weird thing is that if I don'T run cgmon, my miner is quite stable usually. I'm a bit clueless why I would get these PHP errors now.
Pages:
Jump to: