Pages:
Author

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

hero member
Activity: 984
Merit: 1000
I use BAMT 1.5 and always use "sync;coldreboot" to reboot the machine. What do I need to change in the script to use it with cgmon, too?
full member
Activity: 125
Merit: 100
Check out FireCoin!
Jdape,
First off Thanks for donating your time into this project and giving it to the community! I'm sure this will be a great tool for me in the future (once all the parts are in for my 2nd and 3rd rig).
 
Just installed it and its up and running, although I haven't had time to test/play with it yet. At some point I'll be sure to throw a few coins your way.

To Jdape and the community here,
Is there any additional official/unofficial documentation on cgmon? I'm specifically looking to see if I can pass new values to cgminer while its running and how to check cgmon's (or cgminers) current status via ssh. Apologies if this was covered at some point and I missed it.

Cheers,
- VR


Tired of finding miners sick, dead, or crashed for long periods of time?  I was!  Here's cgmon, a lightweight, free, and open source script which performs these functions in Linux:

  • Monitors health of all GPU's/ASIC's.  If a GPU crash or problem is detected, reboots the computer and starts mining automatically.
  • Auto restart cgminer when it crashes.
  • Auto restart of computer if cgminer becomes unresponsive.
  • Monitors Accepted Share counts per GPU - restart & notify if a GPU is not outputting accepted shares.
  • Monitors network connection and mining pools for outages.
  • Email notification of all actions.
  • Now has SMTP AUTH support for gmail and other ISPs*
  • Automated version checking and upgrading
  • Runs via command line in 'screen' so you can access cgminer at anytime.
[/b]
  • Runs cgminer in the background
  • Can be started/viewed via SSH
[/b]
  • Supports unlimited GPU's/ASIC's.
  • Supports up to five mining pools.
  • Supports sgminer 4.0.0


newbie
Activity: 39
Merit: 0
When cgminer starts, it takes a few seconds to open the API port provided that you have enabled it as the cgmon instructions specify. You will see a detail line in the cgminer terminal window that says that the API port is open. Until that happens cgmon is not able to see cgminer and says so in its own log.

You can trace cgminer using the -T command line option, which logs all messages to the terminal window without overwriting any previous information.
The -T parameter shows me nothing usefull so far...
What port should be opened and forwarded on router/firewall and should I use in GPU parameters smth like "--api-port XXXX --api-allow W:MY_internal _IP" ?
newbie
Activity: 6
Merit: 0
Hi! tnx for great script!
but it is very sad to see this on my rig at mornings

Quote
Mar 03 20:00:02 bamt-miner - cgmon 1.0.8 - sgminer running and all GPUs healthy.
Mar 03 20:02:01 bamt-miner - cgmon 1.0.8 - sgminer running and all GPUs healthy.
Mar 03 20:04:03 bamt-miner - cgmon 1.0.8 - sgminer running and all GPUs healthy.
Mar 03 20:06:11 bamt-miner - sgminer is not responding.  Rebooting.
Mar 03 20:06:21 bamt-miner -
Mar 03 20:08:44 bamt-miner - sgminer not running, starting via this command:
Mar 03 20:08:44 bamt-miner - /opt/miners/sph-sgminer/sgminer --api-listen   -c /opt/miners/sph-sgminer/sgminer.conf
Mar 03 20:08:45 bamt-miner - sgminer started successfully.  Use 'screen -r' to attach to sgminer and Control-a-d to detach.
Mar 03 20:10:01 bamt-miner - sgminer not running, starting via this command:
Mar 03 20:10:01 bamt-miner - /opt/miners/sph-sgminer/sgminer --api-listen   -c /opt/miners/sph-sgminer/sgminer.conf
Mar 03 20:10:02 bamt-miner - sgminer failed to start.  Try running the mining command above to find the error.  Also, double check your GPU options.
Mar 03 20:12:01 bamt-miner - sgminer not running, starting via this command:
Mar 03 20:12:01 bamt-miner - /opt/miners/sph-sgminer/sgminer --api-listen   -c /opt/miners/sph-sgminer/sgminer.conf
Mar 03 20:12:02 bamt-miner - sgminer failed to start.  Try running the mining command above to find the error.  Also, double check your GPU options.
Mar 03 20:14:01 bamt-miner - sgminer not running, starting via this command:
Mar 03 20:14:01 bamt-miner - /opt/miners/sph-sgminer/sgminer --api-listen   -c /opt/miners/sph-sgminer/sgminer.conf
Mar 03 20:14:02 bamt-miner - sgminer failed to start.  Try running the mining command above to find the error.  Also, double check your GPU options.

sometimes X is not starting after reboot and cgmon restart sgminer in endless cycle. maybe rebooting rig after N failed starts will be good solution?
hero member
Activity: 686
Merit: 501
Stephen Reed
When cgminer starts, it takes a few seconds to open the API port provided that you have enabled it as the cgmon instructions specify. You will see a detail line in the cgminer terminal window that says that the API port is open. Until that happens cgmon is not able to see cgminer and says so in its own log.

You can trace cgminer using the -T command line option, which logs all messages to the terminal window without overwriting any previous information.
newbie
Activity: 39
Merit: 0
Could you please help solving the issue.
When the scrypt starts - cgminer waits for some time and than says smth like "waiting for work from pool" and in log it is written: "cgminer API is not enabled/responding". If I start cgminer manualy without cgmon it works fine.
What should I do to get things work? May be I have to open some port for api?
newbie
Activity: 4
Merit: 0
Thx for fast answer! Testing now.
sr. member
Activity: 269
Merit: 250
Hello! Great scrypt! I have a question. I use Bamt/Smos and disable GPU0 (Integrated graphics) in bamt.conf and cgminer.conf but cgmon still check it and reboot because it Sick or Dead. How can i disable check for GPU0 in scrypt?

Hi,

You can disable checking of GPU 0 like this.

Find this line:
Code:
if {$gpu_status >1}  { 

below it add this new line:

Code:
if {$i == 0} {break}

newbie
Activity: 4
Merit: 0
Hello! Great scrypt! I have a question. I use Bamt/Smos and disable GPU0 (Integrated graphics) in bamt.conf and cgminer.conf but cgmon still check it and reboot because it Sick or Dead. How can i disable check for GPU0 in scrypt?
legendary
Activity: 1076
Merit: 1003
oh ok...then it's better to move it back to it's location
sr. member
Activity: 269
Merit: 250

On this moment, when I open cgmon-api.php in a webbrowser, there is a long string of data that is difficult to read. I would like to put some
in there to organise that data, so that it's readable. However I am not a PHP man...lol. It would be nice not having to login via terminal all the time. Just a grafical layout.

Sorry about my English!!

Why would you ever open cgmon-api.php in a webbrowser?  That is only there to be used by cgmon.tcl. Smiley
legendary
Activity: 1076
Merit: 1003
Great scrypt, works like a charm out of the box  Grin.

Miners are rebooting when they need to.

Is there a way so that I can use the cgmon-api.php not to show the info in just one line

Regards,

Michael

Glad it's working well for you.  Can you please explain your request in more detail?  Thanks Smiley

On this moment, when I open cgmon-api.php in a webbrowser, there is a long string of data that is difficult to read. I would like to put some
in there to organise that data, so that it's readable. However I am not a PHP man...lol. It would be nice not having to login via terminal all the time. Just a grafical layout.

Sorry about my English!!
sr. member
Activity: 269
Merit: 250
Great scrypt, works like a charm out of the box  Grin.

Miners are rebooting when they need to.

Is there a way so that I can use the cgmon-api.php not to show the info in just one line

Regards,

Michael

Glad it's working well for you.  Can you please explain your request in more detail?  Thanks Smiley
legendary
Activity: 1076
Merit: 1003
Great scrypt, works like a charm out of the box  Grin.

Miners are rebooting when they need to.

Is there a way so that I can use the cgmon-api.php not to show the info in just one line

Regards,

Michael
newbie
Activity: 1
Merit: 0
When I used crontab, sgminer would sit there "waiting for work to be available from pools" for about 5 minutes before actually starting. When I started the script manually, it would immediately work.

I think the problem was that cron was running the script from a directory where the mining user didn't have any write permissions. When I changed the crontab to:

* * * * *   root     cd /home/ct1000ad/doge/cgmon && ./cgmon.tcl > /dev/null 2>&1

the problem disappeared.
sr. member
Activity: 269
Merit: 250
I've got no idea on how to turn it off? I am trying to stop it, but time after time it just starts the mining again... and when internet connection is lost, it doesn't do much.. (my wlan adapter sometime fucks up, and the system needs a reboot to work again)

thanks


If you want your computer to restart when there's a network issue, make sure 'reboot_when_pools_are_down' is set to yes in the config:

Code:
set conf(reboot_when_pools_are_down) "yes"
sr. member
Activity: 269
Merit: 250
I get the following error:
Code:
Feb 24 03:19:34 bamt-miner - GPU 0 is sick or dead, rebooting...
 Status:             [Last Not Well] => 1393211512

Version Check:  You have 1.0.8, latest is 1.0.8.
cgmon is up to date.
error flushing "sock5": broken pipe
    while executing
"flush $sockid"
    (procedure "sendmail" line 48)
    invoked from within
"sendmail "[stamp] $hostname - GPU $i DEAD - Rebooting" "$hostname GPU
$i was dead or sick... rebooting.\n Status: $line"                      "
    (procedure "check_status" line 125)
    invoked from within
"check_status"
    (file "./cgmon.tcl" line 602)
This is the error I got when I executed the cgmon.tcl manually.

The script also didnt restart the bamt mining process... I had to restart it manually...

So I think there is somewhere a bug or a misconfiguration... :/


What are your email settings like?  Could be an error there.   Try disabling email notifications.
newbie
Activity: 9
Merit: 0
I've got no idea on how to turn it off? I am trying to stop it, but time after time it just starts the mining again... and when internet connection is lost, it doesn't do much.. (my wlan adapter sometime fucks up, and the system needs a reboot to work again)

thanks
member
Activity: 81
Merit: 10
I get the following error:
Code:
Feb 24 03:19:34 bamt-miner - GPU 0 is sick or dead, rebooting...
 Status:             [Last Not Well] => 1393211512

Version Check:  You have 1.0.8, latest is 1.0.8.
cgmon is up to date.
error flushing "sock5": broken pipe
    while executing
"flush $sockid"
    (procedure "sendmail" line 48)
    invoked from within
"sendmail "[stamp] $hostname - GPU $i DEAD - Rebooting" "$hostname GPU
$i was dead or sick... rebooting.\n Status: $line"                      "
    (procedure "check_status" line 125)
    invoked from within
"check_status"
    (file "./cgmon.tcl" line 602)
This is the error I got when I executed the cgmon.tcl manually.

The script also didnt restart the bamt mining process... I had to restart it manually...

So I think there is somewhere a bug or a misconfiguration... :/
newbie
Activity: 43
Merit: 0
what about using an option to get all parameters of cgminer/sgminer from a conf file?

I really like this option cause as a BAMT user, the script is breaking the Bamt options
 thanks

EDIT: RTFM!! thanks again for your nice script!
Pages:
Jump to: