z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
291 stars 437 forks source link

Help - 2 Questions and 1 is a Problem #313

Closed RepoBike closed 6 years ago

RepoBike commented 6 years ago

How do I run Z-nomp in the background on Ubuntu 16?

How do I fix the network stats? I'm not getting any errors on BTCZ and ZEC Wallets or Z-nomp.

Bitcoinz Network Stats
Block Height: 0
Network Hash/s: 0 Sol
Difficulty: 0
Node Connections: 0

Zcash Network Stats
Block Height: 0
Network Hash/s: 0 Sol
Difficulty: 0
Node Connections: 0
zimbo123 commented 6 years ago

You can run z-nomp in the Background with

pm2 start npm -- start

And see the logs with

pm2 logs

RepoBike commented 6 years ago

Thank you. I will try this when I get the network hash rate working.

theicosuperman commented 6 years ago

I personally use forever for this in my ~/.zshrc I've added this

alias starz="cd /root/z-nomp; forever start -c 'npm start' -a -l /root/z-nomp.log ./; grc tail -f /root/z-nomp.log"

stopz() {
        pid=`forever list | grep npm | head -n1 | awk '{ print $3}'`
        cp /root/z-nomp.log /root/z-nomp.`date +%s`.log
        forever stop $pid
        sleep 5
        pid=`pgrep node | head -n1`
        while [ "$pid" ]; do
                kill $pid
                echo "$pid is killed"
                sleep 1
                pid=`pgrep node | head -n1`
        done
        }

After it running is easy i just enter starz to run and stopz to stop, logs are in /root directory