As a node operator, you probably want your node software to run persistently in the system background. Linux distros each have their own way of managing background services, but most (e.g. Ubuntu, Debian and CentOS 7/8) use the systemd software. systemctl is a command to introspect and control the state of the systemd system and service manager.
Controlling the vagachaind Service
Use systemctl to start, stop, and restart the service:
# Check healthsudosystemctlstatusvagachaind# Start VagaChainsudosystemctlstartvagachaind# Stop VagaChainsudosystemctlstopvagachaind# Restart VagaChainsudosystemctlrestartvagachaind# Start VagaChain automatically at the next system restartsudosystemctlenablevagachaind# Do not start VagaChain automatically at the next system restartsudosystemctldisablevagachaind
Access Logs
Use journalctl to access entire logs, entire logs in reverse, and the latest and continuous logs:
# Entire log reversedjournalctl-uvagachaind-r# Entire logjournalctl-uvagachaind# Latest and continuous logsjournalctl-uvagachaind-fe
Use Ctrl + C to interrupt the journalctl command.
Available vagachaind Commands
To list all of the available commands, type:
vagachaindhelp
The output will look like this:
AvailableCommands:add-genesis-accountAddagenesisaccounttogenesis.jsoncollect-gentxsCollectgenesistxsandoutputagenesis.jsonfileeditodebugToolforhelpingwithdebuggingyourapplicationexport Export state to JSONgentxGenerateagenesistxcarryingaselfdelegationhelpHelpaboutanycommandinitInitializeprivatevalidator,p2p,genesis,andapplicationconfigurationfileskeysManageyourapplication's keys query Querying subcommands rollback rollback cosmos-sdk and tendermint state by one height rosetta spin up a rosetta server start Run the full node status Query remote node for status tendermint Tendermint subcommands tx Transactions subcommands validate-genesis validates the genesis file at the default location or at the location passed as an arg version Print the application binary version informationFlags: -h, --help help for vagachaind --home string directory for config and data (default "/<rootc directory>/.vagachain") --log_format string The logging format (json|plain) (default "plain") --log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info") --trace print out full stack trace on errors