[ANN] Primewatch - a bash script designed to look after primeminer @ beeeeer.org

Hi all!

When I have started mining primecoins on my PC some month ago, occasionally two thing were happening: miner hangs during nighttime hours and (much much rarer) miner crashes. Well, there are better things to do at night than watching miner output, so I have searched the net and surprisingly didn’t found any useful solution. So I made one for myself, works with Xolo’s Primeminer and beeeeer.org pool. Not a cutting edge programming but address three things:

[ul][li]Is Internet connection working at all? Script periodically pings Google DNS and if errors are returned pings four more servers and checks connection carrier, then writes info to logfile if less than half of packets is received.[/li]
[li]Is miner running at all? If not, launch again.[/li]
[li]Did miner hang somewhere at connection after all? I had hangs lasting an hour or two with lots of force reconnect if possible! or system:111 communicates (on my box usually one of them was clearly dominating, not both at the same time), without any [MASTER] line printed to output. Script simply compares line numbers of last force reconnect if possible! and system:111 communicates with line number of last [MASTER] communicate. If [MASTER] is not the last one, primeminer is killed, launched against another server and info is written to logs.[/li][/ul]

I had this working for a while, and recently decided to clean & comment the code and post it on github: https://github.com/arkhebuz/primewatch
There is a readme file on github too, with introduction from above and quick how-to. I will keep the second part there, so in case I change something I don’t have to remember to edit post here.

Comments? Tips? Ah, and it would be nice if somebody except me tested this. :wink:

By the way, I made a fork for Datacoin, supporting all currently working DTC pools (all two, that is :wink: ). Datacoin is based on Primecoin and uses the same mining software.

What is this Datacoin?
Is the pool software also restricted for general use?

We, XPM miners, have a limited set of mining pools available. Yes, solo mining is an option, we don’t HAVE to use the pools. But this is blatantly against crypto coin philosophy.

Power corrupts, and absolute power corrupts absolutely.

From blockchain announcement:

Datacoin is intended to be reliable censorship-free data storage and a currency to pay for this storage. Money transfer isn't the first purpose of Datacoin.
[url=https://bitcointalk.org/index.php?topic=358592.0]Here's more info.[/url]

Taking into account that DTC pools are operated by people doing XMP pools, guess…

And you don’t have to tell me that situation when there are two pools and first is three orders of magnitude bigger than second is bad!
(Although, there can be some “excuses”, like recent half-a-day-long downtime for example)
There is a 300DTC bounty for third pool, by the way. Thats something like 140-150 dollars currently.

[quote=“1940, post:1, topic:1270”]Hi all!

When I have started mining primecoins on my PC some month ago, occasionally two thing were happening: miner hangs during nighttime hours and (much much rarer) miner crashes. Well, there are better things to do at night than watching miner output, so I have searched the net and surprisingly didn’t found any useful solution. So I made one for myself, works with Xolo’s Primeminer and beeeeer.org pool. Not a cutting edge programming but address three things:

[ul][li]Is Internet connection working at all? Script periodically pings Google DNS and if errors are returned pings four more servers and checks connection carrier, then writes info to logfile if less than half of packets is received.[/li]
[li]Is miner running at all? If not, launch again.[/li]
[li]Did miner hang somewhere at connection after all? I had hangs lasting an hour or two with lots of force reconnect if possible! or system:111 communicates (on my box usually one of them was clearly dominating, not both at the same time), without any [MASTER] line printed to output. Script simply compares line numbers of last force reconnect if possible! and system:111 communicates with line number of last [MASTER] communicate. If [MASTER] is not the last one, primeminer is killed, launched against another server and info is written to logs.[/li][/ul]

I had this working for a while, and recently decided to clean & comment the code and post it on github: https://github.com/arkhebuz/primewatch
There is a readme file on github too, with introduction from above and quick how-to. I will keep the second part there, so in case I change something I don’t have to remember to edit post here.

Comments? Tips? Ah, and it would be nice if somebody except me tested this. ;)[/quote]

Hi mate, thanks for the script! I modded it slightly for us folks down under (Australia) to get better latencies from the asian pool with the US as backup… these are the mods I made on my rigs…

...
echo "Example:                  ./primewatch.sh ap 1337"
...
function minerlaunch {
    if [ "$1" = "eu" ] ; then
        ip="176.34.128.129" #server europa ip
    elif [ "$1" = "us" ] ; then
        ip="54.200.248.75"  #server usa ip
    elif [ "$1" = "ap" ] ; then
        ip="54.251.179.44"  #server asia ip
    fi
...
if [ "$hammer" = "ap" ] ; then  # If you wondered what hammer is for...
                hammer="us"
            else
                hammer="ap"
            fi
...

Perhaps consider adding a AP-US version to ur script at github?

Thanks again…

Thanks for feedback :slight_smile:

Wooha, so asian pool is not dead.

I think after I manage pull request on DataMinerWatch I will do the same here, and then I could make some small branch for kangaroo to sit on or something :wink: