- Platform information:
- Hardware: Raspberry Pi 3 B+, 120gb mSATA SSD in a USB enclosure
- OS: Raspbian Stretch
- Java Runtime Environment: 1.8.0_212
- openHAB version: 2.4.0 release build. Jython 2.7.0
Hi,
I’m trying to make a tablet show the karaf log:tail output at all times, so that I can mount it on my wall. It needs to reconnect an log in and start showing the log automatically, so that it doesn’t add a maintenance tax. (The whole point of home automation is to automate things, not add more manual steps).
I have a saved session in putty by the name of “openhab karaf” set up with the following settings:
- SSH
- IP 172.22.22.100, port 8101 (the local IP of my raspi running openhab)
- Session: Close window on exit: ALWAYS
- Terminal - Implicit CR in every LF: TRUE
- Connection - Data - Auto-login username: openhab
I have a text file at c:\temp\openhab\commands.txt with the following contents:
log:tail
And finally a batch file:
@echo off
:loop
start /wait /max "putty" putty.exe -load "openhab karaf" -pw mypassword -m c:\temp\openhab\commands.txt
ping -n 10 172.22.22.100
goto loop
When I start the batch file, putty successfully connects to karaf, and displays the last full page of logs… and then it just sits there.
It doesn’t display any more logs. The console is completely frozen and I have no idea why. I certainly did not expect this behavior, nor can I explain it. I expected that as new events happen, they would appear at the bottom of the list, as they do when I manually issue the log:tail command.
Now, I tried the same thing with normal SSH into raspbian (port 22) and the command tail -f /var/log/openhab2/openhab.log in commands.txt. Everything the same except different port, different command (and different login/pass). THAT WORKS PERFECTLY. As expected, the log appears and updates work fine! This tells me perhaps it’s some interaction with the karaf console?
It’s not really a workaround though as tail is not a good permanent log viewer, for one it lacks the color coding.
Does anyone have any idea what’s going on?
Or, can you suggest another way of turning an old (windows 10) tablet into a realtime openhab log viewer?