This on a Pi B4 running Buster
This Pi runs a shell script once every two minutes that captures an image from a USB webcam, badges that image and then uploads it to a web host. The script keeps a detailed log, a complete two minute segment of which is at the end of this post. I also have a watchdog set up that reboots the Pi if no image is captured after five minutes. This happens four or five times a day. I'd like to be able to look at logs to see what's going on, but can't figure out where to look.
/var/log/messages shows the watchdog reboot at Oct 15 23:50:05, but doesn't have anything for the two hours (?) before that:
The ~/webcam.log Shows the image uploaded at Wed Oct 15 23:38:06 but has no entries for the next eleven minutes when the watchdog reboot happens:
(The webcam is here: Bus 001 Device 003: ID 32e4:9230. That device ID has no associated manufacturer.)
I'm guess that the time disconnect may be due to the Pi's lack of a clock. But, doesn't time go on even when there is no clock to measure it? Shouldn't things be logged even when the time is incorrect?
What follows is the webcam log for a full cycle from one image to the next, two minutes later:
This Pi runs a shell script once every two minutes that captures an image from a USB webcam, badges that image and then uploads it to a web host. The script keeps a detailed log, a complete two minute segment of which is at the end of this post. I also have a watchdog set up that reboots the Pi if no image is captured after five minutes. This happens four or five times a day. I'd like to be able to look at logs to see what's going on, but can't figure out where to look.
/var/log/messages shows the watchdog reboot at Oct 15 23:50:05, but doesn't have anything for the two hours (?) before that:
Code:
Oct 15 21:01:07 raspmountain kernel: [ 123.780123] NET: Registered protocol fa$Oct 15 21:01:08 raspmountain kernel: [ 123.804553] cryptd: max_cpu_qlen set to$Oct 15 23:50:05 raspmountain kernel: [ 0.000000] Booting Linux on physical C$Oct 15 23:50:05 raspmountain kernel: [ 0.000000] Linux version 5.10.103-v7l+$Code:
Wed Oct 15 23:38:05 +07 2025 Adjustments -level 23%,37% -quality 90Wed Oct 15 23:38:06 +07 2025 Convert ended, uploading file size 65156Wed Oct 15 23:49:07 +07 2025 Watchdog checkBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power SupplyBus 001 Device 003: ID 32e4:9230Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubWed Oct 15 23:49:38 +07 2025 Raspmountain RebootI'm guess that the time disconnect may be due to the Pi's lack of a clock. But, doesn't time go on even when there is no clock to measure it? Shouldn't things be logged even when the time is incorrect?
What follows is the webcam log for a full cycle from one image to the next, two minutes later:
Code:
Thu Oct 16 08:18:16 +07 2025 Upload Ended 0 - raspmountainThu Oct 16 08:18:16 +07 2025 Archive ImageThu Oct 16 08:18:16 +07 2025 image_081.jpgThu Oct 16 08:18:16 +07 2025 all finishedThu Oct 16 08:20:06 +07 2025 Mountain CamThu Oct 16 08:20:07 +07 2025 Start Mountain Image CaptureThu Oct 16 08:20:07 +07 2025 Start Image Capture No 1--- Opening /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0...Trying source module v4l2.../dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index0 opened.No input was specified, using the first.--- Capturing 10 frames...Skipping 50 frames...Capturing 10 frames...Captured 60 frames in 1.30 seconds. (46 fps)--- Processing captured image...Disabling banner.Setting output format to WEBP, quality 100Writing WEBP image to '/home/pi/webcam/webcammtn.webp'.Thu Oct 16 08:20:10 +07 2025 ChaAm Mountain Returned error 0Thu Oct 16 08:20:10 +07 2025 Webp size: 133658Thu Oct 16 08:20:10 +07 2025 Sunwait: DAYThu Oct 16 08:20:10 +07 2025 File Size: DAYThu Oct 16 08:20:10 +07 2025 converting imageThu Oct 16 08:20:10 +07 2025 Adjustments -auto-gamma -auto-level -quality 90Thu Oct 16 08:20:11 +07 2025 Convert ended, uploading file size 154054Thu Oct 16 08:20:17 +07 2025 Upload Ended 0 - raspmountainThu Oct 16 08:20:17 +07 2025 Archive ImageThu Oct 16 08:20:17 +07 2025 image_082.jpgThu Oct 16 08:20:17 +07 2025 all finishedStatistics: Posted by Ratsima — Thu Oct 16, 2025 1:41 am — Replies 1 — Views 29