xx network Logs
Log Location
All xx network related logs are located in /opt/xxnetwork/log/
of the node and gateway computers respectively.
Most Helpful Logs
There will be times you need to check the logs to determine why a service or process is not running as expected or perhaps stopped running.
On the node computer the most helpful log files are the ...
- cmix-wrapper.log
- cmix.log
- chain.log
On the gateway computer the most helpful logs files are the ...
- gateway-wrapper.log
- gateway.log
- chain.log
Viewing Logs
There are many programs that can be used to view logs, less and tail are quite common.
less
less can be used to view or follow logs by replacing [file]
in the command below with the name of the log file. As examples:
- to view the cmix.log file you would replace
[file]
withcmix.log
. - to view the chain.log file you would replace
[file]
withchain.log
.
less /opt/xxnetwork/log/[file]
- f or Page Down - forward a page
- b or Page Up - back a page
- g - go to the beginning of the file
- Shift + g - go to the end of the file
- Shift + f - "follow" mode
- Ctrl + c - cancel current mode, ex. end "follow" mode.
- q - quit
tail
tail is useful for when you only need to see the end, or tail, of a large file. By default, it only displays the last 10 lines of a file. tail can be used to view or follow logs by replacing [file]
in the command below with the name of the log file. As examples:
- to view the cmix.log file you would replace
[file]
withcmix.log
. - to view the chain.log file you would replace
[file]
withchain.log
.
tail /opt/xxnetwork/log/[file]
tail -n 100 /opt/xxnetwork/log/[file]
tail -n 500 /opt/xxnetwork/log/[file] > new.log
tail -f /opt/xxnetwork/log/[file]