Bitcoin Forum
June 14, 2024, 10:32:25 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 »  All
  Print  
Author Topic: [ANN] PHPMiner for CGMiner v3.7.2 / SGMiner 4.1.0+ with multi rig support  (Read 8331 times)
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 05, 2014, 09:40:47 PM
Last edit: March 09, 2014, 12:45:20 PM by prdatur
 #1

Hello everyone,

I just wanted to let you all know, I finished my PHPMiner.

PHPMiner is a webinterface which uses the API from CGMiner/SGMiner.
It can:

 - Handle multiple rig's
 - Watch the device status and notify when something is wrong.
 - Overclock GPU's
 - Handle pool groups and easy pool switching.
 - Restart CGMiner if not running
 - Reboot system if defunc processes are present.


PHPMiner is for Linux and Windows.
FPGA/ASIC are currently not really supported, all the overclocking and info things are based on GPU's. Because I don't have an FPGA/ASIC I also can not tell if it will run with those.

If you are interested.


Hompage
https://phpminer.com

Github
https://github.com/prdatur/phpminer

I also enhanced the CGMiner API with some more api commands. I recommend the use of this fork (Only API was enhanced, nothing else changed)
https://github.com/prdatur/cgminer

Any questions?
Please use this thread:
https://bitcointalk.org/index.php?topic=400589 There all support questions will be answered.
compile
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
January 06, 2014, 05:14:57 AM
 #2

Looks really nice.
What are the requirements that make this a Linux only solution?
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 06, 2014, 12:20:45 PM
 #3

The things which requires Linux are:

- restart cgminer of not running
- reboot machine of defunc function exists

Also I didn't tested it on Windows, so I don't want to tell it will work when I can not be sure.

I think I will test it in some days under Windows.
compile
Newbie
*
Offline Offline

Activity: 51
Merit: 0


View Profile
January 06, 2014, 07:16:59 PM
 #4

going to try it out under windows right now.

I'll let you know.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 06, 2014, 07:45:40 PM
 #5

If you are on freenode irc. Please join #phpminer so we can diskuss the issues which maybe are.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 09, 2014, 07:00:29 PM
 #6

New version available: 1.0.2

Changes:
  - Multi rig support
  - Latest version check

Also it was now tested successfully under windows.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 09, 2014, 11:40:15 PM
 #7

New version: 1.0.3

Changes:
  - Fix check if cgminer is running
  - Seperated config for phpminer rpc client

After updates always update the phpminer rpcclient and restart the service.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 10, 2014, 01:51:17 AM
 #8

New version: 1.0.4

Changes:
  - Fix cron errors
  - Added new monitoring settings for hardware errors
  - Enhanced main table style to fit a bit better

After updates always update the phpminer rpcclient and restart the service.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 11, 2014, 11:11:47 AM
 #9

New version: 1.0.5

Changes:
  - Fix errors while retrieving device status in main windows

After updates always update the phpminer rpcclient and restart the service.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 11, 2014, 04:16:31 PM
 #10

People who downloaded 1.0.5 till now, please re-download it.

or change:
$system_conf['version'] = array(1, 0, 4);

to:
$system_conf['version'] = array(1, 0, 5);

within includes/common.php at line 60.

Sorry forgot to change the version info Smiley
icaros
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
January 12, 2014, 03:09:01 AM
Last edit: January 12, 2014, 06:15:15 PM by icaros
 #11

Edit and Delete button at Mining rig not working:

[05:06:27.747] POST https://xxx/main/get_rig_data.json [HTTP/1.1 404 Not Found 2ms]
[05:06:29.747] POST https://xxx/main/delete_rig.json [HTTP/1.1 404 Not Found 2ms]

views/main/init.js:            ajax_request('/main/get_rig_data.json', {rig: $(this).data('rig')}, function(rig_results) {
                                    ajax_request('/main/delete_rig.json', {rig: rig}, function() {
Changing it to:
ajax_request(murl('main', 'get_rig_data'), {rig: $(this).data('rig')}, function(rig_results) {
ajax_request(murl('main', 'delete_rig'), {rig: rig}, function() {

fixed the bug.

There is bug on version check too:
A new version is available, current version 1.0.6 - latest version 1.0.5. Download. After updating to a new version, do not forget to copy the new index.php from the phpminer_rpcclient and restart the service."

Somekind better timeout for sockets would be nice too. If my ip rig changes and it has ip where it can't connect it will freeze for many many minutes.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 12, 2014, 06:33:49 PM
 #12

New version available: 1.0.7

Changes:
  - Fix cronjob error when no rig's are configurated.
  - Fix adding pools on servers which don't response as expected thx @ madcoin
  - Fix HW config dialog to close correctly.
  - Fix adding/deleting rig urls thx @ icarus

After updates always update the phpminer rpcclient and restart the service.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 12, 2014, 06:39:08 PM
 #13

Somekind better timeout for sockets would be nice too. If my ip rig changes and it has ip where it can't connect it will freeze for many many minutes.

Thy for the report and direct fix Smiley
Will check that timeout thing.
WARLOCKZA
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
January 13, 2014, 07:09:22 AM
 #14

I have picked up an error during my install, probably related more to my apache configuration

Code:
[Mon Jan 13 09:00:13 2014] [alert] [client 10.0.0.10] /var/www/phpminer/.htaccess: AddDefaultCharset not allowed here
[Mon Jan 13 09:00:13 2014] [alert] [client 10.0.0.10] /var/www/phpminer/views/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration,
[Mon Jan 13 09:00:13 2014] [alert] [client 10.0.0.10] /var/www/phpminer/templates/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration,

If I remove the AddDefaultCharset from /var/www/phpminer/.htaccess
and delete the other 2 .htaccess files the page seems to load fine, though I am not sure what else I have broken
WARLOCKZA
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
January 13, 2014, 08:25:34 AM
 #15

Can you tell me which files you changed for the api, as far as I can tell it's only the api.c file ?
icaros
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
January 13, 2014, 10:47:11 AM
Last edit: January 13, 2014, 11:54:34 AM by icaros
 #16

Feature request: Reboot computer if cgminer API reports gpu status as DEAD/SICK should be Alive.

{"command":"devs","parameter":""}

Code:
{
    "STATUS": [{
        "STATUS": "S",
        "When": 1389613832,
        "Code": 9,
        "Msg": "4 GPU(s) - ",
        "Description": "cgminer 3.7.2"
    }],
    "DEVS": [{
        "GPU": 0,
        "Enabled": "Y",
        "Status": "Alive",
        "Temperature": 85.00,
        "Fan Speed": 3150,
        "Fan Percent": 97,
        "GPU Clock": 1050,
        "Memory Clock": 1400,
        "GPU Voltage": 1.206,
        "GPU Activity": 99,
        "Powertune": 20,
        "MHS av": 0.43,
        "MHS 5s": 0.43,
        "Accepted": 75,
        "Rejected": 3,
        "Hardware Errors": 0,
        "Utility": 0.74,
        "Intensity": "18",
        "Last Share Pool": 0,
        "Last Share Time": 1389613767,
        "Current Pool": 0,
        "Total MH": 2619.8671,
        "Diff1 Work": 41640,
        "Difficulty Accepted": 38400.00000000,
        "Difficulty Rejected": 1536.00000000,
        "Last Share Difficulty": 512.00000000,
        "Last Valid Work": 1389613767,
        "Device Hardware%": 0.0000,
        "Device Rejected%": 3.6888,
        "Device Elapsed": 6110
    }, {
        "GPU": 1,
        "Enabled": "Y",
        "Status": "Alive",
        "Temperature": 78.00,
        "Fan Speed": 2964,
        "Fan Percent": 65,
        "GPU Clock": 1025,
        "Memory Clock": 1250,
        "GPU Voltage": 1.100,
        "GPU Activity": 99,
        "Powertune": 20,
        "MHS av": 0.61,
        "MHS 5s": 0.61,
        "Accepted": 104,
        "Rejected": 4,
        "Hardware Errors": 0,
        "Utility": 1.02,
        "Intensity": "20",
        "Last Share Pool": 0,
        "Last Share Time": 1389613759,
        "Current Pool": 0,
        "Total MH": 3725.5905,
        "Diff1 Work": 55778,
        "Difficulty Accepted": 53248.00000000,
        "Difficulty Rejected": 2048.00000000,
        "Last Share Difficulty": 512.00000000,
        "Last Valid Work": 1389613759,
        "Device Hardware%": 0.0000,
        "Device Rejected%": 3.6717,
        "Device Elapsed": 6110
    }, {
        "GPU": 2,
        "Enabled": "Y",
        "Status": "Alive",
        "Temperature": 72.00,
        "Fan Speed": 2804,
        "Fan Percent": 78,
        "GPU Clock": 1000,
        "Memory Clock": 1500,
        "GPU Voltage": 1.200,
        "GPU Activity": 99,
        "Powertune": 20,
        "MHS av": 0.71,
        "MHS 5s": 0.71,
        "Accepted": 131,
        "Rejected": 0,
        "Hardware Errors": 0,
        "Utility": 1.29,
        "Intensity": "13",
        "Last Share Pool": 0,
        "Last Share Time": 1389613773,
        "Current Pool": 0,
        "Total MH": 4311.0728,
        "Diff1 Work": 64123,
        "Difficulty Accepted": 67072.00000000,
        "Difficulty Rejected": 0.00000000,
        "Last Share Difficulty": 512.00000000,
        "Last Valid Work": 1389613773,
        "Device Hardware%": 0.0000,
        "Device Rejected%": 0.0000,
        "Device Elapsed": 6110
    }, {
        "GPU": 3,
        "Enabled": "Y",
        "Status": "Alive",
        "Temperature": 86.50,
        "Fan Speed": 2263,
        "Fan Percent": 48,
        "GPU Clock": 800,
        "Memory Clock": 1250,
        "GPU Voltage": 1.175,
        "GPU Activity": 99,
        "Powertune": 20,
        "MHS av": 0.43,
        "MHS 5s": 0.43,
        "Accepted": 71,
        "Rejected": 1,
        "Hardware Errors": 0,
        "Utility": 0.70,
        "Intensity": "18",
        "Last Share Pool": 0,
        "Last Share Time": 1389613748,
        "Current Pool": 0,
        "Total MH": 2616.4593,
        "Diff1 Work": 41650,
        "Difficulty Accepted": 36352.00000000,
        "Difficulty Rejected": 512.00000000,
        "Last Share Difficulty": 512.00000000,
        "Last Valid Work": 1389613748,
        "Device Hardware%": 0.0000,
        "Device Rejected%": 1.2293,
        "Device Elapsed": 6110
    }],
    "id": 1
}

Most of times my GPU Status changes to DEAD or SICK and Cgminer process won't defunc.
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 13, 2014, 06:01:07 PM
 #17

I have picked up an error during my install, probably related more to my apache configuration

Code:
[Mon Jan 13 09:00:13 2014] [alert] [client 10.0.0.10] /var/www/phpminer/.htaccess: AddDefaultCharset not allowed here
[Mon Jan 13 09:00:13 2014] [alert] [client 10.0.0.10] /var/www/phpminer/views/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration,
[Mon Jan 13 09:00:13 2014] [alert] [client 10.0.0.10] /var/www/phpminer/templates/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration,

If I remove the AddDefaultCharset from /var/www/phpminer/.htaccess
and delete the other 2 .htaccess files the page seems to load fine, though I am not sure what else I have broken

The page works without the those htaccess entries but just to provide you the information what is missing. In your Virtual host for phpminer you have to post the "AllowOverride" directive. The RewriteEngine error is because you didn't enabled it (linux command to enable it is: a2enmod rewrite)

Quote
Can you tell me which files you changed for the api, as far as I can tell it's only the api.c file ?

I only changed the api.c

prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 13, 2014, 09:20:51 PM
 #18

New version available: 1.0.8

Changes:
  - Added restart option when Dead/Sick GPU's are detected without defunc processes.
  - Add Socket timeout setting.

After updates always update the phpminer rpcclient and restart the service.
icaros
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
January 13, 2014, 09:40:18 PM
Last edit: January 13, 2014, 09:56:36 PM by icaros
 #19

 - Added restart option when Dead/Sick GPU's are detected without defunc processes.

Most of times restarting Cgminer is not enough to solve that kind problem. Computer reboot is only way to solve it. Now it's try to restart cgminer process?
"Restart CGMiner on Dead/Sick GPU's:"
cron.php:                        if ($device_data['Status'] == 'Dead' || $device_data['Status'] == 'Sick') {

i don't remember if thats case-sensitive or not but it's "DEAD" and "SICK" if i remember correctly.

I would say better solution would be add IF:
"Enabled": "Y", this value is Y
"Status": "Alive", this value is not "Alive" it would work always.

or maybe:  if (strtolower($device_data['Status']) == 'dead' || strtolower($device_data['Status']) == 'sick') {
prdatur (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


View Profile
January 14, 2014, 07:22:31 PM
 #20

 - Added restart option when Dead/Sick GPU's are detected without defunc processes.

Most of times restarting Cgminer is not enough to solve that kind problem. Computer reboot is only way to solve it. Now it's try to restart cgminer process?
"Restart CGMiner on Dead/Sick GPU's:"
cron.php:                        if ($device_data['Status'] == 'Dead' || $device_data['Status'] == 'Sick') {

i don't remember if thats case-sensitive or not but it's "DEAD" and "SICK" if i remember correctly.

I would say better solution would be add IF:
"Enabled": "Y", this value is Y
"Status": "Alive", this value is not "Alive" it would work always.

or maybe:  if (strtolower($device_data['Status']) == 'dead' || strtolower($device_data['Status']) == 'sick') {

It should work because i checked the response within the API and there it is written "Dead" or "Sick" but the tolower is a bit more secure, will use this in future.

Enabled Y is a additional which i will implement, but just Status not Alive would be too much, because cgminer, I think, can just disable a gpu for a specific time but not "disable" it. So this would be a false positive.

With cgminer restart / machine reboot I think i will provide the config with a select box "Do nothing, Restart CGminer, Reboot machine" so anybody can decide how this situation of dead GPU's should be handled.

Would that be ok for you?
Pages: [1] 2 3 4 »  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!