Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: rsolano60 on August 21, 2019, 12:54:59 AM



Title: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on August 21, 2019, 12:54:59 AM
AntGuardian

FREE Open Source Antminer monitor and restart tool

For all of us reluctant to run proprietary software anywhare near our miners, let alone controlling them. Now we have an alternative!

Install instructions:
https://github.com/rsolano60/AntGuardian (https://github.com/rsolano60/AntGuardian)

Install tutorial:
https://www.youtube.com/watch?v=4nlnK1SP49s (https://www.youtube.com/watch?v=4nlnK1SP49s)

AntGuardian
AntMiner monitor and auto-restart tool

Compatible with all AntMiners

Scans the local network for miners. Once connected, restarts any miner when accepted shares do not increase in SECONDS_4_CHECKS seconds, given that there is an active internet connection (checks with google.com).

This software and all its dependencies are free and open source. Free as in free speach not as in free beer, meaning it respects your freedom! Please star on GitHub and share with your miner friends!

Happy LIBRE mining!


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: NotFuzzyWarm on August 21, 2019, 01:12:54 PM
Looks interesting. I'd give it a try but I stopped using Bitmain miners several years ago in favor of far more reliable gear from Canaan.
Can it work with any miner that uses Kano's cgminer API?


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on August 21, 2019, 03:02:54 PM
Looks interesting. I'd give it a try but I stopped using Bitmain miners several years ago in favor of far more reliable gear from Canaan.
Can it work with any miner that uses Kano's cgminer API?

We can make it work with any API pretty easily. I do not have miners to test tho.
Earlier versions of antGuardian use BMMiner API through SSH but since ssh was closed we started just using the web interface.

I would give it a try for CGMiner API but I currently do not have any miner to test...
Im looking forward to anyone joining development. You can even create a pull request on github and start de conversation going.
Anyway thanks for your reply!!
Please STAR on GitHub and Share!! Lets promote freedom respecting software!


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: NotFuzzyWarm on August 21, 2019, 03:22:05 PM
Bitmains API - and for that matter just about every other mfgr of miners API - are all based on or actually using the CGminer API written by Kano back when he and -ck were still working together. While BM may have added a few new commands specific to their miners (I doubt it) if this works on one make of miner then in theory it should work on all of them.


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on August 21, 2019, 06:19:51 PM
OK, maybe you can try version 0.1.1 then,, it is a fairly simple script. The only difference with the current version is you have to enter the list of IPs for your miners (not very convenient when using DHCP).

https://github.com/rsolano60/AntGuardian/blob/master/Old%20Versions/AntGuardian0.1.1.py

Hope this works for you.


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: kano on August 23, 2019, 11:27:58 AM
If you read the API-README and can access the full config file of the miner, you can turn on mcast so the API of every miner, with mcast enabled, will respond to a single mcast message on the network ...

The miner.php can also use that so that the php finds all your miners, with mcast enabled, without you having to tell it their IPs

https://github.com/kanoi/cgminer/blob/master/API-README


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on February 06, 2021, 05:35:06 PM
COOL !!!
Should have read this before I developed my script!
However I think this can´t restart the system OS like the HTTP GUI approach can, can it?
IDK if that is usefull at all
Thank You!!!



Update: Bug fix: AntGuardian.py used to throttle while internet() returned false. A delay fixed it on the new version 0.1.3

Please update or your CPU might throttle when you loose internet connection.

Happy mining! :D



A lot of traffic to GitHub is coming from here so some of you guys must be out here. Im talking about AntGuardian users.

I know it is a simple tool for a very niche sector of people but It has found its way to gain some popularity as I can see from the Github traffic statistics and from generous donations recieved over the past few months. There are other free alternatives but in my opinion none is is as "bare bones" as this one. You can literally analyze the whole python code in an afternoon, which is nice if you are paranoid like me.

Another reason I think it has gained popularity is because you just set it and forget it. Although it would be very very nice if we could release some play store or SNAP store packages or windows executables for ease of use but I think that might just miss the whole point to begin with... About being free and transparent and all... Let me know what you think about this

I would appreciate some feedback from users since I have not been mining for a few months now. Specially I would like some feedback about how it works with the new miners. But any feedback good or bad is appreciated. Let me know what miners are you using it for, adn for how long (if you feel comfortable with it).

Personally I just had 3 S9s, and It just worked Flawlessly. I have heard from some users having 12 and 13 miners working perfectly 24/7. I would like to hear more feedback about how it works with 20+ miners. Happy mining!


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: eeva1990 on February 22, 2021, 04:48:15 AM
Hello, this don't work with s9k, Restart the miner every so often, how do I contact you to pay for one that works?


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: Kingen75 on February 24, 2021, 12:44:42 AM
Hi, i´m trying to get this to work but i get this error: File "AntGuardian.py", line 17, in <module> import request - ImportError: No module named requests but when i install it says module requests-2.25.1 installed successfully. Anybody who can help with this?

i´m running macOScatalina and Python 3.9.


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on March 05, 2021, 10:59:54 PM
Hello, this don't work with s9k, Restart the miner every so often, how do I contact you to pay for one that works?

Hello eeva1990. No need to pay me, you can donate if you wish but I will help you as a user regardless of your donation or not.

Can you send me some Logs? or screenshots? How often does it restart the miner? It will certainly restart the miner if it detects "accepted shares" are not increasing (and there is an internet connection).

You can P.M. me or use this thread.

Just send me screenshots of the program functioning (command line).



Please anyone who posts questions or troubleshooting requests send me the screenshot of the program output (what it prints on the command line). 8)

Hi, i´m trying to get this to work but i get this error: File "AntGuardian.py", line 17, in <module> import request - ImportError: No module named requests but when i install it says module requests-2.25.1 installed successfully. Anybody who can help with this?

i´m running macOScatalina and Python 3.9.

If you have multiple versions of Python, most of the time it has to do with that, you might have the requests package, or every package installed on another version of Python that the one you are running. Try uninstalling Python 3 and using Python 2.

Can you send me the logs or screenshots?


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: iwantmyhomepaidwithbtc on May 17, 2021, 10:49:14 AM
Hey there

It looks very interesting, thank you for this work !


I will test it on my  two Antminer R4.


For the S9k restarting problem, I can give an eye on it. I have a S9K running, I will do the test asap.


Have a nice day !



EDIT :

I've done the test. it works 100% perfectly with the Antminer R4! No problem with the 12 S9 my friend has too.

The test is 100% positive for my 2 S9k. 1 is always good and the other very unstable, so your software is like a gift, thank you !!!


Thank you OP, as a really pro open source software and long time debian user guy, I really appreciate your way of thinking


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on June 01, 2021, 02:58:38 PM
Hey there

It looks very interesting, thank you for this work !


I will test it on my  two Antminer R4.


For the S9k restarting problem, I can give an eye on it. I have a S9K running, I will do the test asap.


Have a nice day !



EDIT :

I've done the test. it works 100% perfectly with the Antminer R4! No problem with the 12 S9 my friend has too.

The test is 100% positive for my 2 S9k. 1 is always good and the other very unstable, so your software is like a gift, thank you !!!


Thank you OP, as a really pro open source software and long time debian user guy, I really appreciate your way of thinking


I'm always happy to meet others that think the same way!
Thank you for your feedback

I know there are many Antminer monitors out there, but one could argue none as simple and easy to audit as this one.

I Would love to bring support to other miner brands as they develop. Any developers would be appreciated

If anyone has an old unprofitable miner (not bitmain) that they can donate and send it to me to Miami, I could develop support for that brand. You can send me a PM or post it here and I will give you my address


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: iwantmyhomepaidwithbtc on June 01, 2021, 05:06:29 PM

I'm always happy to meet others that think the same way!
Thank you for your feedback

I know there are many Antminer monitors out there, but one could argue none as simple and easy to audit as this one.

I Would love to bring support to other miner brands as they develop. Any developers would be appreciated

If anyone has an old unprofitable miner (not bitmain) that they can donate and send it to me to Miami, I could develop support for that brand. You can send me a PM or post it here and I will give you my address

All my miners are actually running, but I will DM you the phone number of a friend which would be maybe able to help you.


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on June 15, 2021, 08:24:39 PM
All my miners are actually running, but I will DM you the phone number of a friend which would be maybe able to help you.

Please do  :)

Help is very welcome in the areas of:
-Graphic design
-Python developers
-Miners
-Anyone who has benefited from monitoring your miners with AntGuardian, even if you have no skills you can contact me if you wish to help.


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: iwantmyhomepaidwithbtc on June 17, 2021, 10:43:38 AM
DM sent


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: cedarfox on November 17, 2021, 03:18:51 AM
Hi, I found your software and I want to try it but I have a question.... How can I get it to scan devices from an IP range or list of IP addresses which is not my normal LAN. I want to have a computer run the program and connect to a VPN with miners on the VPN to monitor/scan? 

Thanks,
Mark


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: btc2marspro on November 21, 2021, 06:03:36 AM
Great Spirit :D  Wander, any unicorn mining farm's CTOs are professional enough to say, I did not code this but lets use this. Wander how many techs from the unicorn farms kiss the boss' butt and making them believe the enterprise is not so successful without the self written buggy tools. Wander if boss sees value in open source code.


FREE Open Source Antminer monitor and restart tool
For all of us reluctant to run proprietary software anywhare near our miners, let alone controlling them. Now we have an alternative!

Happy mining!


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on November 30, 2021, 07:46:09 PM
Hi, I found your software and I want to try it but I have a question.... How can I get it to scan devices from an IP range or list of IP addresses which is not my normal LAN. I want to have a computer run the program and connect to a VPN with miners on the VPN to monitor/scan? 

Thanks,
Mark

Hi Mark,
Just connect to the VPN in which your miners are connected, and run AntGuardian and it will work.
No need to do anything additional.


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on November 30, 2021, 08:06:19 PM
Great Spirit :D  Wander, any unicorn mining farm's CTOs are professional enough to say, I did not code this but lets use this. Wander how many techs from the unicorn farms kiss the boss' butt and making them believe the enterprise is not so successful without the self written buggy tools. Wander if boss sees value in open source code.

Did you find a bug?


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: rsolano60 on June 01, 2023, 03:07:35 AM
Looks interesting. I'd give it a try but I stopped using Bitmain miners several years ago in favor of far more reliable gear from Canaan.
Can it work with any miner that uses Kano's cgminer API?

Finally got my first Canaan miners. Porting AntGuardian to Canaan will only take a few lines of code.

Update comming soon.  8)


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: ravaGGa on March 02, 2024, 11:14:33 AM
Hello!

Thank you for your app. I'm on S19j Pro. First, I found that nmap fails to identify my AntMiner, so on line 104 I changed args to nm.scan(hosts=ipRange, arguments='-v -p0- ANTMINERAPIhere').
Second, my miner after that started to reboot every 3-5 minutes, which is insane. Maybe there is something with shares and SECONDS_4_CHECKS = 95.

Hope you'll mark my mistakes, 'cause I do not understand why it keeps rebooting so frequently.

UPD. Actually, AntGuardian always show 0 shares, while Antminer dashbord shows 300+ shares before rebooting: https://drive.google.com/file/d/1R178PRb1yWrjdtf4UVF_pYa2JIBLbaMa/view?usp=sharing


Title: Re: AntGuardian - 100% LIBRE Free Software Watchdog for all Bitmain AntMiners
Post by: mikeywith on March 03, 2024, 11:56:50 PM
I don't fee comfortable clicking on random links, and I am sure many other members are probably the same, the forum is feature-rich, you can post images, kernel logs and many other content where the viewer can easily and safely view them, if your account doesn't let you post images you can just put URLs to them.

Use this website https://www.talkimg.com/ to upload images, paste the image URL.

And to post any logs you can use the code tag "dash icon above the smileys"

Example:

Code:
Kernel/Miner/System log goes here

You can quote my post to learn how to use the code tag, it's pretty straightforward.