Pages:
Author

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

newbie
Activity: 48
Merit: 0
Does it come with any output when you run it?
Is it running in screen? Type: screen -r
To deattach, press Ctrl + A + D

Did you remember to install the required packages?
# 1) Install PHP, TCL and screen. 
# CentOS: yum install php53 tcl screen
# Ubuntu: apt-get install php5 tcl screen
newbie
Activity: 4
Merit: 0
Try changing values to:
set cgminer_exec "cgminer"
set cgminer_path "/opt/miners/cgminer/"

Did you remember to change username in:
set mining_user "user"

Yes, the username is the default "user" - as is the one for BAMT...unless I need to change it to root?


The values are set to as you suggested above. I chmod it again, still nothing


Edit: this also seems to showup in syslog - Jan 30 15:35:05 (none) /USR/SBIN/CRON[6088]: (CRON) error (grandchild #6090 failed with exit status 1)

when i try to run the cron manually
newbie
Activity: 48
Merit: 0
Try changing values to:
set cgminer_exec "cgminer"
set cgminer_path "/opt/miners/cgminer/"

Did you remember to change username in:
set mining_user "user"
newbie
Activity: 4
Merit: 0
My cron log is not generated. I changed the directory for the log to /home/user/cgmon.log yet it is never generated, even when I execute the cron command manually.

I am trying to get this working with BAMT 1.3... I am getting random device being hung, and my rig is unable to reboot itself apprently.

Here is my cron.log from /var/log/ when I run the cron command directly through console

Jan 30 15:25:01 (none) /USR/SBIN/CRON[5494]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)
Jan 30 15:25:01 (none) /USR/SBIN/CRON[5495]: (root) CMD (if [ -x /etc/munin/plugins/apt_all ]; then /etc/munin/plugins/apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugi$
Jan 30 15:25:01 (none) /USR/SBIN/CRON[5496]: (root) CMD (/opt/bamt/mother)
Jan 30 15:25:04 (none) /USR/SBIN/CRON[5492]: (CRON) error (grandchild #5494 failed with exit status 1)
newbie
Activity: 48
Merit: 0
Right, here is a little "bugfix":

The variable is not initialized:
# uncomment for sgminer
#set use_sgminer "yes"

Which leads to:
can't read "use_sgminer": no such variable
    while executing
"if {$mine_for == "litecoin" && $use_sgminer == "no"} {set cgminer_option1 "--scrypt" } else { set cgminer_option1 ""}"
    (file "./cgmon.tcl" line 287)

It is fixed by:
The variable is not initialized:
# uncomment for sgminer
set use_sgminer "no"
#set use_sgminer "yes"

If you uncomment the one below, the variable will be changed. In this, you can control sgminer with just commenting/uncomment the variable below.

Apart from that, the script runs for me. Did you change anything else?


Also, if you will in:
set cgminer_path ""
Then you only have to set the directory, like /home/user/sgminer/, where the sgminer file is located inside. You don't have to fill out the directory path, if you have installed cgminer, like I have by compiling and installing with "sudo make install".
newbie
Activity: 48
Merit: 0
funkycold:

1: I will try to replicate it and come up with a fix.

2: That is part of jdapes code, but I do believe you have to wait at least 3 minute for it to detect it. How long have you tried to wait?


MrBobC:

I haven't tried BAMT myself, but it could have other commands, as you have already figured.
If there is an easy way to detect if the OS is BAMT, which I guess there is (will look into it) it should be easy to implement a fix, so you don't have to change it yourself.
member
Activity: 110
Merit: 10
I have problems with the actual reboot, but this I would think is a BAMT issue.  I am able to fix it by changing the shutdown -r now command to reboot -f.
newbie
Activity: 9
Merit: 0
Yes That crontab suggestion worked thx!

Here are some of the issues im having with the new cgmon 0.16b

1) I cant get Cgminer to start, it shows "cgminer not running, starting..." "cgminer started successfully"
   But nothing happens.

When i remove the cgminer_path "" blank, it works, however it restarts cgminer multiple times....

Question: What should i put in the cgminer_exec and cgminer_path
              Whats the difference between these two fields?


2) I;m also having another problem where even if i disable all my GPU's manually from CGminer i still get all "GPU's running healthy" message from cgmon.

Am I doing something wrong? shouldnt it detect DEAD GPU's and restart cgminer?

Thx
 
newbie
Activity: 48
Merit: 0
If you add it in /etc/crontab as root, it will run by itself yes.

It needs root to be able to reboot.
After a reboot and the cron job runs, it will start cgminer.

Example:
* * * * * root /home/username/cgmon.tcl

That would run it every minute.
newbie
Activity: 9
Merit: 0
Great work guys! I love cgmon!

I am running 4X R9 280X GPU's on scrypt mining,
a few questions:

1) When i manually disable all my GPU's in cgminer, it still shows as "cgminer running and all GPU's healthy, cgmon 0.1b5"
Any idea's how cgmon can detect sick or Dead GPU's accurately?

2) Do I need to be root user to run cgmon,tcl ? since my rig reboots sometimes and i am not there 24/7, I would like cgmon to make sure cgminer is running at all times. I beleive my rig logs in as user and not root. Will cgmon still run?

Thx
sr. member
Activity: 269
Merit: 250
cgmon 0.1b6 released.

  •    Now checks accepted share outputs.  If no shares in 5 (default) minutes, send email notice and reboot rig.
  •    Moved all log messages to ~$mining_user/cgmon.log instead of the current working directory of whichever user ran cgmon.
  •    Split cgminer_path into cgminer_path and cmginer_exec to support sgminer.
  •    Added support for sgminer 4.0.0.
sr. member
Activity: 269
Merit: 250
Hey, I found this post a while ago, and as I am using sgminer and also wanted some easier customization, I have reworked the script quite a lot.

Still needs a little more work though, then I will be sharing it here.

I highly appreciate your work!

Cool.  Post it and I'll incorporate your improvements.  Smiley
newbie
Activity: 48
Merit: 0
Hey, I found this post a while ago, and as I am using sgminer and also wanted some easier customization, I have reworked the script quite a lot.

Still needs a little more work though, then I will be sharing it here.

I highly appreciate your work!
sr. member
Activity: 269
Merit: 250
The next version will send email notification or reboot if a GPU stops outputting accepted shares.  It wont be based on hash rate.
member
Activity: 110
Merit: 10
Got it!  I had to apt-get install php5-cli.  Once I did that the files were where you thought they would be, and then I used ln to make the softlink, and then the computer rebooted at the next monitor because it saw a sick/dead gpu, although I don't think there was one... From an earlier post of mine, is there a setting to restart cgminer/pc if hashrate falls below xx?
sr. member
Activity: 269
Merit: 250
Sorry, I'm not sure where PHP is locate in BAMT.   Try asking in a BAMT-related forum perhaps?

Once you know where it's at, you can link it to /usr/bin/php.

member
Activity: 110
Merit: 10
which php5 didn't do anything.  I did try whereis php5 and used ln -s /etc/php5 /usr/bin/php but that didn't do anything when the script tried to run.  There was also /usr/lib/php5 and /usr/share/php5, which did not produce any results when I ln -s /usr/lib/php5 /usr/bin/php or ln -s /usr/share/php5 /usr/bin/php.  I did remove the links before creating the new ones with rm.
sr. member
Activity: 269
Merit: 250
Do this:

Code:
which php5

Take that result (probably '/usr/bin/php5') and place it into the example command below as appropriate:

Code:
 ln -s /usr/bin/php5 /usr/bin/php 
member
Activity: 110
Merit: 10
It says, "BAMT miner couldn't find PHP.  Please install it."  When I type apt-get install php5 it says it is already the newest version.  I am on BAMT 1.3, does this matter?
sr. member
Activity: 269
Merit: 250
Oh, okay.  Silly question though, I'm not very adept at Linux (yet), and where would I find that file?

It will be in the directory you are running cgmon from.  You can also try 'locate cgmon.log' or 'find / -name cgmon.log'.
Pages:
Jump to: