Bitcoin Forum
June 16, 2024, 09:55:37 PM *
News: Voting for pizza day contest
 
   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 48246 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.
Angela8488
Full Member
***
Offline Offline

Activity: 127
Merit: 100


View Profile
February 04, 2014, 10:56:20 AM
 #101

If set crontab like this
Quote
*/1 * * * *     /usr/local/bin/cgmon.tcl >>/var/log/cgmon.log 2>&1
and edit cgmon.tcl like this
Quote
set cgmon_logfile "/var/log/cgmon.log"
the log file like this

Quote
[root@rig-2 ~]# tailf /var/log/cgmon.log
Feb 04 18:50:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:50:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:51:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:51:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:52:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:52:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:53:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:53:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:54:02 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:54:02 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
no big deal, but maybe fix the Install instructions ?
thanks for your gread job.
bobers
Member
**
Offline Offline

Activity: 73
Merit: 10


View Profile
February 04, 2014, 11:56:42 AM
 #102

That file looked fine.  BAMT 1.3
Could you plz give me steps how did you add it to BAMT?
mig5000
Sr. Member
****
Offline Offline

Activity: 324
Merit: 250


View Profile
February 04, 2014, 11:57:14 AM
 #103

What are the possible causes of sgminer hard hang? I was getting GPU not well before and tuned it down and now sgminer just hangs.


dr00g
Newbie
*
Offline Offline

Activity: 48
Merit: 0


View Profile
February 04, 2014, 12:45:50 PM
Last edit: February 04, 2014, 01:57:04 PM by dr00g
 #104

From my experience, it can be due to:
1: Unstable thread-concurrency for the card
2: Too much OC
3: Too much undervolting
4: A combination of OC and it now needs more voltage
5: Somekind of other non-default value which is incompatible with your card, many errors are caused by manual settings!
6: Changes to engine/ memory clock values, or voltage value while running cgminer/sgminer can sometimes crash it, no idea why...

All of them will usually result in what is earlier mentioned as "ASIC hang", which in English means that the graphic driver has crashed.
That will either lead to "dead GPU", or a complete cgminer hang.

It could also be due to a unstable/uncompatible driver, but not sure that has caused me any issues.

I myself am running with a setup of:
Xubuntu 12.10
AMD Catalyst 13.12
AMD ADL SDK 6.0
AMD APP SDK 2.8
Sapphire 7950 w/ boost, running 1100/1500 at vddc 1.100, thead-concurrency 24000

Angela/bobers:
That is because of this line in the cron:
*/1 * * * *     /usr/local/bin/cgmon.tcl >>/var/log/cgmon.log 2>&1
By adding >>/var/log/cgmon.log I guess you override the logpath setting in cgmon. You should be fine by doing:
*/1 * * * *     /usr/local/bin/cgmon.tcl

A little tip: */1 is the same just *, so * * * * * is every minute.

Keep in mind that as there is no username set, it will run as currently logged on user. That tells me for the script to work, as it needs root rights, that you either:
1: Is always running as root, and thereby the miner process as root, generally not a good idea for security purposes
2: Not using the crontab file which is compatible with usernames
3: Not using the crontab file which is compatbile with usernames, and you are running with a non-root user account, and in that case the script won't work (reboot command requires it).

It's only in /etc/crontab you can specify run-as usernames, not by doing crontab -e, which is a seperate file for each user, and thereby always runs as that user.

So what you really should do is:
nano /etc/crontab
Add:
* * * * *   root   /home/username/cgmon.tcl
mig5000
Sr. Member
****
Offline Offline

Activity: 324
Merit: 250


View Profile
February 04, 2014, 02:26:02 PM
 #105

Yeah I'm doing a fresh install of everything and will see how it goes. I might even start from scratch with my settings. Hard hang is no fun. It can go 5 hours w/o hard hanging and then 5 times in 1 hour. Really hard to put your finger on.
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 04, 2014, 03:31:06 PM
 #106

If set crontab like this
Quote
*/1 * * * *     /usr/local/bin/cgmon.tcl >>/var/log/cgmon.log 2>&1
and edit cgmon.tcl like this
Quote
set cgmon_logfile "/var/log/cgmon.log"
the log file like this

Quote
[root@rig-2 ~]# tailf /var/log/cgmon.log
Feb 04 18:50:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:50:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:51:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:51:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:52:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:52:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:53:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:53:01 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:54:02 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
Feb 04 18:54:02 rig-2 - cgmon 0.1b13 - cgminer running and all GPUs healthy.
no big deal, but maybe fix the Install instructions ?
thanks for your gread job.

Code:
*/1 * * * *     /usr/local/bin/cgmon.tcl >>/var/log/cgmon.log 2>&1

Hi.  This line is creating the redundant log file entries.  Remove '>/var/log/cgmon.log'.

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

Activity: 127
Merit: 100


View Profile
February 04, 2014, 06:03:31 PM
 #107

Thank you very much
my computer is a dedicate rig, and there is nothing on it but only rig software,so i don't really care about security
and also thanks for the introduce of crontab,that helps me a lot
From my experience, it can be due to:
1: Unstable thread-concurrency for the card
2: Too much OC
3: Too much undervolting
4: A combination of OC and it now needs more voltage
5: Somekind of other non-default value which is incompatible with your card, many errors are caused by manual settings!
6: Changes to engine/ memory clock values, or voltage value while running cgminer/sgminer can sometimes crash it, no idea why...

All of them will usually result in what is earlier mentioned as "ASIC hang", which in English means that the graphic driver has crashed.
That will either lead to "dead GPU", or a complete cgminer hang.

It could also be due to a unstable/uncompatible driver, but not sure that has caused me any issues.

I myself am running with a setup of:
Xubuntu 12.10
AMD Catalyst 13.12
AMD ADL SDK 6.0
AMD APP SDK 2.8
Sapphire 7950 w/ boost, running 1100/1500 at vddc 1.100, thead-concurrency 24000

Angela/bobers:
That is because of this line in the cron:
*/1 * * * *     /usr/local/bin/cgmon.tcl >>/var/log/cgmon.log 2>&1
By adding >>/var/log/cgmon.log I guess you override the logpath setting in cgmon. You should be fine by doing:
*/1 * * * *     /usr/local/bin/cgmon.tcl

A little tip: */1 is the same just *, so * * * * * is every minute.

Keep in mind that as there is no username set, it will run as currently logged on user. That tells me for the script to work, as it needs root rights, that you either:
1: Is always running as root, and thereby the miner process as root, generally not a good idea for security purposes
2: Not using the crontab file which is compatible with usernames
3: Not using the crontab file which is compatbile with usernames, and you are running with a non-root user account, and in that case the script won't work (reboot command requires it).

It's only in /etc/crontab you can specify run-as usernames, not by doing crontab -e, which is a seperate file for each user, and thereby always runs as that user.

So what you really should do is:
nano /etc/crontab
Add:
* * * * *   root   /home/username/cgmon.tcl
kinsik
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
February 04, 2014, 07:36:23 PM
 #108

What is the delay between starting ubuntu and starting cgminer and how it can be changed?
Now cgminer starts in a bout 3-5 minutes after booting OS.
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 04, 2014, 09:28:09 PM
 #109

What is the delay between starting ubuntu and starting cgminer and how it can be changed?
Now cgminer starts in a bout 3-5 minutes after booting OS.

Add the full path to cgmon.tcl to your rc.local file.  That will start it immediately at boot time.

For example, in Ubuntu I have this line in /etc/rc.local
Code:
/home/username/cgmon.tcl&


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 05, 2014, 03:05:01 AM
 #110

I would like to make it so that instead of cgmon trying to start cgminer, it just restarts the pc instead.  I left the other day to get some mining supplies and got e-mails every minute that it was starting the mining program on one of my PCs.  I came home to over 180 e-mails.  This would work considering the cgmon process doesn't start until 5 minutes after the computer is on.  By then it would have started mining by itself.
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 05, 2014, 03:56:26 AM
 #111

I would like to make it so that instead of cgmon trying to start cgminer, it just restarts the pc instead.  I left the other day to get some mining supplies and got e-mails every minute that it was starting the mining program on one of my PCs.  I came home to over 180 e-mails.  This would work considering the cgmon process doesn't start until 5 minutes after the computer is on.  By then it would have started mining by itself.

There must be an error in cgmon, or something else on your computer.   That is not the intended behavior...

You can disable email notifications if you just want cgmon to restart your computer when it detects a problem.  There's an option in the configuration section.

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

Activity: 39
Merit: 0


View Profile
February 05, 2014, 05:23:51 AM
 #112

What is the delay between starting ubuntu and starting cgminer and how it can be changed?
Now cgminer starts in a bout 3-5 minutes after booting OS.

Add the full path to cgmon.tcl to your rc.local file.  That will start it immediately at boot time.

For example, in Ubuntu I have this line in /etc/rc.local
Code:
/home/username/cgmon.tcl&


I've already added to crontab */5 * * * *   root   /home/my user name /cgmon.tcl >/dev/null 2>&1 and it works as described - starts only in 3-5 min after booting.
MrBobC
Member
**
Offline Offline

Activity: 110
Merit: 10


View Profile
February 05, 2014, 11:57:35 AM
 #113

I know how to disable the e-mail notification, but I'm not too familiar with coding.  What is the start command I should be looking for to change to "reboot"?
dr00g
Newbie
*
Offline Offline

Activity: 48
Merit: 0


View Profile
February 05, 2014, 11:42:45 PM
 #114

I know how to disable the e-mail notification, but I'm not too familiar with coding.  What is the start command I should be looking for to change to "reboot"?

That would be this reboot routine:

proc reboot {} {
            
   after 10000
   exec /sbin/shutdown -r now
   exec shutdown -r now

   # and in case that didn't work...
   # (BAMT)
   after 5000
   exec reboot -f
}
MrBobC
Member
**
Offline Offline

Activity: 110
Merit: 10


View Profile
February 06, 2014, 01:18:35 AM
 #115

I've seen that.  I'm referring to the part where cgmon actually starts cgminer when it says it wasn't running.  Instead of the cgmon script starting cgminer, I'd like it to reboot the computer.  If I knew where to look I would replace the start command with the reboot procedure reference.
kinsik
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
February 06, 2014, 08:22:34 AM
 #116

How is it possible to change the pool without rebooting the PC?
If I change in tcl file the main pool what should I do next?
mig5000
Sr. Member
****
Offline Offline

Activity: 324
Merit: 250


View Profile
February 06, 2014, 03:40:44 PM
 #117

How is it possible to change the pool without rebooting the PC?
If I change in tcl file the main pool what should I do next?

'Q' : quit sgminer/cgmin
Change the server in cgmon.tcl.
Save and relaunch is with sudo ./cgmon.tcl
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 06, 2014, 11:28:24 PM
 #118

How is it possible to change the pool without rebooting the PC?
If I change in tcl file the main pool what should I do next?

I make the changes I want in cgmon.tcl and then I do this:
Code:
screen -r
q
./cgmon.tcl

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

Activity: 6
Merit: 0


View Profile
February 07, 2014, 02:20:11 AM
 #119

Whats up Jdape badass script so far. Im having a problem that I hope you can address.

1.) ubuntu 13.04 machine never reboots for any of the variables that you provide. The reboot command appears to be broken. ive done several rounds of testing to see if the command ever invokes, unplugging network cable, over clocking card until it hangs but it doesnt appear to ever happen.

Any help?
jdape (OP)
Sr. Member
****
Offline Offline

Activity: 269
Merit: 250


View Profile WWW
February 07, 2014, 02:30:38 AM
 #120

Do you see the broadcast message saying its about to be rebooted?  Do you get emails saying the GPU is hung/dead/sick and the script is going to reboot?

Fork Networking - VPS, Colocation, Dedicated Servers for Bitcoin & Litecoin. Since 1994! www.forked.net
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!