Git Product home page Git Product logo

nosostuff's Introduction

NosoStuff

Some handy bash shell scripts facilitate Noso Cryptocurrency mining, checking pools, checking nodes ...


MINING USING noso-go <--- Deprecated by Protocol 2 since Feb. 23 2022. Use noso-2m or consominer instead

Why I (and you?) need these scripts

Crypto mining is always unstable by many reasons, like the network communication, the softwares themself, ... That is unavoidable in case of Noso Cryptocurrency, mining on pools (NosoWallet up to version v0.2.1Lb1) using the admirable miner noso-go (up to version v1.6.2). Watchdog triggered, POOLFULL, BANNED, ALREADYCONNECTED, PING 0, or pool offline (i/o timeout) ... These kind of dead events may appear at any time and cause my mining stop while my computers continue running and consuming the electricity until I have time to check and restart the miners

I need tools to: - Automatically stop the mining in case of dead events appear. - Automatically restart mining or switch to another pool and/or wallet address to continue the mining.

And, here they are! ngExec.sh, ngKill.sh, ngTmuxNew.sh, ngTmuxEnd.sh, and ngTmuxRestart.sh (bash shell scripts)

Screenshot

Supported OSs/ Platforms:

Linux, Android(Termux), and macOS. Currently not support Windows native someone has set it up well under WSL as same as on a native Linux.

Required packages: tmux, nc (netcat), timeout, sed, grep, pgrep, ... (must using date GNU version)

*** In Linux: Most of these packages are common and installed by default in linux distros:

- `sudo apt install tmux`       # ubuntu

- `apk add tmux coreutils`       # alpine linux

*** In macOS: the nc Apple version is bugfull, use the GNU version instead:

- `brew install tmux netcat grep gnu-sed`

*** In Android/Termux:

- `pkg install termux netcat-openbsd`

Quick runing

  • Put all relating files in the same folder (ex.: NosoStuff) with the noso-go
  • Set parameters (descripted below)
  • Open terminal, go to folder NosoStuff
  • Set executable permission to script files: chmod +x ngTmuxNew.sh chmod +x ngTmuxEnd.sh chmod +x ngTmuxRestart.sh chmod +x ngExec.sh chmod +x ngKill.sh
  • Run appropriate commands bellow from shell prompt ($, #, ...): ./ngTmuxNew.sh # for launching mining processes, shows up a 3-window screen (a tmux screen) of mining processes ./ngTmuxEnd.sh # for turning off the mining processes ./ngTmuxRestart.sh # simplifying the turning of and lauhching again mining processes
  • To close the above 3-window screen and let mining processes continue to run in background by keystrokes: Ctr-b d
  • To show up the 3-window screen with mining processes running by command: tmux a -tnosomine

Set parameters:

  • POOLS: List of pools can be used (in file pools.txt or ngExec.sh)
  • USERS: List of users (wallet addresses/ aliases) can be used (in file users.txt or ngExec.sh)
  • CPU: The number of CPUs the noso-go uses for mining (in file params.txt or ngExec.sh)
  • SWITCH_DURATION: Duration in seconds the noso-go does mining in case the selected pool and/or user are not preferred. After this duration, noso-go will try back to mine using the preferred pool and user. Tthe 1st one in POOLS and USERS lists (in file params.txt or ngExec.sh)
  • TIME_CYCLE: Duration in seconds periodically (default 5 secs) the noso-go log file be scanned to detect the dead events (in file params.txt or ngExec.sh)

*** Recommend to set the parameters up using corresponding text files with the same formations as follow:

  • Set pool list POOLS using file pools.txt;
  • Set user list USERS using file users.txt;
  • Set other parameters using file params.txt;

How they work

  • The ngExec.sh: Everytime the miner noso-go to be terminated, the ngExec.sh do scan the latest lines of noso-go log file to find the reason; then tries to select an approriate pool, and/or user; and then restart the miner with those parameters.

  • The ngKill.sh: peridically 5 seconds (configurable), ngKill.sh does scan the latest lines of noso-go log file to detect if an dead event appear, and then force killing that sick miner. That gives a chance to the miner to be restarted by the ngExec.sh with approriate pool and/or user.

  • The combination of both ngExec.sh and ngKill.sh in parallel is the way staying with dead events during mining, automatically.

  • The ngTmuxNew.sh and ngTmuxEnd.sh utilize for launching and turning off both ngExec.sh and ngKill.sh at once on a single tmux session.

  • The ngTmuxRestart.sh is just a simplifying of turning of the current mining and then launching it again.

Supported events

Currently it can catch these simple events:

  • Watchdog triggered --> restart miner;
  • POOLFULL --> try another pool;
  • BANNED --> try another pool;
  • ALREADYCONNECTED --> try another wallet address, if no more address available, try another pool;
  • PING 0 --> restart miner;
  • Pool offline (i/o timeout for more than a minute) --> try another pool;

CHECKING POOLS <--- Deprecated by Protocol 2 since Feb. 23 2022.

Quickly check pools online or not, show pool information including: hashrate, number of miners, fee, share, ... If associating with users (users.txt), show status of user in pool, including: joining or not, balance, user hash rate, block till payment out.

  • Setup: chmod +x problePools.sh

  • Parameters: pools.txt list pools and users.txt (optional but recommended)

  • Use command: ./probePools.sh

probePools.sh's Screenshot

CHECKING NODES

Quickly check your pools status. It shows number of PEERS, current BLOCKS, PENDINGS blocks, DELTAS HEADERS VERSION UTC-TIME MNs-HASH MNs-COUNT

  • Setup: chmod +x probleNodes.sh

  • Parameters: nodes.txt list yours nodes.

  • Use command: ./probeNodes.sh

probeNodes.sh's Screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.