Bitcoin Forum
March 29, 2024, 04:47:44 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining software (miners) / Simple Cgminer Remote Monitoring Script - now with email alerts on: June 01, 2013, 01:22:44 PM
SIMPLE CGMINER REMOTE MONITORING SCRIPT NOW WITH ALERTS



I made this script so I can check status for my rigs from anywhere not just my local computer.
I know there is ANUBIS but it is too heavy for me. I just needed a simple status script.

You will need:
- Webserver / webhosting with PHP (with socket support enabled)
- Crontab access for Alerts
- Postfix or Sendmail for sending Email Alerts
- Miners using Cgminer

1. CONFIGURING CGMINER

Enable API support with adding this to the cgminer.conf:
Code:
"api-port" : "4001",
"api-listen" : true,
"api-allow" : "YOUR_WEBSERVER_IP",

or cgminer command line:
Code:
--api-port 4001 --api-listen --api-allow "YOUR_WEBSERVER_IP"

Change YOUR_WEBSERVER_IP to your webserver REMOTE IP.
With --api-allow only webserver remote IP has the read only access to the cgminer API. This has to be set for security reasons.
Each rig needs its own api-port! Ports numbers can be ANYTHING you want as long the are not already taken. For example you can set port 4001 for Rig #1, 4002 for Rig #2, 4003 for Rig #3, etc.

2. OPEN PORTS ON ROUTER / FIREWALL



If you have a router or a firewall you will need to open ports you have chosen for your rigs. In my example you will need to open ports 4001, 4002, 4003.
To do this you will have to know your rigs local IPs and set the port forwarding on router to these IPs.
You get the rig's local IP number with:

on windows open command prompt and run:
Code:
ipconfig

Look at "IPv4 Address" of your network adapter.


on linux run command:
Code:
ifconfig

Look at "inet addr:"  of your network adapter.


3. SETUP MONITORING PHP SCRIPTS

Download files from here:
https://github.com/Paxxil/cgminer_remote_monitoring

Open functions.inc.php in your text editor.
Follow the instructions inside and add your miner rigs settings there.
After you made the changes, FTP to your webserver, navigate to your public www directory, create subdirectory "monitoring" and upload the files to it.

If you set everything right you should get the monitoring stats when you navigate to http://your_webserver_ip/monitoring/ (or if you have a domain http://wwww.your_domain.com/monitoring/)

4. CONFIGURING ALERTS
Open functions.php.inc in your text editor.
Edit the settings (email, alert configs) in the # SETUP ALERTS # Section.

Next you will have to make the file email.lock writable by the script.
In linux you do it with command:
Code:
chmod 666 email.lock

Now open crontab editor:
Code:
crontab -e

And put ABSULUTE path to the monitoring_cron.php script
Code:
*/2 * * * *     php /path/to/your/monitoring_cron.php >/dev/null 2>&1
This will execute monitoring_cron.php every 2 minutes.
If you want to check the server less frequently change */2 * * * * part.
Some examples:
Code:
* * * * *   => every minute
*/5 * * * * => every 5 minutes
0 * * * *   => every hour
0 0 * * *   => once a day at midnight server time

Save the file and shut down one cgminer to test the script. If you receive the email then everything works.

If you can not get it to work just PM me and I will help you.

If you like it please support it with donating:
LTC : LdQ1UHiRy24Tvmm8NHbhAdHL3Qf3JqrUbG
BTC : 1EA8UrpifP9hi7LZHjJphCJQ6Hh45mb5pP

Good Luck!
--p4xil

EDIT
2014-01-02 : v2.1.1 Fixed some bugs
2013-12-29 : v2.1 Added ASC and PGA support
2013-06-13 : Fixed some bugs
2013-06-04 : v2.0 Added Email Alerts

2  Bitcoin / Mining / An idea on how to give true meaning to mining on: May 13, 2013, 09:03:46 AM
Now mining is sort of waste of energy. All this GPU and CPU power has no other meaning but solving blocks which have no true life meaning.

What if mining would, beside solving blocks and getting coins, also help in some scientific research projects? For instance SETI@Home
I've already wrote them about this
http://setiathome.berkeley.edu/forum_thread.php?id=71623

Or any other projects, medical, scientific etc
http://www.makeuseof.com/tag/10-ways-to-donate-your-cpu-time-to-science/

What do you think?
3  Alternate cryptocurrencies / Altcoin Discussion / [WTS] JKC - 100 JKC for 1 LTC on: May 08, 2013, 05:11:54 PM
Have around 600 JKC for sale.
4  Alternate cryptocurrencies / Altcoin Discussion / Optimizing Guide for Gigabyte WF3 7950 (1000/1250 @ 1.25V Stock) on: May 07, 2013, 11:58:24 AM
Hello fellow miners!

I just wanted to share my optimization for these cards.

As you probably know new Gigabyte cards come with locked voltage at 1.25V and stock clocks at 1000Mhz GPU, 1250Mhz memory. This makes cards run hot and power consumption is high.
I have 3x 7950 setup and system took over ¨950W and it was really hard to keep them under 75C at stock clocks with 85% fan speed. Hashes were (avg) 610kh/s per card.

Later I found out that there is an older official BIOS (F43), which has lower voltage lock and lower clocks. So I tried it and flashed the cards.
Here is how I did it:

UPDATE 1:
HDMI port will stop working with F43 BIOS! So you will have to use DP or DVI to connect your monitor.

UPDATE 2:
There are new cards with FT0 BIOS which won't let you flash official F43 BIOS over it.
Please check this thread for further info: http://www.overclock.net/t/1313813/new-bios-update-for-gigabyte-hd7950/790

So check your current BIOS version before you proceed any further!
Thanks Mattzees for this update! (https://forum.litecoin.net/index.php/topic,4317.0.html)

1. Download F43 Bios: http://www.gigabyte.com/products/product-page.aspx?pid=4121&dl=1#bios
2. Download atiflash: http://www.techpowerup.com/downloads/2230/ATIFlash%204.07.html
3. you need DOS bootable USB drive. I used this tutorial: http://www.sevenforums.com/tutorials/46707-ms-dos-bootable-flash-drive-create.html
4. put F43 Bios and ati flash to USB drive
5. Turn off the computer
6. Put BIOS Switch on the GPU to number 1 http://www.jagatreview.com/wp-content/uploads/2012/02/gigabyte-amd-hd-7950-dualbios-switch.jpg
    If anything goes wrong you can just put switch back to number 2 and you have factory default BIOS.
7. Boot with USB drive to DOS
8. Flash to F43 BIOS version (change xxxxxx.F43 to he name of the BIOS file)
Code:
atiflash -p 0 xxxxxx.F43
9. Reboot

Now my cards are at 900/1250 @ 1.090V stock.

I use this cgminer config:

1155/1420 core/memory clock speed
Thread Concurrency 24000
Workload 256
Threads per gpu 1
lookup gap 2
Intensity 19
Power Limit 20%

My cgminer.bat looks like this:
Code:
setx GPU_MAX_ALLOC_PERCENT 100
setx GPU_USE_SYNC_OBJECTS 1
cgminer --thread-concurrency 24000 --lookup-gap 2 --gpu-engine 1155 --gpu-memclock 1420 --gpu-powertune 20 -w 256 -I 19 -g 1

I am getting (avg) 2005 kh/s with all three cards, so around 668 kh/s per card without HW errors and low stales on stratum pool.
Temperatures are around 65C with 65% fan speed and power consumption dropped for ¨50W per card.
You will still need an open rig with extra fan(s) to get decent temperatures!
Here is pic of my rig:
http://shrani.si/f/Y/sP/2rk1ed85/photo-1-small.jpg

F43 BIOS was total winner in all aspects - power, performance and temperatures.
So if you have the same card, I strongly recommend you to do the same.

Here is my latest screenshot of cgminer:


If you appreciate this tutorial and it is saving you money you can donate some coins Wink
LTC: LVs3WjD3KfZQ2xniqqqkG2j4Fwetzybpxb
BTC: 1DpLqw6dB2bo5zX9YRYC4AjyMhuPADn8he

Have a great day!

P4xil

P.S.: you can try with TC 16384. It works even better for some. I got 60 kh/s more but I also got around 5 HW errors/day, so it seems 24000 is optimal for my setup.

Disclaimer: I am taking no responsibility for any damage you might have by following these instructions. There is always some risk involved when flashing the BIOS, so you must know what you are doing.
5  Other / Beginners & Help / Gigabyte WF3 7950 (1000/1250 @ 1.25V Stock) on: May 06, 2013, 08:21:01 PM
Hello fellow newbies!

I just wanted to share my optimization for these cards.

As you probably know new Gigabyte cards come with locked voltage at 1.25V and stock clocks at 1000Mhz GPU, 1250Mhz memory. This makes cards run hot and power consumption is high.
I have 3x 7950 setup and system took over ¨950W and it was really hard to keep them under 75C at stock clocks with 85% fan speed. Hashes were (avg) 610kh/s per card.

Later I found out that there is an older official BIOS (F43), which has lower voltage lock and lower clocks. So I tried it and flashed the cards.
Here is how I did it:

1. Download F43 Bios: http://www.gigabyte.com/products/product-page.aspx?pid=4121&dl=1#bios
2. Download atiflash: http://www.techpowerup.com/downloads/2230/ATIFlash%204.07.html
3. you need DOS bootable USB drive. I used this tutorial: http://www.sevenforums.com/tutorials/46707-ms-dos-bootable-flash-drive-create.html
4. put F43 Bios and ati flash to USB drive
5. Turn off the computer
6. Put BIOS Switch on the GPU to number 1 http://www.jagatreview.com/wp-content/uploads/2012/02/gigabyte-amd-hd-7950-dualbios-switch.jpg
    If anything goes wrong you can just put switch back to number 2 and you have factory default BIOS.
7. Boot with USB drive to DOS
8. Flash to F43 BIOS version (change xxxxxx.F43 to he name of the BIOS file)
Code:
atiflash -p 0 xxxxxx.F43
9. Reboot

Now my cards are at 900/1250 @ 1.090V stock.

I use this cgminer config:

1155/1420 core/memory clock speed
Thread Concurrency 24000
Workload 256
Threads per gpu 1
lookup gap 2
Intensity 19
Power Limit 20%
Code:
cgminer --thread-concurrency 24000 --lookup-gap 2 --gpu-engine 1155 --gpu-memclock 1420 --gpu-powertune 20 -w 256 -I 19 -g 1

I am getting (avg) 2005 kh/s with all three cards, so around 668 kh/s per card without HW errors and low stales on stratum pool.
Temperatures are around 65C with 65% fan speed and power consumption dropped for ¨50W per card.

F43 BIOS was total winner in all aspects - power, performance and temperatures.
So if you have the same card, I strongly recommend you to do the same.
You will still need an open rig with extra fan(s) to get decent temperatures.

Here is my latest screenshot of cgminer:


If you appreciate this tutorial and it is saving you money you can donate some coins Wink
LTC: LVs3WjD3KfZQ2xniqqqkG2j4Fwetzybpxb

Have a great day!

P4xil

P.S.: you can try with TC 16384. It works even better for some. I got 60 kh/s more but I also got around 5 HW errors/day, so it seems 24000 is optimal for my setup.

Disclaimer: I am taking no responsibility for any damage you might have by following these instructions. There is always some risk involved when flashing the BIOS, so you must know what you are doing.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!