Bitcoin Forum
April 26, 2024, 08:31:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 »  All
  Print  
Author Topic: ANUBIS - a CGMINER Web Frontend  (Read 83111 times)
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
March 02, 2012, 09:41:28 PM
 #181

Found extra coins in my account. Thank you whoever Smiley
... and if you need this:
https://bitcointalk.org/index.php?topic=66699.msg775068#msg775068
Feel free to pass some around Smiley

Tell you what, when my BFL's arrive I'll throw something your way. With my current 0.1 BTC/day, I'll take whatever I can get Wink

(What with the extension not being too useful until they DO arrive!) Smiley
Well I did say "IF you need this" Smiley

Plural BFL - that will be a big jump!
(2 would be 10x your current)

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
1714120299
Hero Member
*
Offline Offline

Posts: 1714120299

View Profile Personal Message (Offline)

Ignore
1714120299
Reply with quote  #2

1714120299
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714120299
Hero Member
*
Offline Offline

Posts: 1714120299

View Profile Personal Message (Offline)

Ignore
1714120299
Reply with quote  #2

1714120299
Report to moderator
1714120299
Hero Member
*
Offline Offline

Posts: 1714120299

View Profile Personal Message (Offline)

Ignore
1714120299
Reply with quote  #2

1714120299
Report to moderator
The LT
Full Member
***
Offline Offline

Activity: 186
Merit: 100



View Profile WWW
March 03, 2012, 10:29:15 PM
 #182

Just for everyone's information, if you use syslog-logging in cgminer, it won't provide 5-second data via the API. Should be disabled in cgminer's config. Haven't really looked into it, but seems like cgminer's bug...
Eveofwar
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250


View Profile
March 04, 2012, 10:01:41 PM
 #183

Just clone'd the latest into a folder...somehow I'm missing all the edit buttons and have no way of controlling CGMiner from the page.  Using CGMiner version 2.3.1-2 Windows

Missing in FF, Chrome and IE...any thoughts ?
P_Shep
Legendary
*
Offline Offline

Activity: 1795
Merit: 1198


This is not OK.


View Profile
March 05, 2012, 04:34:44 AM
 #184

need to enable the 'write' privileges to the webhost. See the cgminer documentation.

Code:
--api-allow         Allow API access (if enabled) only to the given list of [W:]IP[/Prefix] address[/subnets]
                    This overrides --api-network and you must specify 127.0.0.1 if it is required
                    W: in front of the IP address gives that address privileged access to all api commands
--api-description   Description placed in the API status header (default: cgminer version)
--api-listen        Listen for API requests (default: disabled)
                    By default any command that does not just display data returns access denied
                    See --api-allow to overcome this
--api-network       Allow API (if enabled) to listen on/for any address (default: only 127.0.0.1)
--api-port          Port number of miner API (default: 4028)
Eveofwar
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250


View Profile
March 05, 2012, 04:36:58 AM
Last edit: March 05, 2012, 04:47:21 AM by Eveofwar
 #185

need to enable the 'write' privileges to the webhost. See the cgminer documentation.

Code:
--api-allow         Allow API access (if enabled) only to the given list of [W:]IP[/Prefix] address[/subnets]
                    This overrides --api-network and you must specify 127.0.0.1 if it is required
                    W: in front of the IP address gives that address privileged access to all api commands
--api-description   Description placed in the API status header (default: cgminer version)
--api-listen        Listen for API requests (default: disabled)
                    By default any command that does not just display data returns access denied
                    See --api-allow to overcome this
--api-network       Allow API (if enabled) to listen on/for any address (default: only 127.0.0.1)
--api-port          Port number of miner API (default: 4028)

Sweet, guess that's something new.  I'll get it going.

EDIT:  Bingo Smiley
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
March 05, 2012, 12:27:09 PM
 #186

...

Sweet, guess that's something new.  I'll get it going.

EDIT:  Bingo Smiley
Actually I added it 2 weeks ago Smiley
So it's been in the releases since 2.3.0 (11 days ago)

In case it wasn't obvious, the idea is that you have to give extra access if you want to allow access to change your cgminer ...
including shut down cgminer, turn off the fans, mine on some other pool with a different username and password, over volt the GPU and destroy it ... things like that

I realised it was a security issue/hole that needed to be closed for anyone using cgminer and a new command defined to allow people to decide to give the extra write/privileged access

So I added the extra --api-allow argument and the W: option

The old options still work ... almost as before ... except you can only successfully access commands that only report cgminer info.
All other cgminer API commands (that change cgminer) return "Access denied to '%s' command" unless the IP address has the extra W: access

Edit: posted in this thread 13 days ago Smiley
https://bitcointalk.org/index.php?topic=57342.msg760859#msg760859

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Eveofwar
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250


View Profile
March 05, 2012, 06:30:48 PM
 #187

...

Sweet, guess that's something new.  I'll get it going.

EDIT:  Bingo Smiley
Actually I added it 2 weeks ago Smiley
So it's been in the releases since 2.3.0 (11 days ago)

In case it wasn't obvious, the idea is that you have to give extra access if you want to allow access to change your cgminer ...
including shut down cgminer, turn off the fans, mine on some other pool with a different username and password, over volt the GPU and destroy it ... things like that

I realised it was a security issue/hole that needed to be closed for anyone using cgminer and a new command defined to allow people to decide to give the extra write/privileged access

So I added the extra --api-allow argument and the W: option

The old options still work ... almost as before ... except you can only successfully access commands that only report cgminer info.
All other cgminer API commands (that change cgminer) return "Access denied to '%s' command" unless the IP address has the extra W: access

Edit: posted in this thread 13 days ago Smiley
https://bitcointalk.org/index.php?topic=57342.msg760859#msg760859

Yar, moved from CGMiner 2.2.7 to 2.3.1-2 without reading too much into the changelog.  I was reading on the CGMiner home thread about --api-allow, but it didn't give any hint towards W: giving write privileges.  I'm completely tracking you with the need for security; great job.
tynt
Member
**
Offline Offline

Activity: 61
Merit: 10



View Profile
March 06, 2012, 01:13:48 PM
 #188

webserver is running on 192.168.0.1
cgminer is running on 192.168.0.2

Code:
cgminer.exe 
--api-listen ^
--api-allow W:192.168.0.1 ^
--api-network

Firewalls are disabled. Workers are not showing up on anubis. What am I missing?

 

5830 mining for life
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
March 06, 2012, 02:34:08 PM
 #189

webserver is running on 192.168.0.1
cgminer is running on 192.168.0.2

Code:
cgminer.exe 
--api-listen ^
--api-allow W:192.168.0.1 ^
--api-network

Firewalls are disabled. Workers are not showing up on anubis. What am I missing?

Just an aside ...

You don't need "--api-network" since it is ignored if you use "--api-allow"

and you can also use W:192.168.0/24 just to check the IP addresses are correct

also note (as the README says) if you also want to talk to cgminer from the cgminer machine you need to add ",W:127.0.0.1"

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
P_Shep
Legendary
*
Offline Offline

Activity: 1795
Merit: 1198


This is not OK.


View Profile
March 06, 2012, 05:22:59 PM
 #190

Are sockets enabled in PHP?
tynt
Member
**
Offline Offline

Activity: 61
Merit: 10



View Profile
March 06, 2012, 06:54:29 PM
 #191

Solved now. I was using PHP 5.1.6, upgraded to 5.3.3, now it works

5830 mining for life
P_Shep
Legendary
*
Offline Offline

Activity: 1795
Merit: 1198


This is not OK.


View Profile
March 06, 2012, 07:06:17 PM
 #192

I think it should work with all of 5, and probably 4.
Probably some configuration issue fixed with the re-install.
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
March 06, 2012, 08:19:33 PM
 #193

Ah well - yeah there is a log for that Smiley

/var/log/apache2/error.log (for debian/ubuntu etc)
 or
/var/log/httpd/error.log (for redhat/fedora etc)
 or
... not sure where else for any others.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
tynt
Member
**
Offline Offline

Activity: 61
Merit: 10



View Profile
March 06, 2012, 10:55:39 PM
 #194

I think it should work with all of 5, and probably 4.
Probably some configuration issue fixed with the re-install.
PHP 5.2.x lacks native support for json_encode() and json_decode() functions. Just needed to upgrade PHP or install PECL extension and PECL JSON package.

5830 mining for life
P_Shep
Legendary
*
Offline Offline

Activity: 1795
Merit: 1198


This is not OK.


View Profile
March 06, 2012, 11:48:01 PM
 #195

I see... interesting.
The LT
Full Member
***
Offline Offline

Activity: 186
Merit: 100



View Profile WWW
March 06, 2012, 11:55:23 PM
 #196

Thanks a lot P_Shep for implementing new functions into Anubis! These are a boon when tuning rigs!  Grin Also, thanks a lot to kano for working on the API in the first place!  Grin
exahash
Sr. Member
****
Offline Offline

Activity: 278
Merit: 250



View Profile
April 06, 2012, 02:02:07 PM
 #197

I just started trying out Anubis; thanks to ocminer and p_shep, its very nice.

One odd thing I noticed... if one (or more) of my rigs is hung or in the process of going down, it takes a really long time (more than a minute) to load the Anubis home/hosts page.  If a rig is down, the page comes up quickly (less than one second) showing 'Connection refused' or 'Operation now in progress'   I have 20 rigs on the local network.  Anubis is served from a non-mining machine.

I tried lowering the timeout in the socket_set_option on line 81 of func.inc.php and that seemed to help a little, but I think whats happening is that cgminer is hanging on exit (when shutting down due to a sick or dead card) and not responding to Anubis.  Anubis then sits waiting for a response from that rig which may never come.

I added the following receive timeout to line 82 and it seems to have fixed my problem:

socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => '1', 'usec' => '0'));
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => '1', 'usec' => '0'));

I'm not sure what your patch policy is, and I'm not familiar enough yet with git/github, so forgive me if this is the wrong place to submit this.

I suppose the timeout values could be variables in the config if you wanted, and 1s is probably not long enough for people monitoring rigs across the internet, but this seems to be working for me and I hope it helps someone.
P_Shep
Legendary
*
Offline Offline

Activity: 1795
Merit: 1198


This is not OK.


View Profile
April 06, 2012, 05:46:49 PM
 #198

That's a good one. I'll add it when I next do an update. I'll make the timeout configurable in the config file.
nedbert9
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250

Inactive


View Profile
April 08, 2012, 06:46:05 PM
 #199

Quote

usesless is not a word.

p.s. Linux is much better suited to run apache web server and php then Windows server 2003, and if you cant see that then your just as usesless as windows

Dude, seriously, what makes you think the person wants to run APACHE as their Webserver? What makes you think that the only thing he needs to run "better" is Anubis on PHP? Did it ever occur to you that he also needs to run something else which is, as you say, BETTER SUITED, for running on Windows rather than Linux.

And dude, I can't see that... Cross-platform, ever heard of that? We've been running Apache on all platforms since 1997 and NT 4.0 and it has been working fine.

End of story.

+1
kano
Legendary
*
Offline Offline

Activity: 4466
Merit: 1800


Linux since 1997 RedHat 4


View Profile
April 08, 2012, 10:34:56 PM
 #200

That's a good one. I'll add it when I next do an update. I'll make the timeout configurable in the config file.
If you are restarting cgminer, the issue is most likely the side effect of the socket being in the TIME_WAIT state as is somewhat considered mandatory by internet protocol standards.
There is a way around it in Linux by doing something considered bad:
messing with net.ipv4.tcp_fin_timeout

There's also the socket option SO_REUSEADD that I STILL haven't got around to testing if there are any issues with using it in cgminer.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Pages: « 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!