• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Linux DASHD - Check and Review - Script

nano CODE: - updated from, time to time (zaman zaman)

UPDATED: 06.07.2015

MN code to check your MN
You have to be using dash-cli along with dashd




#!/bin/bash

# -----

MNIP=`wget -qO- http://ipecho.net/plain ; echo | awk "{print \\$2}" | sed -e 's/addr://' | tr "\n" " "`;

export GREP_OPTIONS=--color=always

# -----

function wait_clear() {
PROMPT="
press enter or wait $1 seconds to continue "
read -p "$PROMPT" -t $1 NOOP;
clear;
}

# ----------------------------------------------------------------

wait_clear 1;

cat << EOF
YOU MUST RUN
DASH-CLI
FOR THE DASH REVIEW
WITH MASTERNODE
TO PROCEED PROPERLY
EOF


# ----------------------------

wait_clear 5;

cat << EOF


*** START 'DASH' REVIEW - WITH MASTERNODE
EOF

# ----------------------------

wait_clear 5;

cat << EOF


*** CHECKING YOUR DASH MASTERNODE IP CONNECTION(S) ON PORT: 9999

`netstat -an | grep 9999 | more`


*** CHECKING YOUR DASH 'LISTENING' ABILITY
*** LISTENING, ON PORT : 9999

`netstat -an | grep LISTEN | grep 9999
EOF

# ----------------------------

wait_clear 10;

cat << EOF


***GET-INFO FOR 'DASH'

`./dash-cli getinfo`
EOF

# ----------------------------

wait_clear 8;

cat << EOF


***YOUR DASH MASTERNODE 'IP' SHOULD = ENABLED

`./dash-cli masternode list | grep $MNIP`
EOF

cat << EOF


***ZERO IS THE BEST SCORE FOR YOUR MASTERNODE


`./dash-cli masternode list pose | grep $MNIP`

EOF

# ----------------------------

wait_clear 8;


VOTES=`./dash-cli masternode list votes`

cat << EOF


***ALL VOTING RESULTS FOR THE CURRENT DASH 'VOTE'
-------------------------------------------------


YES = $(echo "$VOTES" | grep -c YEA)
NO = $(echo "$VOTES" | grep -c NAY)
ABSTAIN = $(echo "$VOTES" | grep -c ABSTAIN)
YOUR VOTE = $(echo "$VOTES" | grep $MNIP)

TOTAL MASTERNODE COUNT = $(./dash-cli masternode count)
EOF

# ----------------------------

wait_clear 10;

cat << EOF


HAVE A NICE DAY ........................................
EOF

# ----------------------------

wait_clear 5;

cat << EOF

PLEASE FEEL FREE TO DONATE TO THE FOLLOWING DASH ADDRESS

XexrpL5LWdtzkDRspikBqR5Ue1Kt3zyduv

*33% OF ALL DONATIONS WILL GO TO fuzzyduck
*33% OF ALL DONATIONS WILL GO TO moocowmoo

EOF


exit;








copy and paste into: nano [what-ever-you-want-to-name-it]
to save: CTRL-x
input: chmod +x ./[what-ever-you-named-it]
to run: ./[name]



enjoy :-D
GOD I LOVE DASH :-D

\o/ WOOT !!!!
 
Last edited:
Sorry to say again here that "dashd [something]" will not available anymore in near future...:grin:
 
Sorry to say again here that "dashd [something]" will not available anymore in near future...:grin:

I asked three other spots might as well ask here also just to get it out there so people can see. Care to explain why the dashd command wont be available? I'm not sure I understand why.
 
I asked three other spots might as well ask here also just to get it out there so people can see. Care to explain why the dashd command wont be available? I'm not sure I understand why.

Migrating to 0.10 bitcoin will split "old" dashd to
1) dashd - daemon
2) dash-cli - lightweight cli program to run rpc commands
and "dashd some_command" will not be available anymore

Since the "masternode start" and etc. are rpc commands, all these communication with dash daemon will not allow running with "dashd" but still available for "dash-cli" command.
So, "dashd" is available to start the daemon only. "dashd [something]" will not available like now. you should change to "dash-cli" , including "dash-cli stop" command to stop the daemon.
 
Hows about a little more info for us dash-cli noobs
list of commands?

Somebody want to construct a guide - for transitioning to dash-cli?

ugh

now I'll have to use 2 programs to run the MN?
feels like a step backwards.....
 
Hows about a little more info for us dash-cli noobs
list of commands?

Somebody want to construct a guide - for transitioning to dash-cli?

ugh

now I'll have to use 2 programs to run the MN?
feels like a step backwards.....
All the command run with dashd can be used by dash-cli with same parameter and format so I understand that just change dashd to dash-cli will works except the starting daemon , only "dashd" can do.
 
So go to dashd : dashd masternode start
then
go to dash-cli and do everything else?


if that's the case - no biggy


I was starting to freak out that I had to re-learn a bunch of stuff




thanx for the info :)
 
So go to dashd : dashd masternode start
then
go to dash-cli and do everything else?


if that's the case - no biggy


I was starting to freak out that I had to re-learn a bunch of stuff




thanx for the info :)

Not exactly:
1. start daemon (by hands or in cron):
dashd
2. issue some commands:
dash-cli getinfo
dash-cli masternode start

dash-cli masternode list
.....
3. stop daemon (if you need to):
dash-cli stop

EDIT: edited for readability
 
so ONLY dashd to start

do everything else in dash-cli

correct?


So I'll have to move/copy dash-cli to .dash DIR


ok - I think I got this figured out now

between you and Lazy - I think I got this :-D


please correct me if I'm wrong :-D
 
so ONLY dashd to start

do everything else in dash-cli

correct?


So I'll have to move/copy dash-cli to .dash DIR


ok - I think I got this figured out now

between you and Lazy - I think I got this :-D


please correct me if I'm wrong :-D

You need to move dashd and dash-cli to the same path where you were usually moving dashd on update

oh


I will need to : chmod +x ./dash-cli

right?

Yep, and for dashd too - you still need it to run daemon itself
 
You need to move dashd and dash-cli to the same path where you were usually moving dashd on update



Yep, and for dashd too - you still need it to run daemon itself


I already have the chmod +x ./dashd

but are you saying that I'll need to do the following once I copy and chmod the dash-cli?

./dashd
./dashd masternode start
./dash-cli
./dash-cli [cmd}
./dash-cli [cmd}

like so?
 
What is the reason for this split?
isn't it more reasonable to keep it all in one executable ?

The idea behind this is to have small standalone program that does nothing but rpc calls and has literally no complicated lib dependences. So you can compile it with just some c compiler and no qr, leveldb and all that kind of stuff.
 
IMO, removing CLI functionality of RPC from daemon itself help reduce overhead during starting daemon and make smaller memory footprint , give better performance and faster startup... :)
 
The idea behind this is to have small standalone program that does nothing but rpc calls and has literally no complicated lib dependences. So you can compile it with just some c compiler and no qr, leveldb and all that kind of stuff.

so does that mean we want to move to a more "simple" form - like portable devices (smartphones) - and if so - did you see my proposal/theory for dynamic IP resolve on BCTalk

If I knew how to code - I'd send you "something"

read it and tell me I'm crazy - then find somebody to code it - lol

https://bitcointalk.org/index.php?topic=421615.msg11529451#msg11529451

"
There should/could be a way for the MN COLD side (dashd and/or dash-cli) to "ping" a request for the current IP every few seconds/minutes - Then the COLD side uses some kind of code to alter the COLD side .conf file IP - then send that same .conf file IP change to the HOT side thus keeping your MN in-sync with the IP while also letting the WHOLE MN system know that your IP change has occurred.
LOL - I can see it now - A separate and NEW file would need to be created called: mnip.conf
- that only contains your MN IP = write to mnip.conf new IP"


etc
 
Back
Top