Bitcoin Forum
April 24, 2024, 04:31:17 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 »  All
  Print  
Author Topic: cgmon - mining monitor for Linux - auto restart, reboot, sick gpu, ASIC, &more  (Read 48221 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.
jiangzuying
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
February 17, 2014, 04:48:31 AM
 #201

This really is a great script! but 1 condition made me mad!

Cgmon will do nothing when it can't get data from cgminer-api, always cgminer is dead when it is starting, in this condition, cgmon will not take any action.

So could you add the feather that cgmon check the process of cgminer when it can't get the data from cgminer-api, maybe it needs some sleep time, then if there is the cgminer process and no api data, reboot the system.

Thank you!
1713933077
Hero Member
*
Offline Offline

Posts: 1713933077

View Profile Personal Message (Offline)

Ignore
1713933077
Reply with quote  #2

1713933077
Report to moderator
1713933077
Hero Member
*
Offline Offline

Posts: 1713933077

View Profile Personal Message (Offline)

Ignore
1713933077
Reply with quote  #2

1713933077
Report to moderator
1713933077
Hero Member
*
Offline Offline

Posts: 1713933077

View Profile Personal Message (Offline)

Ignore
1713933077
Reply with quote  #2

1713933077
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713933077
Hero Member
*
Offline Offline

Posts: 1713933077

View Profile Personal Message (Offline)

Ignore
1713933077
Reply with quote  #2

1713933077
Report to moderator
ckopobapka
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
February 17, 2014, 06:11:10 AM
 #202

ckopobapka, I decided to go for it and install it tonight. And it works!!!!  This is so awesome. Thank you!  You have made my day.  Smiley
Enjoy it! =)
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 17, 2014, 07:48:31 PM
 #203

I was trying to save the time of the delay is all.  Could you maybe make it an option that if BAMT = "yes" then call a different BAMT_reboot procedure that only has "reboot -f" or even "reboot -f -n"?  Sometimes reboot -f doesn't work and I have to use reboot -f -n.

Done.  In the latest version you'll see
Code:
#set conf(BAMT) "no"
at the bottom of the config options.
Uncomment and set to yes to use 'reboot -f -n' before trying other reboot options.

Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
MrBobC
Member
**
Offline Offline

Activity: 110
Merit: 10


View Profile
February 17, 2014, 08:42:02 PM
 #204

Awesome, thanks!
af_newbie
Legendary
*
Offline Offline

Activity: 2688
Merit: 1468



View Profile WWW
February 18, 2014, 07:25:54 PM
 #205

Hey jdape - thanks for this. Being a dev myself I started wanting to tinker with it right away. But, I don't know TCL. Smiley

Long story short I ended up re-implementing cgmon in JavaScript with node.js. I think it's pretty close now: node-cgmon.

Not sure if you know JavaScript but if you ever want to consolidate efforts, let me know.

FYI, I cited cgmon in the credits.


Cool.  Node.js is gaining momentum on the server side.  Good to see an effort to use it.

I could not convince bfgminer developer to provide JSONP interface straight from the API.  If we had JSONP straight from the API, it would solve cross-domain issues,
and you could write ONE web page to get the status(es) directly from the miner(s).  Parsing, formatting becomes trivial in JS.

For process monitoring, you still need to have cgmon like script to monitor the process itself.

korniza
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile WWW
February 23, 2014, 11:45:19 AM
Last edit: February 23, 2014, 12:07:14 PM by korniza
 #206

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!
DiggingD33p
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
February 24, 2014, 03:23:50 AM
 #207

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... :/

aMasheep
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
February 24, 2014, 09:26:01 PM
 #208

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
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 25, 2014, 02:16:03 AM
 #209

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.

Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 25, 2014, 02:17:25 AM
 #210

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"

Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
ct1000ad
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 28, 2014, 06:01:42 PM
 #211

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

Activity: 1076
Merit: 1003


View Profile
March 01, 2014, 01:50:13 PM
 #212

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
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
March 01, 2014, 02:53:50 PM
 #213

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

Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
mdtspain
Legendary
*
Offline Offline

Activity: 1076
Merit: 1003


View Profile
March 01, 2014, 04:37:11 PM
 #214

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 <br> 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!!
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
March 01, 2014, 05:18:37 PM
 #215


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 <br> 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

Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
mdtspain
Legendary
*
Offline Offline

Activity: 1076
Merit: 1003


View Profile
March 01, 2014, 06:00:54 PM
 #216

oh ok...then it's better to move it back to it's location
dr4g0n
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 02, 2014, 03:20:51 PM
 #217

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?
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
March 02, 2014, 05:00:29 PM
 #218

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}


Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
dr4g0n
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 02, 2014, 05:17:34 PM
 #219

Thx for fast answer! Testing now.
kinsik
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
March 02, 2014, 09:04:01 PM
 #220

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?
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 16 17 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!