The easiest way to monitor multiple processes at the same time is to open multiple windows. So you can open one for the "app.py" and one for the debug logger tail -f ~/.lightningATM/debug.log
and then display them side by side. But to watch both processes at the same time in one window, you can use "tmux" (terminal multiplexer). This allows the terminal window to be split vertically into two parts.
$ cd
$ sudo apt install tmux
CTRL + b -> % = split window
CTRL + b -> right or left arrow = change the window
CTRL + b -> CTRL + right or left arrow = move dividing line
CTRL + b -> d = back to single window
$ tmux
- Split tmux windows:
CTRL+b -> %
- Switch between left and right window:
CTRL + b -> right or left arrow
- If necessary, move the dividing line:
CTRL+b -> CTRL + arrow right or left
$ cd ~/LightningATM
$ ./app.py
Note:
If you have already activated the autostart function, problems can arise if you start the app.py in the tmux window at the same time. Therefore, it is better to end the servicesudo systemctl stop LightningATM.service
for the tmux and activate it again latersudo systemctl start LightningATM.service
. See next chapterautostart
.
- Switch to the right window and paste or type
$ tail -f ~/.lightningATM/debug.log
- Back to single window:
CTRL+b -> d
Example tmux window
Two withdrawals were made here. Once 5 cents and once 10 cent. Left side you see the pulses. Right side you see the coins to it. 2 pulses = 5 Cent = 199 Sats and 3 pulses = 10 Cent = 399 Sats. After that the program was stopped manually with CTRL+c.