Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: jjiimm_64 on January 15, 2012, 08:48:53 PM



Title: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on January 15, 2012, 08:48:53 PM
Running 20 rigs now.  page loads in about a second on my network.  ENJOY>

I tried to make each rig section emulate the look and feel of the cgminer app, minus the black backround.  So we are all familiar where the information is.

here is a snapshot of the rendered HTML.
http://cgminerweb.com/example.miner.php.html

it is just 1 php file and some includes, no database needed. just edit the miners.php webmon.php file to have your list of rigs, and bitcoind connect string. If you dont want or have bitcoind, just delete line.  It is handy to have rig names in hosts file so you dont have to look at ip's,

http://cgminerweb.com/downloads/cgminerweb.v0.8.zip

changes v2:
moved temps and fans to the top of metrics
added warn levels and alert levels for temps and hashrate
added pools and hashrate per pool. (assumes failover)
added mhash per rigs and per cards
other things i cant think of.

changes v3:
refined pool code to properly add up hashes when some pools are down
added ability to switch pools for all rigs at once.
added ability to update gpu clocks, memory, vddc, just about anything the API allows.
I only tested the following :
  • change one gpu clock
  • change one gpu mem
  • change all gpu clocks for a rig
  • change all gpu mem for a rig
  • change one gpu intensity
  • switch pools for all rigs


changes v4:
miner switchpools bug fix (sorry)

changes v7:
  • added ability to add pools
  • added new metric 'heatindex'
  • miner tweaks
  • fixed issue when rig as PGA types
  • other un-remembered crap

changes v8:
added missing form post file.
multi form posts one form post.

donate:
14vx4L7RbrYbgqSo3Sw17WWFRdH1mWR4KA



the one page script is getting a little much, will be refactoring this out before adding ability to control miners.
apparently I did not get to the refactoring...  the code is ugly, but it works. it is still all in one file. :(





Title: Re: cgminer web monitor
Post by: Remember remember the 5th of November on January 15, 2012, 09:06:55 PM
And this is what I made to monitor my rigs. It has features not present in cgminer.

https://i.imgur.com/JOB4s.jpg

Like fan failure, shutdowns the computer if the miner is not working(currently cgminer) and the temp is rising above a certain threshold.
If and when the cgminer API is extended further, I will first reduce intensity which helps bring down GPU usage thus temps and only then stop miner thread if needed.


Title: Re: cgminer web monitor
Post by: P4man on January 15, 2012, 09:12:11 PM

Here is a php page I have developed to monitor all of my rigs (16+).  I am putting this out here this early in dev cycle to gage interest.

I tried to make each rig section emulate the look and feel of the cgminer app, minus the black backround.  So we are all familiar where the information is.

This is just a beta.  just getting started. I will be adding ability to change clocks and fans as soon as the app is ready for it.

here is a HTML  snapshot of my rigs.
http://cgminerweb.com/example.miner.php.html

it is just 2 php files, no database needed. just edit the miners.php file to have your list of rigs.  It is handy to have rig names in hosts file so you dont have to look at ip's,

http://cgminerweb.com/downloads/miners.zip


Very interesting. Your page has all the details, anubis has the eye candy and db backend. You guy should work together. In case you missed it:
https://bitcointalk.org/index.php?topic=57342.new


Title: Re: cgminer web monitor
Post by: jjiimm_64 on January 15, 2012, 09:13:47 PM

No, i did not miss it.  eye candy is just that.....  eye candy.  im going for functionality and speed.


Title: Re: cgminer web monitor
Post by: ocminer on January 16, 2012, 07:42:57 PM
people dont buy iphones for functionality and speed ;-)

its good to have different web monitors, everyone can decide which one they use.

what i would miss here is a "one look - and you see where trouble is", i did that with red colours in anubis for fields which are outside range.


Title: Re: cgminer web monitor
Post by: DeathAndTaxes on January 16, 2012, 07:48:23 PM
people dont buy iphones for functionality and speed ;-)

its good to have different web monitors, everyone can decide which one they use.

what i would miss here is a "one look - and you see where trouble is", i did that with red colours in anubis for fields which are outside range.

Exactly.

There is worthless eye candy (which is still "cool") and then there is use of color to break up text and highlight most important data points such as:
* GPU temp over set amount
* GPU hashrate below set amount
* GPU SICK/DEAD
* Pool stale rate above set %
* Pool down
etc


Title: Re: cgminer web monitor
Post by: jjiimm_64 on January 16, 2012, 08:37:33 PM

Guys, I am in the process of adding those colors..  I just wanted to get the first revision out there to gage interest.  Also to see if anyone commented/appreciated having the webmonitor look just like the cgminer itself.

do you think I should have the black background and white text like the app for each rig ?



Title: Re: cgminer web monitor
Post by: P4man on January 16, 2012, 09:28:46 PM
Not sure if copying cgminer's layout is particularly useful. When monitoring multiple rigs it becomes confusing and difficult to parse.

Id rather see one big table with all GPU's and their most important stats (status, hashrate, temps, fan %, clock, pool stats,..)
and yeah, color coding is almost a must. The good thing about anubis is that in one second I can see if there is a problem or not. What I dont like about it is having to drill down to get "details", although I dont consider card temps a detail, and having an average for an entire rig is rather useless if one GPU is overheating, it will barely show.

At some point graphs would be nice too (like hashrate, temperature and fans over time).

tossing more random idea's; dont even know if its possible, but having a link to open an ssh session to the rig would be cool. Better yet, an integrated ssh client in the browser. Hey, I can dream, cant I? actually, thinking it over, what do I need ssh for; its mostly to control cgminer settings, once cgminer offers an interface for that, that would almost be enough. A restart cgminer and reboot button would be very useful though, and should be doable over ssh.

More stuff.. to make this a "one click, see all" page; pool stats (latest blocks found, my hashrate over the last shifts etc) and bitcoin exchange rate. Would be nice to be able to see everything in one click in the morning.

While Im spouting idea's.. make a page that works on mobile phones.


Title: Re: cgminer web monitor
Post by: jjiimm_64 on January 17, 2012, 04:25:41 AM
P4,
  Thank you for the feedback.  I am/will be modifying the page to be more user friendly.  just did get it working the other day.

Jim


Title: Re: cgminer web monitor
Post by: bitlane on January 19, 2012, 07:32:36 PM
Hey Jim, first off, I love the demo link you posted. This looks great so far.

I decided to give it a shot and unfortunately all I have to use currently on my home network is a Win 2k8 x86 web server running IIS7.
I have PHP installed already (for previous work I needed), but it seems that I must be missing something, as I can not get it working.
It simply dies when trying to connect/create the socket connection and displays an error in the 'include' file.

Any tips or anything I should be looking for specifically ?

Thanks in advance.


Title: Re: cgminer web monitor
Post by: jjiimm_64 on January 19, 2012, 08:02:26 PM


define "displays an error in the 'include' file." 

Can you provide some more details about the specifics of the error.  You should be able to get it running on that box.


Title: Re: cgminer web monitor
Post by: bitlane on January 19, 2012, 09:48:34 PM


define "displays an error in the 'include' file." 

Can you provide some more details about the specifics of the error.  You should be able to get it running on that box.

http://members.shaw.ca/bitlane/minermon.jpg


Title: Re: cgminer web monitor
Post by: jjiimm_64 on January 19, 2012, 10:11:03 PM
define "displays an error in the 'include' file." 
Can you provide some more details about the specifics of the error.  You should be able to get it running on that box.
http://members.shaw.ca/bitlane/minermon.jpg

jftr, the reason I show the last 2 transactions is to show if I found a block when going solo.  I will have other info in this area soon.

It looks like sockets are not turned on in your php.ini file.  google the create_socket php and it will be readily avail what to do.





Title: Re: cgminer web monitor
Post by: bitlane on January 19, 2012, 10:42:31 PM
php-sockets was the problem.... it was commented out in the php.ini file.

Everything works great now.

Thanks for your help


Title: Re: cgminer web monitor
Post by: Proofer on January 21, 2012, 05:56:50 AM
...
do you think I should have the black background and white text like the app for each rig ?

It is not the app (cgminer) which has those colors; it is the OS's application which is displaying the terminal/console.  White on black is the traditional default from days of yore "glass teletypes", but in most (all?) modern GUI OSs the user can change the text and background colors as desired.


Title: Re: cgminer web monitor
Post by: DeathAndTaxes on January 21, 2012, 06:19:55 PM
I don't know how useful it would be for other people but I would like an GPU level interface.

something like:
Code:
(host) (GPU #) (other stats)

Example:
Code:
192.168.0.181   GPU 0 2068RPM	53% |	369.1/368.9Mh/s |	900Mhz	1.088V	 A:22805	 R:190	 HW:0	 U:2.01/m	 I: 7
192.168.0.181   GPU 1 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.181   GPU 2 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.182   GPU 0 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.182   GPU 1 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.182   GPU 2 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7

Host level stats could then be on a different page.  This would allow an easy view of all the GPU across all the rigs in one unified table.

Likely this is more useful for people with 3+ rigs and 10+ GPU.


Title: Re: cgminer web monitor
Post by: jjiimm_64 on January 21, 2012, 06:27:21 PM
I don't know how useful it would be for other people but I would like an GPU level interface.

something like:
Code:
(host) (GPU #) (other stats)

Example:
Code:
192.168.0.181   GPU 0 2068RPM	53% |	369.1/368.9Mh/s |	900Mhz	1.088V	 A:22805	 R:190	 HW:0	 U:2.01/m	 I: 7
192.168.0.181   GPU 1 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.181   GPU 2 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.182   GPU 0 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.182   GPU 1 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7
192.168.0.182   GPU 2 2068RPM 53% | 369.1/368.9Mh/s | 900Mhz 1.088V A:22805 R:190 HW:0 U:2.01/m I: 7

Host level stats could then be on a different page.  This would allow an easy view of all the GPU across all the rigs in one unified table.

Likely this is more useful for people with 3+ rigs and 10+ GPU.

DAT: 
 Yes, i thought of this. and during the refactoring, I think I will add some navigation that will allow a page such as you suggest.


Title: Re: cgminer web monitor beta v0.2
Post by: DeathAndTaxes on January 21, 2012, 06:39:31 PM
Awesome.  Great work BTW.  When I proposed the RPC project and bounty this was exactly the kind of projects I had in mind.  With display decoupled from the mining engine there can be multiple independent projects.


Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on January 22, 2012, 09:52:24 AM
I love this, although the formatting left something to be desired. I added a few tags, changed a couple things and removed the bottom [echo $htmlStr;] around line 27x so that there was only 1 summary at the top.....I'll keep working on it though.

I decided to take beta1 and add/remove as I required and am almost done, ready to begin adding controls....

http://members.shaw.ca/bitlane/bit/cgminerweb.htm

I also made the top hyperlinks to miners optional, as it's commented out in mine currently (for smaller miners with less than enough machines to fill the page).
The 'dumps' still work on each miner box though.

1 other thing I noticed is that when I added the MEMORY FREQ to mine, was that all my 5000 series cards show up correctly, but all 6000 series cards only show stock memory speeds, even though they are modified by either BIOS or using CGMiner itself. Is this an ATI problem or CGMiner problem ? GUP-Z confirms the correct speeds ( as all running 300 Mhz) but all 6000 series cards show up wrong in CGMiner for some reason.....

thanks again for such a great starting point.


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 22, 2012, 07:08:20 PM
I love this, although the formatting left something to be desired. I added a few tags, changed a couple things and removed the bottom [echo $htmlStr;] around line 27x so that there was only 1 summary at the top.....I'll keep working on it though.

I decided to take beta1 and add/remove as I required and am almost done, ready to begin adding controls....

http://members.shaw.ca/bitlane/bit/cgminerweb.htm

I also made the top hyperlinks to miners optional, as it's commented out in mine currently (for smaller miners with less than enough machines to fill the page).
The 'dumps' still work on each miner box though.

1 other thing I noticed is that when I added the MEMORY FREQ to mine, was that all my 5000 series cards show up correctly, but all 6000 series cards only show stock memory speeds, even though they are modified by either BIOS or using CGMiner itself. Is this an ATI problem or CGMiner problem ? GUP-Z confirms the correct speeds ( as all running 300 Mhz) but all 6000 series cards show up wrong in CGMiner for some reason.....

thanks again for such a great starting point.


I am glad your finding it useful.  I find it extremely useful for my 17 rigs.

I am going to also be adding controls.  enabling and disabling wasn't important to me, so I did not add it YET.  but I will be adding all controls as soon as the app is ready. I am about to refactor the whole page to make it more organized.  it is possible I could just put div containers around the rest of the parts missing it and all you have to do is include a different style sheet?

enjoy.


Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on January 22, 2012, 07:50:49 PM
Style sheet would be cool.
You got my vote ;)

I got lazy and simply used a few common tags, but I planned to re-tag everything when I had time....but it just works well now, so it might be a while before I get off my lazy butt and do anything...LOL

Thanks again for a great app.


Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on January 23, 2012, 07:47:25 PM
I just thought I would check back in and again, say, THANKS FOR SUCH A GREAT STARTING POINT for a project.
I honestly don't know how much time I spent using VNC clients for monitoring before this nice, simple little output came along.

I ended up trimming things a bit to suit what I need to see, threw in a basic 10s page refresh into the mix and regardless of not having controls done for mine yet, I am extremely happy with what it DOES do in the mean time.

Cheers.


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 23, 2012, 08:25:50 PM

bit:  me too.  I was never able to accurately measure my hashrate before this.

still working it out how I want to move forward with the controls:

1.  simple dropdowns and text areas with a page reload
2.  similar to #1, but with a lock/unlock button
3.  ajax type controls with  no refresh needed. 

#3 is interesting because I could almost make it look and act JUST like the gui.  down to the commands like 'G'  for gpu and 'P' for pools when in edit mode and focus is on div, the keypress could be intercepted...  anyway just thinking out loud here.


I will probably go with #1 just to get things started....  the ajax implimentation will take alot of work.

Jim


Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on January 23, 2012, 10:33:03 PM
The best part about this, is with minimal coding experience, most users can custom tailor this to suit his/her needs with little to no effort.

Obviously not everyone needs the same, or wants/expects the same results.....so this is just great.

In all honesty, I am actually second-guessing my need to add controls, because as it is now, I don't have the ability to f$ck anything up on my miners, without actually logging in via VNC, so perhaps the 'hands-off' monitoring-only approach is all I really need.
I like to mess around with overclocks etc, so in it's current running state, it actually keeps me out of trouble and gives me exactly what I need and nothing more ;)

If you would allow it, I would also be more than happy to package-up what I have, so that just in case, anyone who just wants simple monitoring for a couple/few machines that all fit on a single non-scrolling page could get by quite nicely without getting in over their heads.

Let me know what you think and I will zip it up and throw up a download link if you approve.

Cheers,
bitlane.


Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on January 26, 2012, 03:43:28 AM
Hey Jimmy, could you please explain the following value ?

Quote
cgminer version 2.1.2 - Started: 1327356155    Rig: miner1

Cheers,
bitlane.


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 26, 2012, 04:13:24 AM
Hey Jimmy, could you please explain the following value ?

Quote
cgminer version 2.1.2 - Started: 1327356155    Rig: miner1

Cheers,
bitlane.

sure.  it is a unix timestamp of the start time.  I think you will see the same value in the dumps.

this is beta after all.  I took a couple of minutes formatting it, but I kept getting warnings about the local.  just never got back to it.  you can just replace $since with  date("F j, Y, g:i a",$since)


Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on January 26, 2012, 04:35:35 AM
[EDIT]
Got it....nothing else required from me ;)
thanks again.


Title: Re: CGminer - web monitor beta v0.2
Post by: rcocchiararo on January 31, 2012, 06:06:33 PM
hi

i wanted to try this, so i edited the php file as follows:

Code:
<?php
require_once 'includes/apiSocket.php';
//error_reporting(E_ALL);  //this is a dev version
//ini_set('display_errors', '1');  //dev version

//list of miners to monitor
$minerList= array(
"Z",
"LU",
"omega",
"MAMA-PC"
);
//bitcoind connect string, just delete or make empty if you dont want bitcoin info, or server does not have access to a bitcoind
//$btcoindConnStr = 'http://user:pass@bitcoind:8332/';
?>

Those names are in the host file (this is a linux debian machine running one cgminer, apache2 with php5, and a few more things)

I also tried the ips.

And i get this:

Quote
Mhash (5s)/(avg)   Queued   Accepted   Rejected   ST   HW   Utility
0    0   0   0   0   0   0   0
Metric   High   Low   Median   Avg
Temps   0   9999   0   0.00
Fans   0   9999   0   0.00
Mhash Per Rig:   0   9999   0   0.00
Mhash Per Card:   0   9999   0   0.00
Util Per Rig:   0   9999   0   0.00
Util Per Card:   0   9999   0   0.00
mineroffline:Z
mineroffline:LU
mineroffline:omega
mineroffline:MAMA-PC
Pools: (assumes failover)
Z | LU | omega | MAMA-PC |
Mhash (5s)/(avg)   Queued   Accepted   Rejected   ST   HW   Utility
0    0   0   0   0   0   0   0
Metric   High   Low   Median   Avg
Temps   0   9999   0   0.00
Fans   0   9999   0   0.00
Mhash Per Rig:   0   9999   0   0.00
Mhash Per Card:   0   9999   0   0.00
Util Per Rig:   0   9999   0   0.00
Util Per Card:   0   9999   0   0.00
mineroffline:Z
mineroffline:LU
mineroffline:omega
mineroffline:MAMA-PC
Array
(
)
1


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 31, 2012, 06:28:15 PM


make sure your cgminer is set to accept rpc calls from the network:

the following should be part of your conf file for cgminer:

"api-listen" : true,
"api-network" : true,
"api-port" : "4028",


Title: Re: CGminer - web monitor beta v0.2
Post by: rcocchiararo on January 31, 2012, 06:33:20 PM


make sure your cgminer is set to accept rpc calls from the network:

the following should be part of your conf file for cgminer:

"api-listen" : true,
"api-network" : true,
"api-port" : "4028",


for some reason i was never able to save my config, so i ended up always running it with all the commands from commandline, but i do have:

--api-listen --api-network

port is optional, if i dont want to change it, right ?

ps: what is the older cgminer that has the api functions ? (i have the latest one on "Z", but the other pcs might have older ones, and "omega" has 2.0.7, which i believe does not support API functions).

ps2: will try disabling my win7 firewall on "Z" now

is the :

Code:
Array
(
)
1

at the end, ok ?

EDIT: didnt work :(


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 31, 2012, 06:57:11 PM


make sure your cgminer is set to accept rpc calls from the network:

the following should be part of your conf file for cgminer:

"api-listen" : true,
"api-network" : true,
"api-port" : "4028",


for some reason i was never able to save my config, so i ended up always running it with all the commands from commandline, but i do have:

--api-listen --api-network

port is optional, if i dont want to change it, right ?

ps: what is the older cgminer that has the api functions ? (i have the latest one on "Z", but the other pcs might have older ones, and "omega" has 2.0.7, which i believe does not support API functions).

ps2: will try disabling my win7 firewall on "Z" now

is the :

Code:
Array
(
)
1

at the end, ok ?

EDIT: didnt work :(

cgminer version 2.1.2 will support the api.
I have never run cgminer from command arguments. after 2 or 3 arguments, seams crazy. And I only put in what I need, mostly use defaults.  here is a sample from one of my boxes. 

and yes, if your using win7, you have to create a new rule to allow the port call.

Code:
{
"pools" : [
{
"url" : "http://us.eclipsemc.com:8337",
"user" : "jjiimm_64_miner14",
"pass" : "pass"
},
{
"url" : "http://test.ozco.in:8332",
"user" : "jjiimm-64.miner14",
"pass" : "pass"
},
{
"url" : "http://192.168.1.100:8332",
"user" : "user",
"pass" : "pass"
}
],

"intensity" : "7",
"gpu-engine" : "800",
"gpu-memclock" : "300",
"gpu-fan":      "50-85",
"api-listen" : true,
"api-network" : true,
"api-port" : "4028",
"auto-fan" : true
}



Title: Re: CGminer - web monitor beta v0.2
Post by: rcocchiararo on January 31, 2012, 07:09:50 PM
will have a look at that (i do have .bat and .sh scripts, so i double click them, or schedule them to run, its not like i do it by hand :P)

i downloaded what you linked on your first post.

I also tried "anubis", and it worked, but i preffer your simpler approach, with no db involved, but i can't get it to run :P


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 31, 2012, 07:16:57 PM
will have a look at that (i do have .bat and .sh scripts, so i double click them, or schedule them to run, its not like i do it by hand :P)

i downloaded what you linked on your first post.

I also tried "anubis", and it worked, but i preffer your simpler approach, with no db involved, but i can't get it to run :P

then it sounds like the firewall issue.  i had to create rules on my 2 win boxes.


Title: Re: CGminer - web monitor beta v0.2
Post by: rcocchiararo on January 31, 2012, 07:39:34 PM
it wasnt the firewall (when i first ran it with the api enabled it autoamically asked for firewall permission)

after disabling it, nothing changed (and anubis worked fine with it activated).

Any chance i did something wrong with your .php ? (or that the one from the first post is not working :P)


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 31, 2012, 07:44:54 PM
it wasnt the firewall (when i first ran it with the api enabled it autoamically asked for firewall permission)

after disabling it, nothing changed (and anubis worked fine with it activated).

Any chance i did something wrong with your .php ? (or that the one from the first post is not working :P)

I think the php is working because of these lines

mineroffline:Z
mineroffline:LU
mineroffline:omega
mineroffline:MAMA-PC

so the code thinks the miners are offline.......  hmmmm


Title: Re: CGminer - web monitor beta v0.2
Post by: rcocchiararo on January 31, 2012, 08:31:36 PM
what puzzles me is:

Array
(
)
1

that at the end.

If im not mistaken, your code uses the same "stuff" to get this info "anubis" uses, right ?

can't think why it wont work.

ps: i'll go back to struggle with compiling cgminer on debian x86, i cant remember, for the life of me, how i did it the first time, now it always tells me no openCL found :P (even if i point it to where the sdk is).


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on January 31, 2012, 08:55:50 PM
what puzzles me is:

Array
(
)
1

that at the end.

If im not mistaken, your code uses the same "stuff" to get this info "anubis" uses, right ?

can't think why it wont work.

ps: i'll go back to struggle with compiling cgminer on debian x86, i cant remember, for the life of me, how i did it the first time, now it always tells me no openCL found :P (even if i point it to where the sdk is).

At the end of the scripts I just do a print_r of a couple of arrays, the array is empty since it cannot connect to the miners, I can understand it being empty.


Title: Re: CGminer - web monitor beta v0.2
Post by: P4man on January 31, 2012, 09:18:16 PM
cgminer 2.2 has a reworked API. Perhaps thats what you are struggling with?


Title: Re: CGminer - web monitor beta v0.2
Post by: rcocchiararo on February 01, 2012, 01:00:05 AM
i see.

well, i failed to make it work.

My compilation of cgminer (whatever version) was failing because, somehow, my symlink to the SDK was broken.

I compiled 2.1.1, 2.1.2 and 2.2.1.

Still, anubis works, and this (which i like more) does not :(

Ill continue withi this sometime in the future.


Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on February 08, 2012, 02:29:55 AM
Well, I think I just stumbled on WHY a Database might be useful for maintaining near realtime (under 3 secs?) stats.....

I have been playing around with Javascript/Ajax updating of the stats, rather than my simple meta-refresh and my experience is, excessive RPC polling seems to have a negative effect on the Host Miner's overall performance....by as much as 5+% and creates a shit ton of undesirable network overhead in the process.

Now, keep in mind.... I'm a pretty shitty coder (a copy/paste guru at best) so unless you have stumbled onto something that is seemingly over my head, my current 10sec meta-refresh is going to be IT for my application, as it seems to play nice and have next to NO effect (negative) on anything else on the network.

jim, care to comment ? maybe a quick shove in the right direction if I am completely off the mark ?

Thanks,
bitlane.


Title: Re: CGminer - web monitor beta v0.2
Post by: jjiimm_64 on February 08, 2012, 02:35:16 AM

sure, I will comment...  we dont really need data faster then 10 seconds....do we?

On another note, I am about to upload beta 0.3.  it is still one big ugly script.  but you can switch all rigs pools with a click and update any rig to do anything :)



Title: Re: CGminer - web monitor beta v0.2
Post by: bitlane on February 08, 2012, 02:42:32 AM

sure, I will comment...  we dont really need data faster then 10 seconds....do we?

On another note, I am about to upload beta 0.3.  it is still one big ugly script.  but you can switch all rigs pools with a click and update any rig to do anything :)



My apologies completely...LOL

I completely misunderstood you when you said you were going to implement Ajax for Stats/Controls etc.

I had assumed that you WANTED near-realtime stats. I am EXTREMELY happy with 10 secs (and the script). I just wanted to help, so I tried some stuff and reported back.

If 10 secs is the target, consider this script 'The Cadillac' of no-back-end Monitors ;)

thanks again for all your work.
bitlane.


Title: Re: CGminer - web monitor beta v0.3
Post by: jjiimm_64 on February 08, 2012, 02:55:55 AM


to be fair, I do want an ajax type of implimentation..  just haven't had the time or the inclination to design it properly..  I have been using the script extensively and it seams to work well as is..  at least the version I have been using (v3beta)

enjoy:


Title: Re: CGminer - web monitor beta v0.3 [switch pools all rigs]
Post by: hmblm1245 on February 09, 2012, 12:19:02 AM
Hello all, i am a total noob to php but i do have a basic understanding of it. I have setup the required components and have gotten the same that rcocchiararo is getting when attempting to view my miner. I started with just one miner and its reporting below.


Mhash (5s)/(avg)   Queued   Accepted   Rejected   ST   HW   Utility
0    0   0   0   0   0   0   0
Metric   High   Low   Median   Avg
Temps   0   9999   0   0.00
Fans   0   9999   0   0.00
Mhash Per Rig:   0   9999   0   0.00
Mhash Per Card:   0   9999   0   0.00
Util Per Rig:   0   9999   0   0.00
Util Per Card:   0   9999   0   0.00
mineroffline:NAMEOFMYPCnumber of gpu0


I have disabled the firewall on both the box and the iis server just for testing. I also added the following to my conf file.

"api-listen" : true,
"api-network" : true,
"api-port" : "4028",


the only change i made to the PHP file is remove the btcoindConnStr line and add my miner in minerList.

Is there anything that i can try?

The app looks awesome just need to get it running :)


Title: Re: CGminer - web monitor beta v0.3 [switch pools all rigs]
Post by: jjiimm_64 on February 09, 2012, 03:03:09 AM
Hello all, i am a total noob to php but i do have a basic understanding of it. I have setup the required components and have gotten the same that rcocchiararo is getting when attempting to view my miner. I started with just one miner and its reporting below.


Mhash (5s)/(avg)   Queued   Accepted   Rejected   ST   HW   Utility
0    0   0   0   0   0   0   0
Metric   High   Low   Median   Avg
Temps   0   9999   0   0.00
Fans   0   9999   0   0.00
Mhash Per Rig:   0   9999   0   0.00
Mhash Per Card:   0   9999   0   0.00
Util Per Rig:   0   9999   0   0.00
Util Per Card:   0   9999   0   0.00
mineroffline:NAMEOFMYPCnumber of gpu0


I have disabled the firewall on both the box and the iis server just for testing. I also added the following to my conf file.

"api-listen" : true,
"api-network" : true,
"api-port" : "4028",


the only change i made to the PHP file is remove the btcoindConnStr line and add my miner in minerList.

Is there anything that i can try?

The app looks awesome just need to get it running :)

You can add these 2 lines to help debug sit.

error_reporting(E_ALL);  //this is a dev version
ini_set('display_errors', '1');  //dev version

put that as the first 2 lines of code after <?php


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: hmblm1245 on February 09, 2012, 04:25:01 AM
I have been attempting to figure this out but am having a bit of trouble. here is the output. from what i can tell with little understanding of php is that its not getting a connection to the box. i checked the pc to be sure the when cgminer starts the its says api is listening. Before i dig deep into learning php i am hoping its something stupid that i did or missed.

Warning: socket_connect(): unable to connect [10013]: An attempt was made to access a socket in a way forbidden by its access permissions. in C:\Inetpub\includes\apiSocket.php on line 127 Warning: socket_send(): unable to write to socket [10057]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Inetpub\includes\apiSocket.php on line 130 Warning: socket_read(): unable to read from socket [10022]: An invalid argument was supplied. in C:\Inetpub\includes\apiSocket.php on line 131 Warning: socket_connect(): unable to connect [10013]: An attempt was made to access a socket in a way forbidden by its access permissions. in C:\Inetpub\includes\apiSocket.php on line 127 Warning: socket_send(): unable to write to socket [10057]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Inetpub\includes\apiSocket.php on line 130 Warning: socket_read(): unable to read from socket [10022]: An invalid argument was supplied. in C:\Inetpub\includes\apiSocket.php on line 131 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: bitlane on February 09, 2012, 02:21:11 PM
I have been attempting to figure this out but am having a bit of trouble. here is the output. from what i can tell with little understanding of php is that its not getting a connection to the box. i checked the pc to be sure the when cgminer starts the its says api is listening. Before i dig deep into learning php i am hoping its something stupid that i did or missed.

Make it easy on yourself and install something line WAMPSERVER on your Win32/64 box on port 8888 or something like that, enable PHP Sockets in the PHP.ini file, throw your files in it's Apache Root, call it up and call it a day......IT WILL WORK ;)

IIS ? Just say NO....lol


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: hmblm1245 on February 09, 2012, 03:05:47 PM
I have been attempting to figure this out but am having a bit of trouble. here is the output. from what i can tell with little understanding of php is that its not getting a connection to the box. i checked the pc to be sure the when cgminer starts the its says api is listening. Before i dig deep into learning php i am hoping its something stupid that i did or missed.

Make it easy on yourself and install something line WAMPSERVER on your Win32/64 box on port 8888 or something like that, enable PHP Sockets in the PHP.ini file, throw your files in it's Apache Root, call it up and call it a day......IT WILL WORK ;)

IIS ? Just say NO....lol

I had a feeling you were going to say that :). IIS can be odd with stuff like this. Never used WAMPSERVER. is that what your're running?


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: jjiimm_64 on February 09, 2012, 03:39:02 PM


keep in mine for pool switching, v3 is snafu.   use v4!


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: bitlane on February 09, 2012, 04:11:09 PM


keep in mine for pool switching, v3 is snafu.   use v4!
It's working flawlessly for me.....pool switching anyways.
What was the problem you saw with v3 ?

The only thing I have never got to work (regardless of app/front end...even local script/config file) was Voltage control (all Win64 Miners etc).


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: bitlane on February 09, 2012, 04:14:23 PM
I had a feeling you were going to say that :). IIS can be odd with stuff like this. Never used WAMPSERVER. is that what your're running?
I am running exactly that, after fighting with IIS/PHP on Server 2008.......
Same box now runs IIS on the usual ports and my WAMPSERVER simultaneously on port 8888, that I use for this purpose.
Everything gets along fine.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: hmblm1245 on February 09, 2012, 05:21:42 PM
I had a feeling you were going to say that :). IIS can be odd with stuff like this. Never used WAMPSERVER. is that what your're running?
I am running exactly that, after fighting with IIS/PHP on Server 2008.......
Same box now runs IIS on the usual ports and my WAMPSERVER simultaneously on port 8888, that I use for this purpose.
Everything gets along fine.

Just got it running. i was making the task "enable sockets" so much more complicated then it needed to be especially since its a check mark. man i feel stupid but i dont care its working great.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: Aion2n on February 11, 2012, 04:49:41 PM
Not work for me:
Quote
Fatal error: Call to undefined function socket_create() in C:\Program Files (x86)\VertrigoServ\www\includes\apiSocket.php on line 125

apiSocket.php line 125
Quote
$socket  = socket_create(AF_INET, SOCK_RAW, 1);


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: jjiimm_64 on February 11, 2012, 04:56:10 PM
Not work for me:
Quote
Fatal error: Call to undefined function socket_create() in C:\Program Files (x86)\VertrigoServ\www\includes\apiSocket.php on line 125

apiSocket.php line 125
Quote
$socket  = socket_create(AF_INET, SOCK_RAW, 1);

sounds like you need to enable sockets in your php.ini file. and restart.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: hmblm1245 on February 11, 2012, 05:34:05 PM
Not work for me:
Quote
Fatal error: Call to undefined function socket_create() in C:\Program Files (x86)\VertrigoServ\www\includes\apiSocket.php on line 125

apiSocket.php line 125
Quote
$socket  = socket_create(AF_INET, SOCK_RAW, 1);

sounds like you need to enable sockets in your php.ini file. and restart.
Agreed. I got the same. enabled sockets worked fine.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: JWU42 on February 12, 2012, 02:44:03 AM
Just a heads up - this is a PITA in linux as it requires raw sockets.

I have tried ...

Code:
sudo /sbin/setcap cap_net_raw+eip /usr/sbin/lighttpd

...with no luck.  >:(

Anyone else have a suggestion short of wampserver  ::)


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: bitlane on February 12, 2012, 04:56:53 PM
Just a heads up - this is a PITA in linux as it requires raw sockets.

I have tried ...

Code:
sudo /sbin/setcap cap_net_raw+eip /usr/sbin/lighttpd

...with no luck.  >:(

Anyone else have a suggestion short of wampserver  ::)

HOLLY CRAP !

Something EASIER to get working in Windows that is PHP ?

This is one for the record books...LOL

I don't have any advice though, as I am a Linux moron.....or, maybe just a moron in general, but mine still works great (cgminer web app that is).


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: Aion2n on February 14, 2012, 12:14:27 AM
cgminer use
Quote
--api-allow --api-listen --api-network
Php info
Quote
Sockets Support enabled

CGminer - web monitor beta v0.4
Quote
Warning: socket_connect() [function.socket-connect]: unable to connect
  • : in C:\Program Files (x86)\VertrigoServ\www\cgminer\includes\apiSocket.php on line 127

Warning: socket_send() [function.socket-send]: unable to write to socket
  • : (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Program Files (x86)\VertrigoServ\www\cgminer\includes\apiSocket.php on line 130

Warning: socket_read() [function.socket-read]: unable to read from socket
  • : in C:\Program Files (x86)\VertrigoServ\www\cgminer\includes\apiSocket.php on line 131

Warning: socket_connect() [function.socket-connect]: Host lookup failed
  • : in C:\Program Files (x86)\VertrigoServ\www\cgminer\includes\apiSocket.php on line 127

Warning: socket_send() [function.socket-send]: unable to write to socket
  • : (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Program Files (x86)\VertrigoServ\www\cgminer\includes\apiSocket.php on line 130

Warning: socket_read() [function.socket-read]: unable to read from socket
  • : in C:\Program Files (x86)\VertrigoServ\www\cgminer\includes\apiSocket.php on line 131
Firewall disabled.

What am I doing wrong?


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: A1BITCOINPOOL on February 14, 2012, 02:36:46 PM
How can a noob set this up in windows.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: heinz on February 14, 2012, 04:02:21 PM
How can a noob set this up in windows.

Shouldn't you be concentrating on getting your pool back up?


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: A1BITCOINPOOL on February 14, 2012, 04:05:40 PM
I have someone working on it.  Who ever got in,  made a real mess of things. 


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: heinz on February 14, 2012, 04:07:25 PM
Easiest setup is Wamp that I have found.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: A1BITCOINPOOL on February 14, 2012, 04:10:19 PM
What is wamp.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: heinz on February 14, 2012, 04:22:52 PM
WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: jjiimm_64 on February 14, 2012, 04:32:13 PM

you dont need mysql..  just install apache and php, should work pretty easy..


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: bitlane on February 21, 2012, 08:58:56 PM
Hey Jim, just a quick question if I could.....

I am still using the 'account' field for the 'listtransactions' call as it's common to both SEND & RECEIVE (and obviously makes the array possible with ease), but have come across a small limitation...

(connected to my Solo Mining Wallet/Bitcoind)
http://members.shaw.ca/bitlane/tx.jpg

I am able to get the label for incoming transactions but not for outgoing.
In the list above, you can see that the 4 last transactions have labels as they are incoming, the first one does not as it is a SEND.....

Instead of using 'listtransactions' and 'account'....is there another function that is common to both send and receive that would allow me to retrieve a label for both ?

I still have the v0.2 code in place, just added to...so that I could display the last 5 transactions....

Code:

<li><?php echo ("TX: ".$trans[9]['category'] . ":<b> " $trans[9]['amount'] ." BTC</b> | ID: <b>".$trans[9]['account'] ."</b>  | Confirms: <b>".$trans[9]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[8]['category'] . ":<b> " $trans[8]['amount'] ." BTC</b> | ID: <b>".$trans[8]['account'] ."</b>  | Confirms: <b>".$trans[8]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[7]['category'] . ":<b> " $trans[7]['amount'] ." BTC</b> | ID: <b>".$trans[7]['account'] ."</b>  | Confirms: <b>".$trans[7]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[6]['category'] . ":<b> " $trans[6]['amount'] ." BTC</b> | ID: <b>".$trans[6]['account'] ."</b>  | Confirms: <b>".$trans[6]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[6]['category'] . ":<b> " $trans[5]['amount'] ." BTC</b> | ID: <b>".$trans[5]['account'] ."</b>  | Confirms: <b>".$trans[5]['confirmations'] )?></b>


thanks again for a kick ass script.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: jjiimm_64 on February 21, 2012, 09:38:43 PM
Hey Jim, just a quick question if I could.....

I am still using the 'account' field for the 'listtransactions' call as it's common to both SEND & RECEIVE (and obviously makes the array possible with ease), but have come across a small limitation...

(connected to my Solo Mining Wallet/Bitcoind)
http://members.shaw.ca/bitlane/tx.jpg

I am able to get the label for incoming transactions but not for outgoing.
In the list above, you can see that the 4 last transactions have labels as they are incoming, the first one does not as it is a SEND.....

Instead of using 'listtransactions' and 'account'....is there another function that is common to both send and receive that would allow me to retrieve a label for both ?

I still have the v0.2 code in place, just added to...so that I could display the last 5 transactions....

Code:

<li><?php echo ("TX: ".$trans[9]['category'] . ":<b> " $trans[9]['amount'] ." BTC</b> | ID: <b>".$trans[9]['account'] ."</b>  | Confirms: <b>".$trans[9]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[8]['category'] . ":<b> " $trans[8]['amount'] ." BTC</b> | ID: <b>".$trans[8]['account'] ."</b>  | Confirms: <b>".$trans[8]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[7]['category'] . ":<b> " $trans[7]['amount'] ." BTC</b> | ID: <b>".$trans[7]['account'] ."</b>  | Confirms: <b>".$trans[7]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[6]['category'] . ":<b> " $trans[6]['amount'] ." BTC</b> | ID: <b>".$trans[6]['account'] ."</b>  | Confirms: <b>".$trans[6]['confirmations'] )?></b>
<li><?php echo ("TX: ".$trans[6]['category'] . ":<b> " $trans[5]['amount'] ." BTC</b> | ID: <b>".$trans[5]['account'] ."</b>  | Confirms: <b>".$trans[5]['confirmations'] )?></b>


thanks again for a kick ass script.

I think the short answer is no.  not all sends have a label, i think most dont, you just send to an address. You could print the first bits :)
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list



Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: chungenhung on February 23, 2012, 04:08:19 AM
i am getting "Fatal error: Call to undefined function socket_create() in C:\wamp\www\includes\apiSocket.php on line 125"


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: hmblm1245 on February 23, 2012, 04:12:42 AM
i am getting "Fatal error: Call to undefined function socket_create() in C:\wamp\www\includes\apiSocket.php on line 125"

looks like sockets are not enabled. same problem i had above.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: chungenhung on February 23, 2012, 04:20:43 AM
Code:
$minerList= array(
"miner1",
"miner2",
"miner3",
"miner4",
"miner5",
"miner6",
"miner7",
"miner8",
"miner9",
"miner10",
"miner11",
"miner12",
//"minerwb", diablo
"miner14",
"miner15",
"miner16",
//"miner17"  diablo
);
I believe this is where I would be defining the IP address, and hostname of miners.
I tried
Code:
"192.168.1.103", miner3
And it failed.
How to do this exactly?


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: jjiimm_64 on February 23, 2012, 04:35:21 AM
Code:
$minerList= array(
"miner1",
"miner2",
"miner3",
"miner4",
"miner5",
"miner6",
"miner7",
"miner8",
"miner9",
"miner10",
"miner11",
"miner12",
//"minerwb", diablo
"miner14",
"miner15",
"miner16",
//"miner17"  diablo
);
I believe this is where I would be defining the IP address, and hostname of miners.
I tried
Code:
"192.168.1.103", miner3
And it failed.
How to do this exactly?


I did not add the ability to give the ip address names, you must do that in your hosts file.


hosts file entry:  windows file: C:\Windows\System32\drivers\etc\hosts
Code:
192.168.1.103	miner1
192.168.1.106 miner2

php code:
Code:
//list of miners to monitor
$minerList= array(
"miner1",
"miner2"
);


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: chungenhung on February 23, 2012, 04:40:34 AM
could I simply use IP address directly and not mess with the windows host file?
Code:
$minerList= array(
"192.168.1.103",
"192.168.1.104",

I am getting "miner offline".
On my miner 192.168.1.103, the cgminer config file contains
Code:
"api-allow" : "192.168.1.101"

The machine that runs the miners.php is 192.168.1.101


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on February 23, 2012, 04:48:10 AM
yes you should be able to just put in the ip.

this should be in your cgminer conf file:

"api-listen" : true,
"api-network" : true,
"api-port" : "4028",




Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: chungenhung on February 23, 2012, 05:13:54 AM
cgminer config file
Code:

"api-listen" : true,
"api-network" : true,
"api-port" : "4028",

Do I need the "api-allow" : "192.168.1.101" ?
I tried both, and miners.php still says it is off line.

Also I am getting these errors on miners.php
"Warning: socket_read() [function.socket-read]: unable to read from socket
  • : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\includes\apiSocket.php on line 131"
"Notice: Undefined offset: -1 in C:\wamp\www\miners.php on line 484"
"Notice: Undefined offset: 0 in C:\wamp\www\miners.php on line 485"
"Warning: Division by zero in C:\wamp\www\miners.php on line 497"
and a bunch of other errors



Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: chungenhung on February 23, 2012, 05:37:49 AM
downloaded v0.5, still not working.


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: hmblm1245 on February 23, 2012, 03:01:17 PM
What changes does v0.5 have?


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on February 23, 2012, 03:16:30 PM
What changes does v0.5 have?

sorry i did not list them.  some miner tweaks, I think I added 'activity' to each gpu and enhanced the execSum at the top.



Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: ThiagoCMC on March 03, 2012, 08:36:14 AM
downloaded v0.5, still not working.

Same problem here... Anubis is working, --api-allow enable too... cgminerweb shows miners offline... :(


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: bitlane on March 04, 2012, 01:50:45 AM
Hey Jim.....(sorry in advance....LOL)

Is there any way that the 'DUMP' could be made to open in an address-bar-less small Pop-Up window rather than the in-page Toggle ?
(I don't know how to code it....sorry)

I have moved onto V0.5 Beta and an using a 30sec Page Reload (not Refresh) which makes the Dump difficult to read if not a speed reader...lol

Is this possible ?

For now, I have removed the hyper-link for the Dump and here is where I am at with styling for the version that I am using:

Title - CGMiner Web Monitor - Beta v0.5 Custom

http://members.shaw.ca/bitlane/cg/cgmwm5c.jpg

- Entire layout/script center of page.
- Github style buttons.
- Misc CSS/layout/formatting.
- Misc re-naming/tagging.
- 30sec Javascript Page ReLoad
- Misc stuff ?
- Removed editable regions from main file into includes/user.php for all miner/bitcoin/time zone info to be updated.
- Moved all STYLE into a master css file. Main 'index/miners.php' contains NO editable regions for everyday use.


Lastly, could you please get a Copyright header/file ready, so that I can paste it into all your files please ?
(I am not going to add my own info anywhere, I simply want to ensure that all credit goes to you for this kickass script)

example...
Code:
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
// Bitcoin donation address - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Thanks again for all your previous (and hopefully future...lol) HELP ;)
bitlane.


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: bitlane on March 04, 2012, 06:57:54 PM

14vx4L7RbrYbgqSo3Sw17WWFRdH1mWR4KA


Lastly, while I am waiting for help......

If anyone would like a copy of the custom version of Jim's script that I am running in the pic above, I am willing to send it but I would like to see Jim get some donations first.
I want nothing.
I have quoted his Bitcoin address from his sig above and feel free to double check it against his actual sig for yourself.

Obviously he has spent alot of time on this and as far as I know, has received nothing.
This has been a huge learning experience for me, as Jim's coding style and layout are easy to follow and learn from.....I thank him for that.

If you are interested, post TX proof and your email address and I will forward a ZIP file.

**WORKS BEST (what I have done to it) in either CHROME (I use Chrome) or FIREFOX. IE sucks and misses most of the formatting tags.


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on March 04, 2012, 07:12:25 PM

sorry for the delay..  been out of commission..  (flu)

to comment on the dump of each miner..  I usually use the dump to help me program the page, and to see data that I may not have displayed.  I have not had to look at the dump in weeks, so I think we are displaying everything we need. so I suggest just removing the dump totally.

I have not had any time to spend on the script lately.  I did add better error handling for when bitcoind is not avail. (page will still load)  will release this latest version soon.


For me to add any new features  i need to totally refactor the script. 





Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: bitlane on March 04, 2012, 07:39:44 PM
I love this script and how easy you have made it to customize it in the process.

I honestly can't think of another feature I would want........

As gay as inline-frames are, I am running mine setup with a 'top' master navigation frame that displays either my stripped down 'user mode' with a faster page update and no GPU controls, for monitoring only (and pool switching), then an 'Admin' mode that has GPU controls, the Dump and no automatic page update.

I also forgot to mention, I changed the TEMP display warnings.
70-73C = BOLD BLACK, 74-77C = BOLD RED, 78C+ = RED BOX BOLD RED.....no lines for me anymore unfortunately....lol

This script has done everything I needed it to...and more.

Thanks again.


http://members.shaw.ca/bitlane/cg/user.jpg  http://members.shaw.ca/bitlane/cg/admin.jpg


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on March 05, 2012, 04:36:26 AM


I like the idea of 'admin mode'  I will try to incorporate this into next big version..

I also have been able to 'reboot rig' with a click too :)


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: hmblm1245 on March 05, 2012, 06:31:48 PM
i like that as well. As long as all my miners can be reached there is little to no delay, but an Admin mode and User mode losing some features can speed that up.


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: rcocchiararo on March 12, 2012, 01:21:19 AM
i still can't make this work :(

anubis works, but this reports all miners as beeing offline :(


downloaded v0.5, still not working.

did you manage to fix it ?

I had that issue (arround page 3) and was never able to fix it.

Today i installed a new linux server (i separated the mining functions, too much trouble for my family there :P), and still nothing.

What puzzles me is that anubis works just fine, and they use the same stuff.

I rather have this tho, which does not need mysql


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on March 12, 2012, 12:55:03 PM
If I am not mistaken, anabis needs apache on every rig, which means the rpc calls are all localhost and not on network. webmonitor needs each rig to allow network api calls.

conf should look like this.:

Code:
"api-listen" : true,
"api-network" : true,
"api-port" : "4028",

Also, i am using linuxcoin and windoz7.  whenever I first start cgminer after a new install, I have to 'allow' the program in windows security


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: rcocchiararo on March 12, 2012, 01:28:21 PM
If I am not mistaken, anabis needs apache on every rig, which means the rpc calls are all localhost and not on network. webmonitor needs each rig to allow network api calls.

conf should look like this.:

Code:
"api-listen" : true,
"api-network" : true,
"api-port" : "4028",

Also, i am using linuxcoin and windoz7.  whenever I first start cgminer after a new install, I have to 'allow' the program in windows security

i can confirm that Anubis needs nothing on the mining rigs :P

(i know this cause i stuck a 5830 on my mother's pc, which runs windows 7 and no web server xD)

I also have that set, so im lost.

My Apache2 + php5 server is running on debian, its just a stock apache2 and php5 install.

Maybe i have something missing ?


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: bitlane on April 19, 2012, 04:05:27 PM
Hey Jim, any further development ?

I am still toying with it and have hit a brick wall in terms of my skill (skill=none...lol) resulting in a possible future feature request ?

Here's where I am at currently.
I am having to use 3 separate forms for Pool Management. NOW, with the inclusion of 'addpool' to the API, I would love to add that feature as well, for 'on the fly' pool additions....unfortunately a 4th messy form will not cut it....LOL

Here's a quick screenshot:

http://members.shaw.ca/bitlane/cg/cgminerweb5c.jpg


What I would LOVE to see more than anything, would be a single 'Pool Management Form'...such as:

http://members.shaw.ca/bitlane/cg/poolmanform.jpg


Unfortunately, I could not code this....LOL

As I said, just an idea if you are still working on it.
As always, LOVe the script, easy to work with and modify.

Cheers,
bitlane.


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on April 19, 2012, 04:51:23 PM
Hey Jim, any further development ?

I am still toying with it and have hit a brick wall in terms of my skill (skill=none...lol) resulting in a possible future feature request ?

Here's where I am at currently.
I am having to use 3 separate forms for Pool Management. NOW, with the inclusion of 'addpool' to the API, I would love to add that feature as well, for 'on the fly' pool additions....unfortunately a 4th messy form will not cut it....LOL

Here's a quick screenshot:

http://members.shaw.ca/bitlane/cg/cgminerweb5c.jpg


What I would LOVE to see more than anything, would be a single 'Pool Management Form'...such as:

http://members.shaw.ca/bitlane/cg/poolmanform.jpg


Unfortunately, I could not code this....LOL

As I said, just an idea if you are still working on it.
As always, LOVe the script, easy to work with and modify.

Cheers,
bitlane.

actually there is a new version out there..  has some new features, such as add pool (untested ) and heatindex.

I did not release publicly yet mainly because the addpool stuff is NOT tested..  you need the a more recent version of cgminer then I am running, which is why I could not test.

add a version number to the old download and see if that works.
JIm


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: bitlane on April 19, 2012, 06:44:16 PM
actually there is a new version out there..  has some new features, such as add pool (untested ) and heatindex.

I did not release publicly yet mainly because the addpool stuff is NOT tested..  you need the a more recent version of cgminer then I am running, which is why I could not test.

add a version number to the old download and see if that works.
JIm
Got it...and it looks good as usual.

What exactly is 'heatindex' ? ....how is it calculated ?
Sorry, I am just not familiar with it, but 1 or 2 of my cards lit up with red boxes because of it...lol


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on April 19, 2012, 07:21:57 PM
actually there is a new version out there..  has some new features, such as add pool (untested ) and heatindex.

I did not release publicly yet mainly because the addpool stuff is NOT tested..  you need the a more recent version of cgminer then I am running, which is why I could not test.

add a version number to the old download and see if that works.
JIm
Got it...and it looks good as usual.

What exactly is 'heatindex' ? ....how is it calculated ?
Sorry, I am just not familiar with it, but 1 or 2 of my cards lit up with red boxes because of it...lol

red might not be bad..  but it is an indicator that it will be close to getting hot...

over 160 is bad

more important, over time if the index starts to rise, you know the room is starting to get warm.


Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: dlasher on April 30, 2012, 03:33:42 PM
downloaded v0.5, still not working.

Same problem here... Anubis is working, --api-allow enable too... cgminerweb shows miners offline... :(

Same here.

Fedora 14 LAMP, all miners reachable, Anubis works from same machine (different directory), cgminerweb shows all hosts offline, whether IP address or hostname are provided.

Seeing lots of complains in the apache error_log:

Quote
[Mon Apr 30 08:30:46 2012] [error] [client XX.XX.XX.XX] PHP Warning:  socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cgweb/includes/apiSocket.php on line 125, referer: http://192.168.1.101/cgweb/miners.php
[Mon Apr 30 08:30:46 2012] [error] [client XX.XX.XX.XX] PHP Warning:  socket_set_option() expects parameter 1 to be resource, boolean given in /var/www/html/cgweb/includes/apiSocket.php on line 126, referer: http://192.168.1.101/cgweb/miners.php

and

Quote
[Mon Apr 30 08:30:46 2012] [error] [client XX.XX.XX.XX] PHP Notice:  Undefined offset: -1 in /var/www/html/cgweb/miners.php on line 586, referer: http://192.168.1.101/cgweb/miners.php
[Mon Apr 30 08:30:46 2012] [error] [client XX.XX.XX.XX] PHP Notice:  Undefined offset: 0 in /var/www/html/cgweb/miners.php on line 587, referer: http://192.168.1.101/cgweb/miners.php

FWIW, PHP believes sockets are enabled

Quote
sockets

Sockets Support   enabled




Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: jjiimm_64 on May 18, 2012, 03:19:56 AM


so much for refactoring...  i did add a 'heatindex'  that I have been using extensively.    It is very helpful to see when 'farm' is starting to warm up.

heat index is basically the card temp plus the fan percentage.  it only works well if you have fan on auto.

160 would mean a card temp of 75 and the fan at 85.   danger.
134 would be card at 73.5, fan at 60%                       comfortably warm
117 would be card at 67, fan at 50%                          green!




Title: Re: CGminer - web monitor beta v0.5 [switch pools all rigs]
Post by: bitlane on May 18, 2012, 12:28:22 PM

so much for refactoring...  i did add a 'heatindex'  that I have been using extensively.    It is very helpful to see when 'farm' is starting to warm up.

heat index is basically the card temp plus the fan percentage.  it only works well if you have fan on auto.

160 would mean a card temp of 75 and the fan at 85.   danger.
134 would be card at 73.5, fan at 60%                       comfortably warm
117 would be card at 67, fan at 50%                          green!


I might check it out and 'borrow' the heat index code from it to add to the version that I am still using....as I have pretty much done the same for the last couple updates....lol (add pools etc...hehe)

Other than that, the only thing I really have left to do is add delete-pool to mine (add-pool works AWESOME !).

Not sure if I mentioned it, but I also added a visible countdown and am using 45 second updates now (still have manual reload button as well).

This app truly is a life saver and I don't know what I would do without it.

thanks again.
bitlane.


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: Aseras on June 20, 2012, 01:39:39 PM
I have been attempting to figure this out but am having a bit of trouble. here is the output. from what i can tell with little understanding of php is that its not getting a connection to the box. i checked the pc to be sure the when cgminer starts the its says api is listening. Before i dig deep into learning php i am hoping its something stupid that i did or missed.

Warning: socket_connect(): unable to connect [10013]: An attempt was made to access a socket in a way forbidden by its access permissions. in C:\Inetpub\includes\apiSocket.php on line 127 Warning: socket_send(): unable to write to socket [10057]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Inetpub\includes\apiSocket.php on line 130 Warning: socket_read(): unable to read from socket [10022]: An invalid argument was supplied. in C:\Inetpub\includes\apiSocket.php on line 131 Warning: socket_connect(): unable to connect [10013]: An attempt was made to access a socket in a way forbidden by its access permissions. in C:\Inetpub\includes\apiSocket.php on line 127 Warning: socket_send(): unable to write to socket [10057]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Inetpub\includes\apiSocket.php on line 130 Warning: socket_read(): unable to read from socket [10022]: An invalid argument was supplied. in C:\Inetpub\includes\apiSocket.php on line 131 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496

windows doesnt do the raw sockets ping.

open apisocket.php and replace the ping function with this

Quote
function ping($ip=NULL) {
 if(empty($ip)) {$ip = $host;}
 if(getenv("OS")=="Windows_NT") {
  $exec = exec("ping -n 1 -l 64 ".$ip);
  return end(explode(" ", $exec ));
 }
 else {
  $exec = exec("ping -c 1 -s 64 -t 64 ".$ip);
  $array = explode("/", end(explode("=", $exec )) );
  return ceil($array[1]) . 'ms';
 }
}

?>

enjoy.


Title: Re: CGminer - web monitor beta v0.7
Post by: TheHarbinger on June 28, 2012, 01:54:09 AM
Code:
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include(includes/form_work.php): failed to open stream: No such file or directory in H:\Applications\wamp\www\cgminerweb.v0.7\webmon.php on line 218
Call Stack
# Time Memory Function Location
1 0.0028 410712 {main}( ) ..\webmon.php:0

( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include(): Failed opening 'includes/form_work.php' for inclusion (include_path='.;C:\php\pear') in H:\Applications\wamp\www\cgminerweb.v0.7\webmon.php on line 218
Call Stack
# Time Memory Function Location
1 0.0028 410712 {main}( ) ..\webmon.php:0

Any ideas?


Title: Re: CGminer - web monitor beta v0.7
Post by: jjiimm_64 on June 28, 2012, 02:27:43 AM
Code:
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include(includes/form_work.php): failed to open stream: No such file or directory in H:\Applications\wamp\www\cgminerweb.v0.7\webmon.php on line 218
Call Stack
# Time Memory Function Location
1 0.0028 410712 {main}( ) ..\webmon.php:0

( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include(): Failed opening 'includes/form_work.php' for inclusion (include_path='.;C:\php\pear') in H:\Applications\wamp\www\cgminerweb.v0.7\webmon.php on line 218
Call Stack
# Time Memory Function Location
1 0.0028 410712 {main}( ) ..\webmon.php:0

Any ideas?

wow, this version has been out there all this time with a missing file?? 

I will package up what I am currently using and make it avail.


Title: Re: CGminer - web monitor beta v0.7
Post by: TheHarbinger on June 28, 2012, 02:42:15 AM
Code:
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include(includes/form_work.php): failed to open stream: No such file or directory in H:\Applications\wamp\www\cgminerweb.v0.7\webmon.php on line 218
Call Stack
# Time Memory Function Location
1 0.0028 410712 {main}( ) ..\webmon.php:0

( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include(): Failed opening 'includes/form_work.php' for inclusion (include_path='.;C:\php\pear') in H:\Applications\wamp\www\cgminerweb.v0.7\webmon.php on line 218
Call Stack
# Time Memory Function Location
1 0.0028 410712 {main}( ) ..\webmon.php:0

Any ideas?

wow, this version has been out there all this time with a missing file?? 

I will package up what I am currently using and make it avail.

Thanks man.  I looked at the line it was referring to, looked like it was trying to call something in bitcoind, so i fired it up and un-commented it in the php file, and still no go.  Couldn't figure out what I was doing wrong.


Title: Re: CGminer - web monitor beta v0.7
Post by: jjiimm_64 on June 28, 2012, 02:50:39 AM

Thanks man.  I looked at the line it was referring to, looked like it was trying to call something in bitcoind, so i fired it up and un-commented it in the php file, and still no go.  Couldn't figure out what I was doing wrong.

Sorry bout that.

put the file in. not sure if I made any other changes. I think support for bfl's were added in 7.

also an interesting feature is ability to change clocks on multiple rigs at one time, you will have to edit the main webmon.php file and find the 'adjustMulti'  follow the examples.


Title: Re: CGminer - web monitor beta v0.8
Post by: TheHarbinger on June 28, 2012, 03:00:01 AM
Yup, that fixed her.

Still need to figure out the Riglist and Gpulist stuff, but that's tomorrow.


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on June 28, 2012, 03:05:38 AM
Yup, that fixed her.

Still need to figure out the Riglist and Gpulist stuff, but that's tomorrow.

basically.

riglist:  machines you want the change to affect
gpulist:  number of gpus on those machines.  (helps if riglist has all same number of gpus)


for instance, my 5970's are all 8gpus,  my 5870 rigs are mostly 5 gpus, but some have 6


Title: Re: CGminer - web monitor beta v0.4 [switch pools all rigs]
Post by: nanook7 on July 05, 2012, 09:45:47 PM
I have been attempting to figure this out but am having a bit of trouble. here is the output. from what i can tell with little understanding of php is that its not getting a connection to the box. i checked the pc to be sure the when cgminer starts the its says api is listening. Before i dig deep into learning php i am hoping its something stupid that i did or missed.

Warning: socket_connect(): unable to connect [10013]: An attempt was made to access a socket in a way forbidden by its access permissions. in C:\Inetpub\includes\apiSocket.php on line 127 Warning: socket_send(): unable to write to socket [10057]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Inetpub\includes\apiSocket.php on line 130 Warning: socket_read(): unable to read from socket [10022]: An invalid argument was supplied. in C:\Inetpub\includes\apiSocket.php on line 131 Warning: socket_connect(): unable to connect [10013]: An attempt was made to access a socket in a way forbidden by its access permissions. in C:\Inetpub\includes\apiSocket.php on line 127 Warning: socket_send(): unable to write to socket [10057]: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. in C:\Inetpub\includes\apiSocket.php on line 130 Warning: socket_read(): unable to read from socket [10022]: An invalid argument was supplied. in C:\Inetpub\includes\apiSocket.php on line 131 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496 Notice: Undefined offset: -1 in C:\Inetpub\miners.php on line 483 Notice: Undefined offset: 0 in C:\Inetpub\miners.php on line 484 Warning: Division by zero in C:\Inetpub\miners.php on line 496

windows doesnt do the raw sockets ping.

open apisocket.php and replace the ping function with this

Quote
function ping($ip=NULL) {
 if(empty($ip)) {$ip = $host;}
 if(getenv("OS")=="Windows_NT") {
  $exec = exec("ping -n 1 -l 64 ".$ip);
  return end(explode(" ", $exec ));
 }
 else {
  $exec = exec("ping -c 1 -s 64 -t 64 ".$ip);
  $array = explode("/", end(explode("=", $exec )) );
  return ceil($array[1]) . 'ms';
 }
}

?>

enjoy.
I am trying to run webmon on an extra Windows server 2003 machine in my network
I tried the suggestion above about changing the ping function but ... I get the following error

Warning: exec() [function.exec]: Unable to fork [ping -n 1 -l 64 miner1] in D:\shares\Users\John\webmon\includes\apiSocket.php on line 125

Anyone have any ideas?

thanks


Title: Re: CGminer - web monitor beta v0.8
Post by: Aseras on July 06, 2012, 04:36:32 PM
Give your web user i_usr whatever permissions to ping.


Title: Re: CGminer - web monitor beta v0.8
Post by: tnkflx on July 06, 2012, 07:42:32 PM
When I run this, I get the following error:

Code:
Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 125
Warning: socket_set_option() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 126
Warning: socket_connect() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 127
Warning: socket_send() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 130
Warning: socket_read() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 131
Warning: socket_close() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 134
Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 125
Warning: socket_set_option() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 126
Warning: socket_connect() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 127
Warning: socket_send() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 130
Warning: socket_read() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 131
Warning: socket_close() expects parameter 1 to be resource, boolean given in /var/www/localhost/htdocs/cgminerweb/includes/apiSocket.php on line 134
Notice: Undefined variable: highTempCard in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 574
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
Notice: Undefined variable: highHeatIndexRig in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 575
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
Notice: Undefined variable: heatIndexAvg in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 575
Notice: Undefined variable: highHeatPerCardIndexRig in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 576
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
Notice: Undefined offset: -1 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 726
Notice: Undefined offset: 0 in /var/www/localhost/htdocs/cgminerweb/webmon.php on line 727
number of gpu0

Any idea what might be wrong? PHP is compiled with sockets enabled...


Title: Re: CGminer - web monitor beta v0.8
Post by: AmDD on October 22, 2012, 08:46:28 PM
So I assume this only works on a local network? Is it possible to send this to an online web host somewhere and access it via the internet?


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on October 22, 2012, 08:53:37 PM
So I assume this only works on a local network? Is it possible to send this to an online web host somewhere and access it via the internet?

It is possible, but not advisable because of security.

You would have to run each cgminer with a specific port, then port forward that port to the rig with your router..   

I am just speculating, i have not actually tried this.



Title: Re: CGminer - web monitor beta v0.8
Post by: AmDD on October 22, 2012, 09:00:17 PM
Well I'll try setting this up as-is first and then play with it. I know a very small amount of PHP but next to nothing as to how the mining software communicates to anything.


Title: Re: CGminer - web monitor beta v0.8
Post by: baggyp on March 11, 2013, 01:03:43 AM
so then this is not something I can control multiple location's rigs with? that is what I am looking for primarily. LTC mining with cgminer.


Title: Re: CGminer - web monitor beta v0.8
Post by: Fallon on March 17, 2013, 03:25:22 PM
I'm getting a similar error as tnkflx running this on my little ReadyNAS (Linux)....

Code:
Warning: socket_create() [function.socket-create]: Unable to create socket [1]: Operation not permitted in /c/webroot/cgminerweb/includes/apiSocket.php on line 125

Warning: socket_set_option() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 126

Warning: socket_connect() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 127

Warning: socket_send() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 130

Warning: socket_read() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 131

Warning: socket_close() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 134

Warning: socket_create() [function.socket-create]: Unable to create socket [1]: Operation not permitted in /c/webroot/cgminerweb/includes/apiSocket.php on line 125


Sockets Support   enabled


Title: Re: CGminer - web monitor beta v0.8
Post by: mackminer on April 22, 2013, 08:14:27 PM
Looks perfect - I don't like fancy graphics with no real use. I will give it a go.

Hope you are still working on it. What web server do you use - I'm going to try nginx.


Title: Re: CGminer - web monitor beta v0.8
Post by: FanDjangoBTC on May 09, 2013, 11:31:12 PM
I'm getting a similar error as tnkflx running this on my little ReadyNAS (Linux)....

Code:
Warning: socket_create() [function.socket-create]: Unable to create socket [1]: Operation not permitted in /c/webroot/cgminerweb/includes/apiSocket.php on line 125

Warning: socket_set_option() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 126

Warning: socket_connect() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 127

Warning: socket_send() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 130

Warning: socket_read() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 131

Warning: socket_close() expects parameter 1 to be resource, boolean given in /c/webroot/cgminerweb/includes/apiSocket.php on line 134

Warning: socket_create() [function.socket-create]: Unable to create socket [1]: Operation not permitted in /c/webroot/cgminerweb/includes/apiSocket.php on line 125


Sockets Support   enabled


For Linux: !! RAW Sockets in ../includes/apiSocket.php ping function (right at the bottom of the file) require either root priviledges OR capability CAP_NET_RAW to be set.

Using Apache2/PHP5, I was not able to do either of these succesfully.

root for Apache2 is a nogo.

setcap CAP_NET_RAW to which binary? I tried everyone I could think of and then gave up.


Actually, there are many example (use Google) for replacing the RAW socket ping with one that doesn't need RAW.

But sadly, after I got this thing running I am getting incomplete data as cgminer 3.1.0 has changed a number of things that are not reflected in the current code of this php.

Will check out some other stuff before I continue on this one.


Title: Re: CGminer - web monitor beta v0.8
Post by: dan7733 on July 12, 2013, 10:00:48 PM
Hi guys!

Just a quick question. How do you set this up? And what do I do with the php file?

Thanks!


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on July 19, 2013, 05:45:21 AM
Hi guys!

Just a quick question. How do you set this up? And what do I do with the php file?

Thanks!

have php installed.. put webmon.php and include folder in path of apache.  edit webmon.php with your list of rigs and run webmon.php in browser.


Title: Re: CGminer - web monitor beta v0.8
Post by: wknight on January 07, 2014, 09:37:00 PM
I guess this died?


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on January 07, 2014, 09:38:26 PM
I guess this died?

Im still using it.. .but had to delete the directory for the download with hacking attempts and such....  .. and with cgminer not supporting gpus anymore...well


Title: Re: CGminer - web monitor beta v0.8
Post by: hmblm1245 on January 07, 2014, 10:36:10 PM
I also have been using it for nearly a year now. Its a great tool to quickly check what systems are up with temps...etc.


Title: Re: CGminer - web monitor beta v0.8
Post by: phreakk on January 18, 2014, 02:10:16 PM
Is this still downloadable anywhere? I would like to test it!


Title: Re: CGminer - web monitor beta v0.8
Post by: bayo on January 20, 2014, 05:51:54 PM
hey Anyone can give a miror for download or maybe other stuff like this ? Thanks !!


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on January 20, 2014, 06:08:53 PM


I will try and get this back up within a day or two..


Title: Re: CGminer - web monitor beta v0.8
Post by: Pustul on January 27, 2014, 12:03:13 AM
Could someone take a screenshot? Thanks :)


Title: Re: CGminer - web monitor beta v0.8
Post by: wknight on January 28, 2014, 04:54:21 PM


I will try and get this back up within a day or two..

Ping me on the IRC.. i can host it on btcmu.info


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on January 28, 2014, 05:34:07 PM


I will try and get this back up within a day or two..

Ping me on the IRC.. i can host it on btcmu.info

I was trying to get time to clean up the code some first.... also the version im using is more up to date....

soo much to do, so little time..  setting up antminers will take priority for the next few days


Title: Re: CGminer - web monitor beta v0.8
Post by: wknight on January 28, 2014, 06:40:03 PM


I will try and get this back up within a day or two..

Ping me on the IRC.. i can host it on btcmu.info

I was trying to get time to clean up the code some first.... also the version im using is more up to date....

soo much to do, so little time..  setting up antminers will take priority for the next few days

What i spent time doing over  the weekend. Sooo many PSU conversions for my Antminers :)


Title: Re: CGminer - web monitor beta v0.8
Post by: compile on February 07, 2014, 06:31:17 AM
Any update?  I'm dying to try it :(


Title: Re: CGminer - web monitor beta v0.8
Post by: joulesbeef on February 11, 2014, 05:21:58 PM
anythbing new on this?


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on February 11, 2014, 05:23:42 PM
anythbing new on this?

All i have is excuses....  I am sorry.. will put something up this weekend.. but only after I set up all the antminers that just came in.


Title: Re: CGminer - web monitor beta v0.8
Post by: wknight on February 20, 2014, 04:34:23 PM
you.. epic.. slack :P


Title: Re: CGminer - web monitor beta v0.8
Post by: jjiimm_64 on February 20, 2014, 04:35:48 PM
you.. epic.. slack :P

I am slacking... and also embarrassed at the code too... really wanted to do a rewrite..

also.. had more ants come in.. so i am a little busy turning elec into btc!


Title: Re: CGminer - web monitor beta v0.8
Post by: compile on June 29, 2014, 03:24:30 PM
So I am assuming this is dead?