System Maintenance

There are a number of setup guides available for Secure / Super Nodes, here we cover the most common options for the following system maintenance requirements

  • Useful zen-cli commands to validate node status
  • How to start, stop, restart processes
  • Checking the status of processes
  • Obtaining system logs for troubleshooting



DescriptionCommand

zen-cli commands
1List addresses in the wallet

For t_addresses

zen-cli listaddresses

For z_addresses

zen-cli z_listaddresses
2Check balances

For all t_addresses

zen-cli listaddressgroupings

For total balance (t_addresses [transparent] and z_addresses [private])

zen-cli z_gettotalbalance

For individual z_addresses (replace z_address with the value)

zen-cli z_getbalance z_address
3Exporting / dumping private keys

For t_addresses (replace t_address with the value)

zen-cli dumpprivkey t_address

For z_addresses (replace z_address with the value)

zen-cli z_exportkey z_address
4Checking block height
zen-cli getinfo | grep blocks
5

Sending transactions via the zend daemon

Replace;

  • fromAddress with a t_address, or z_address
  • toAddress with a t_address, or z_address
  • amt with an amount (numeric)
zen-cli z_sendmany 'fromAddress' '[{"address": "toAddress", "amount": amt}]'

Start, stop and restart processes
6

How to start, stop, restart and check the status of zend

For installations using systemd (assumes the unit file is named 'zend.service')

sudo systemctl start zend
sudo systemctl stop zend
sudo systemctl restart zend
sudo systemctl status zend

For installations using monit

sudo monit start zend
sudo monit stop zend
sudo monit restart zend
sudo monit status
7How to start, stop, restart and check the status of the node tracker

For installations using systemd (assumes the unit file is named 'zentracker.service')

sudo systemctl start zentracker
sudo systemctl stop zentracker
sudo systemctl restart zentracker
sudo systemctl status zentracker

For installations using pm2 (assumes the tracker is running as the only or first process, numbered 0)

pm2 stop 0
pm2 stop 0
pm2 restart 0
pm2 status 0

Checking logs
8How to follow the zend log

Follow the zend output log with the command below, quit by pressing CTRL+c

tail -f ~/.zen/debug.log
9How to follow the node tracker log

For installations using systemd (assumes the unit file is named 'zentracker.service') quit by pressing CTRL+c

sudo journalctl -fu zentracker

For installations using pm2 (assumes the tracker is running as the only or first process, numbered 0)

pm2 logs

Or to tail pm2 logs directly

tail -f ~/.pm2/logs/secnodetracker-out-0.log
10How to obtain zend logs (if needed to raise a help ticket). This command will create a file named 'zendlog.txt' in the user's home directory
cp ~/.zen/debug.log ~/zendlog.txt
11How to obtain node tracker logs (if needed to raise a help ticket). Either command will create a file named 'trackerlog.txt' in the user's home directory

For installations using systemd (assumes the unit file is named 'zentracker.service')

sudo journalctl --no-pager -u zentracker > ~/trackerlog.txt

For installations using pm2 (assumes the tracker is running as the only or first process, numbered 0)

cp ~/.pm2/logs/secnodetracker-out-0.log > ~/trackerlog.txt



© 2020 Horizen. All rights reserved.