Pages:
Author

Topic: CGminer - web monitor beta v0.8 - page 5. (Read 34766 times)

legendary
Activity: 1876
Merit: 1000
February 09, 2012, 10:39:02 AM
#49


keep in mine for pool switching, v3 is snafu.   use v4!
hero member
Activity: 628
Merit: 500
February 09, 2012, 10:05:47 AM
#48
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 Wink

IIS ? Just say NO....lol

I had a feeling you were going to say that Smiley. IIS can be odd with stuff like this. Never used WAMPSERVER. is that what your're running?
sr. member
Activity: 462
Merit: 250
I heart thebaron
February 09, 2012, 09:21:11 AM
#47
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 Wink

IIS ? Just say NO....lol
hero member
Activity: 628
Merit: 500
February 08, 2012, 11:25:01 PM
#46
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
legendary
Activity: 1876
Merit: 1000
February 08, 2012, 10:03:09 PM
#45
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 Smiley

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
hero member
Activity: 628
Merit: 500
February 08, 2012, 07:19:02 PM
#44
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 Smiley
legendary
Activity: 1876
Merit: 1000
February 07, 2012, 09:55:55 PM
#43


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:
sr. member
Activity: 462
Merit: 250
I heart thebaron
February 07, 2012, 09:42:32 PM
#42

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 Smiley



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 Wink

thanks again for all your work.
bitlane.
legendary
Activity: 1876
Merit: 1000
February 07, 2012, 09:35:16 PM
#41

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 Smiley

sr. member
Activity: 462
Merit: 250
I heart thebaron
February 07, 2012, 09:29:55 PM
#40
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.
newbie
Activity: 78
Merit: 0
January 31, 2012, 08:00:05 PM
#39
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 Sad

Ill continue withi this sometime in the future.
hero member
Activity: 518
Merit: 500
January 31, 2012, 04:18:16 PM
#38
cgminer 2.2 has a reworked API. Perhaps thats what you are struggling with?
legendary
Activity: 1876
Merit: 1000
January 31, 2012, 03:55:50 PM
#37
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 Tongue (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.
newbie
Activity: 78
Merit: 0
January 31, 2012, 03:31:36 PM
#36
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 Tongue (even if i point it to where the sdk is).
legendary
Activity: 1876
Merit: 1000
January 31, 2012, 02:44:54 PM
#35
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 Tongue)

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
newbie
Activity: 78
Merit: 0
January 31, 2012, 02:39:34 PM
#34
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 Tongue)
legendary
Activity: 1876
Merit: 1000
January 31, 2012, 02:16:57 PM
#33
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 Tongue)

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 Tongue

then it sounds like the firewall issue.  i had to create rules on my 2 win boxes.
newbie
Activity: 78
Merit: 0
January 31, 2012, 02:09:50 PM
#32
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 Tongue)

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 Tongue
legendary
Activity: 1876
Merit: 1000
January 31, 2012, 01:57:11 PM
#31


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 Sad

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
}

newbie
Activity: 78
Merit: 0
January 31, 2012, 01:33:20 PM
#30


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 Sad
Pages:
Jump to: