I have created a (needlessly complicated) networking setup that I tried to create by following this guide.

I have colosally screwed up and now my RPi will disconnect randomly and requires a reboot to fix - even when plugged in via Ethernet. This issue seems to occur randomly and is very rare (I've seen it 5-6 times in two weeks)

Because my Pi 3B+ is running headless (dietpi, no HDMI), the only ways I can communicate with it are:

  1. SSH over the LAN
  2. UART

I have successfully enabled UART, and can see kernel boot messages with screen, but I can't see any logs related to networking.

I have enabled uart in the /boot/config.txt, and my /boot/cmdline.txt looks like this:

dwc_otg.lpm_enable=0 debug console=serial0,115200 root=PARTUUID=27504eef-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait noswap ro fastboot

But this only shows kernel boot logs. After the device boots up I cannot see anything else coming through screen.

How can I see networking/ more verbose logs on my headless RPi while it is having networking issues?

  • Do you have the command line interface enabled to login on the serial debug console connected with sreen? B.t.w. screen is good but it may be confused if you use multiple sessions (screen within screen and so on). I prefer to use tio. – Ingo Oct 19 '19 at 10:11
  • 1
    Except for some trivia at boot, the console messages are only high priority errors. You can change that, but then it becomes increasingly cluttered with messages from various things, making it difficult for what I think are your purposes. You might as well just read through /var/log/syslog; I think this is still used by default; if not you can use journald, which is probably better anyway if you are trying to target a specific service (eg. dhcpcd).... – goldilocks Oct 19 '19 at 12:49
  • 1
    ...Either way you need to log in on the console (which can be awkward if there are a lot of log messages being generated, as they persist after you log in, so asking for more such messages would be counter-productive in this context). – goldilocks Oct 19 '19 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.