chaeplin
Well-known member
Status updated when a new block is received.
# darkcoin.conf // each user
# /usr/local/bin/darkcoinmonitor.sh
as root.
if error occured.
Code:
-blocknotify=<cmd> Execute command when the best block changes (%s in cmd is replaced by block hash)
-walletnotify=<cmd> Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
-alertnotify=<cmd> Execute command when a relevant alert is received (%s in cmd is replaced by message)
# darkcoin.conf // each user
Code:
blocknotify=/usr/local/bin/darkcoinmonitor.sh
# /usr/local/bin/darkcoinmonitor.sh
Code:
#!/bin/sh
myid=$USER
/usr/bin/darkcoind getinfo > /dev/shm/getinfo.$myid
/usr/bin/darkcoind masternode debug > /dev/shm/debug.$myid
/usr/bin/darkcoind masternode count > /dev/shm/count.$myid
/usr/bin/darkcoind masternode current > /dev/shm/current.$myid
as root.
Code:
# grep error /dev/shm/getinfo.nm0*
/dev/shm/getinfo.nm01: "errors" : ""
/dev/shm/getinfo.nm02: "errors" : ""
/dev/shm/getinfo.nm03: "errors" : ""
/dev/shm/getinfo.nm04: "errors" : ""
/dev/shm/getinfo.nm05: "errors" : ""
Code:
# grep blocks /dev/shm/getinfo.nm0*
/dev/shm/getinfo.nm01: "blocks" : 97919,
/dev/shm/getinfo.nm02: "blocks" : 97919,
/dev/shm/getinfo.nm03: "blocks" : 97919,
/dev/shm/getinfo.nm04: "blocks" : 97919,
/dev/shm/getinfo.nm05: "blocks" : 97919,
Code:
# cat /dev/shm/count.nm0*
577
577
577
577
577
Code:
# cat /dev/shm/current.nm0*
162.243.254.15:9999
162.243.254.15:9999
162.243.254.15:9999
162.243.254.15:9999
162.243.254.15:9999
Code:
# cat /dev/shm/debug.nm0*
Missing masternode input, please look at the documentation for instructions on masternode creation
Missing masternode input, please look at the documentation for instructions on masternode creation
Missing masternode input, please look at the documentation for instructions on masternode creation
Missing masternode input, please look at the documentation for instructions on masternode creation
Missing masternode input, please look at the documentation for instructions on masternode creation
if error occured.
Code:
# cat /dev/shm/getinfo.nm01
{
"version" : 101105,
"protocolversion" : 70018,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 97920,
"timeoffset" : 0,
"connections" : 9,
"proxy" : "",
"difficulty" : 2830.06364659,
"testnet" : false,
"keypoololdest" : 1404495439,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00001000,
"errors" : "EXCEPTION: St9bad_alloc \nstd::bad_alloc \ndarkcoin in ProcessMessages() \n"
}
Last edited by a moderator: