Pages:
Author

Topic: v5.6.0 ][ Open-Source Pooling Web Software ( MiningFarm ) - page 9. (Read 57276 times)

newbie
Activity: 25
Merit: 0
I will not try that ^^ i think that xen will implement this later itself.


Now for the Total Hash Rate of the Pool:

1. SQL insert
Code:
ALTER TABLE `stats_poolMHashHistory` ADD `totalMhash` INT( 50 ) NOT NULL 
2. now open statsUpater.php
replace:
Code:
//Get average Mhash for the entire pool
$poolAverageHashQ = mysql_query("SELECT `mhashes` FROM `stats_userMHashHistory` WHERE `mhashes` > 0 AND `timestamp` = '".$globalTime."'");
$numPoolHashRows = mysql_num_rows($poolAverageHashQ);
$averagePoolHash = 0;
while($poolHash = mysql_fetch_array($poolAverageHashQ)){
$averagePoolHash += $poolHash["mhashes"];
}
if($averagePoolHash > 0 && $numPoolHashRows > 0){
$averagePoolHash = $averagePoolHash/$numPoolHashRows;
}
//Add pool average to table
mysql_query("INSERT INTO `stats_poolMHashHistory` (`timestamp`, `averageMhash`)
VALUES('$globalTime', '$averagePoolHash')");
with:
Code:
//Get average and total Mhash for the entire pool
$poolAverageHashQ = mysql_query("SELECT `mhashes` FROM `stats_userMHashHistory` WHERE `mhashes` > 0 AND `timestamp` = '".$globalTime."'");
$numPoolHashRows = mysql_num_rows($poolAverageHashQ);
$averagePoolHash = 0;
$totalPoolHash = 0;
while($poolHash = mysql_fetch_array($poolAverageHashQ)){
$averagePoolHash += $poolHash["mhashes"];
$totalPoolHash += $poolHash["mhashes"];
}
if($averagePoolHash > 0 && $numPoolHashRows > 0){
$averagePoolHash = $averagePoolHash/$numPoolHashRows;
}
//Add pool average and total to table
mysql_query("INSERT INTO `stats_poolMHashHistory` (`timestamp`, `averageMhash`, `totalMhash`)
VALUES('$globalTime', '$averagePoolHash', '$totalPoolHash')");

save.

3. open index.php
and replace it with this one:
http://nopaste.info/46f62a7fde_nl.html

4. Looks like that:
http://imageshack.us/photo/my-images/864/chartz.png/
hero member
Activity: 630
Merit: 500
I just realized that the code in question INSERTS into a table that is not created by default from Xen's SQL database dump. "stats_userSharesHistory" .  I created the table manually, but I don't really know if it's working for sure.  I'm getting a lot of zeros in my stats.  Developing this code on the fly is fun!
newbie
Activity: 25
Merit: 0
I dont think that the code has been tested.
Working for a patch now to see the whole Pool Rate over time.

At the moment we can see only averages. More interesting is the total rate i think.
hero member
Activity: 630
Merit: 500
Got it, and your fix works!  Been struggling to get stats working now.  Also, a big thing I think we should mention to users.  To run stats, statsUpdater.php must be run as a cronjob.  However, there is a large section of code commented out for the "Generate User Shares History" section.  Is this section of code tested?
newbie
Activity: 25
Merit: 0
Hi,
if you're logged out. And watch your Mainpage. You'll see your Average PoolRate(Graph) but without any timestamps.
They are all on zero.

And btw if you change "DESC" to "ASC" in the mysql statements on line ~59 and ~87 (index.php)
the timeline is "normal" from left to the right.
hero member
Activity: 630
Merit: 500
Can you explain what you mean by "zero time"?
newbie
Activity: 25
Merit: 0
Change (index.php)
Code:
else if($numRows == 0){
$i=0;
//Go through the pool history and display that
$poolHistory = mysql_query("SELECT `averageMhash`, `timestamp` FROM `stats_poolMHashHistory` WHERE `timestamp` >= '".$fiveMinutesAgo."' ORDER BY `timestamp` DESC");
while($poolHash = mysql_fetch_array($poolHistory)){
if($i > 0){
$poolHashArray .=",";
$timeHashArray .=",";
}
$i++;
$poolHashArray .= $poolHash["averageMhash"];
$timeHashArray .= "'".date("G:i:s", $time["timestamp"])."'";
}

to
Code:
else if($numRows == 0){
$i=0;
//Go through the pool history and display that
$poolHistory = mysql_query("SELECT `averageMhash`, `timestamp` FROM `stats_poolMHashHistory` WHERE `timestamp` >= '".$fiveMinutesAgo."' ORDER BY `timestamp` DESC");
while($poolHash = mysql_fetch_array($poolHistory)){
if($i > 0){
$poolHashArray .=",";
$timeHashArray .=",";
}
$i++;
$poolHashArray .= $poolHash["averageMhash"];
$timeHashArray .= "'".date("G:i:s", $poolHash["timestamp"])."'";
}

its fixing the zero time at index.php (if logged out)
hero member
Activity: 630
Merit: 500
Thanks for that bugfix masterp.
newbie
Activity: 25
Merit: 0
Hi,
im just wondering of the low rate of bug reports.
i reinstalled it 4 times now cause i think im on the wrong way.

but no it doesnt work like expected.

It is to much to explain right now cause i hve to go to work.

See you later.

PS:
Do you need any programmer?
I'm here for any help. Wink

bug: 4.0.3
Quote
$getRoundSharesQ = mysql_query("SELECT `id FROM `shares_history` WHERE `blockNumber` = '".$block["blockNumber"]."' AND `username` = '$username.%' AND `our_result` != 'N'");

replace with:
Quote
$getRoundSharesQ = mysql_query("SELECT `id` FROM `shares_history` WHERE `blockNumber` = '".$block["blockNumber"]."' AND `username` = '$username.%' AND `our_result` != 'N'");
hero member
Activity: 630
Merit: 500
Code suggestion.  In "functions.php" we are not specifying the RPC port and thus assuming it for every RPC call.  Ex:

Code:
//Bitcoind RPC information
$rpcType = "http";
$rpcUsername = "bitcoins";
$rpcPassword = "lolsalad";
$rpcHost = "127.0.0.1";

I had to define rpcHost as 127.0.0.1:8337 because that's what port my bitcoind listens on.  I suggest to either add a comment on the end of that and specify a port OR define another variable like $rpcPort.
hero member
Activity: 630
Merit: 500
Bug report!  This is in v4.0.3

"functions.php" line 271

Code:
$getRoundSharesQ = msyql_query("SELECT `id FROM `shares_history` WHERE `blockNumber` = '".$block["blockNumber"]."' AND `username` = '$username.%' AND `our_result` != 'N'");

Spot the "mysql_query" typo?  Essentially breaks the entire website if logged in, haha!   Grin

legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Hi,
we are testing atm.

- I cannot save at the "website preferences" / have it do over mysql
- Workers cant be deleted
- Is the Mysql file realy correct? Never seen something like "<<<<<<< HEAD" same as "=============" in a dump. / Sql cant read the file i have to put anything in the db manually
- The Design is broken on IE
- Pool stats are going from the right to the left?

used the files on first page. Download today.

and is this:
Quote
*Strong encrypted session cookies
*Auth pin needed to change certain aspects of user profile
*Instant pay out
*Stats will calculate when the next block
will be found and graphs the estimated time
*Email Validation
*Percentage Fee option
*HTML is written with Style Sheets in mind
*Out of the box translation support
*Flexible administrator panel
*API support for workers status.
*Native support for TradeHill bitcoin worth, along
with a "Potential Balance" display that displays your account balance with the current worth
*Live WYSIWYG Blog post and Admin page editors

allready implemented? where i can set the fee? (only in the database?)

best regards
Thank you for reminding me When i re-designed the pages I forgot to include the percentage fee
brand new
Activity: 0
Merit: 0
when i import insert_into_database.sql, i received following error during import

Code:
Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 97
STR: <<<<<<<
SQL: -- phpMyAdmin SQL Dump
-- version 3.3.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
<<<<<<< HEAD
-- Generation Time: Jun 17, 2011 at 02:35 AM
=======
-- Generation Time: Jun 14, 2011 at 04:34 PM
>>>>>>> f9332a8ad0cd4e27505f162718c69fc8ea297aa7
-- Server version: 5.1.54
-- PHP Version: 5.3.5-1ubuntu7.2

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


SQL query:

-- phpMyAdmin SQL Dump -- version 3.3.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost <<<<<<< HEAD -- Generation Time: Jun 17, 2011 at 02:35 AM ======= -- Generation Time: Jun 14, 2011 at 04:34 PM >>>>>>> f9332a8ad0cd4e27505f162718c69fc8ea297aa7 -- Server version: 5.1.54 -- PHP Version: 5.3.5-1ubuntu7.2 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<<<<<<< HEAD
-- Generation Time: Jun 17, 2011 at 02:35 AM
=======
-- Generation ' at line 6
hero member
Activity: 630
Merit: 500
when i import insert_into_database.sql, i received following error during import

Code:
Error

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 97
STR: <<<<<<<
SQL: -- phpMyAdmin SQL Dump
-- version 3.3.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
<<<<<<< HEAD
-- Generation Time: Jun 17, 2011 at 02:35 AM
=======
-- Generation Time: Jun 14, 2011 at 04:34 PM
>>>>>>> f9332a8ad0cd4e27505f162718c69fc8ea297aa7
-- Server version: 5.1.54
-- PHP Version: 5.3.5-1ubuntu7.2

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


SQL query:

-- phpMyAdmin SQL Dump -- version 3.3.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost <<<<<<< HEAD -- Generation Time: Jun 17, 2011 at 02:35 AM ======= -- Generation Time: Jun 14, 2011 at 04:34 PM >>>>>>> f9332a8ad0cd4e27505f162718c69fc8ea297aa7 -- Server version: 5.1.54 -- PHP Version: 5.3.5-1ubuntu7.2 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<<<<<<< HEAD
-- Generation Time: Jun 17, 2011 at 02:35 AM
=======
-- Generation ' at line 6
Try using the new version of Mining Farm #2.  It has a much cleaner SQL dump.
newbie
Activity: 25
Merit: 0
Hi,
we are testing atm.

- I cannot save at the "website preferences" / have it do over mysql
- Workers cant be deleted
- Is the Mysql file realy correct? Never seen something like "<<<<<<< HEAD" same as "=============" in a dump. / Sql cant read the file i have to put anything in the db manually
- The Design is broken on IE
- Pool stats are going from the right to the left?

used the files on first page. Download today.

and is this:
Quote
*Strong encrypted session cookies
*Auth pin needed to change certain aspects of user profile
*Instant pay out
*Stats will calculate when the next block
will be found and graphs the estimated time
*Email Validation
*Percentage Fee option
*HTML is written with Style Sheets in mind
*Out of the box translation support
*Flexible administrator panel
*API support for workers status.
*Native support for TradeHill bitcoin worth, along
with a "Potential Balance" display that displays your account balance with the current worth
*Live WYSIWYG Blog post and Admin page editors

allready implemented? where i can set the fee? (only in the database?)

best regards
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
Hi Xenland,

Your Frontend looks much better than the last one. I picked up a little issue though the "Register" button does not forward to register.php but acts the same as the Login button.

Both tries to login the user.

Sterling work though !
Thanks that's great news to hear!
and about the bug I'll get right on that for the official release
newbie
Activity: 41
Merit: 0
Hi Xenland,

Your Frontend looks much better than the last one. I picked up a little issue though the "Register" button does not forward to register.php but acts the same as the Login button.

Both tries to login the user.

Sterling work though !
member
Activity: 84
Merit: 10
Ah ok is there separate installation instructions for pushpool or is anyone up to the challange of doing a full on install if I give shell access ? If I pay in btc ?

Just tell me what you require for OS an i shall tell you what I require

This crap is just starting to bug me to the pint I rather get some one else to do it

Prefferably the OP I will gladly clear up the rest of the bounty plus A few extra

Download pushpool here http://yyz.us/bitcoin/pushpool-0.4.1.tar.gz

Follow the guide here to setting it up http://forum.bitcoin.org/index.php?topic=10321.0

The prerequisites can be a pain sometimes
full member
Activity: 130
Merit: 100
Ah ok is there separate installation instructions for pushpool or is anyone up to the challange of doing a full on install if I give shell access ? If I pay in btc ?

Just tell me what you require for OS an i shall tell you what I require

This crap is just starting to bug me to the pint I rather get some one else to do it

Prefferably the OP I will gladly clear up the rest of the bounty plus A few extra
full member
Activity: 126
Merit: 100
yes.. you're missing the pushpoold between bitcoind and  the web frontend
Pages:
Jump to: