Pcap inside OH docker

In the event anyone is ever looking for it, I had to figure this out for some debugging. Documenting for the future.

Inside of a cont-init.d shell script add the following lines

apt-get install -y wireshark
usermod -a -G wireshark openhab
chmod +x /usr/bin/dumpcap

Then at the karaf console:

openhab> shell:exec /usr/bin/dumpcap -P -w /openhab/userdata/atv1.pcap
Capturing on 'eth0'
                   File: /openhab/userdata/atv1.pcap

If you’re using linux you can also try using a thing called a termshark. :wink:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.