Skip to content

fix(camera_viz): read sender logs with journalctl --user-unit - #1547

Open
gsalazarestr wants to merge 1 commit into
NVIDIA:mainfrom
gsalazarestr:fix/camera-viz-service-logs-user-unit
Open

gsalazarestr wants to merge 1 commit into
NVIDIA:mainfrom
gsalazarestr:fix/camera-viz-service-logs-user-unit

Conversation

@gsalazarestr

@gsalazarestr gsalazarestr commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes nvbug 7111694

./camera_viz.sh service-logs runs journalctl --user -u camera-streamer.service -f on the robot. journalctl --user only reads the user's own journal
files, which journald writes only when persistent storage (/var/log/journal) exists. On a Jetson AGX Thor without it, the user service's log lines are
only in the system journal, so service-logs prints No journal files were found. while the sender is running and logging (service-status shows the
lines).

This switches to journalctl --user-unit camera-streamer.service -f, which matches the user unit in every journal the user can read, so it works with and
without persistent storage. It needs read access to the system journal (adm or systemd-journal), which the default nvidia user has.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

On a Jetson AGX Thor sender (release/1.7.x, deployed with ./camera_viz.sh deploy, no /var/log/journal, user nvidia in adm):

$ journalctl --user -u camera-streamer.service --since "-1 hour" -n 5 --no-pager
No journal files were found.
$ journalctl --user-unit camera-streamer.service --since "-1 hour" -n 5 --no-pager
Nov 17 14:27:18 ... systemd[2309]: Stopping camera-streamer.service - Camera Streamer (camera_viz)...
Nov 17 14:27:18 ... python[223161]: isaaccapture.camera_streamer [INFO] received signal 15, stopping...
Nov 17 14:27:18 ... systemd[2309]: Stopped camera-streamer.service - Camera Streamer (camera_viz).

bash -n passes on the script. The line is identical on release/1.7.x, so the commit cherry-picks cleanly.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation (none needed; the documented command is unchanged)
  • I have added tests that prove my fix/feature works (or explained why not): needs a remote Jetson; verified manually as above
  • I have signed off all my commits (git commit -s) per the DCO

Summary by CodeRabbit

  • Bug Fixes
    • Improved service log selection in the camera visualization example. Logs now correspond to the intended user-level service, making the example’s displayed service output more accurate. Camera visualization behavior is unchanged.

`camera_viz.sh service-logs` ran `journalctl --user -u camera-streamer.service`,
which only reads the user's own journal files. journald writes those only
with persistent storage; on a Jetson AGX Thor without /var/log/journal the
user service's logs live only in the system journal, so service-logs printed
"No journal files were found." while the sender was running and logging.

`journalctl --user-unit` matches the user unit in every journal the user can
read (the default nvidia user is in adm), so it finds the logs in both cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Grecia Salazar Estrada <gsalazarestr@nvidia.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

cmd_service_logs now passes --user-unit to journalctl instead of --user -u when following the service journal.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: Minimal · up to 9a6c8

The service-logs command now reads sender logs from the system journal when no persistent user journal exists. The change is small and low risk, and it can be merged.

Architecture risk: Low · up to 9a6c8

The change affects 1 system.

Changed systems: examples

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — examples (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in examples/camera_viz/camera_viz.sh: cmd_service_logs now invokes journalctl with --user-unit instead of --user -u when following the service journal.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: the camera_viz sender-log lookup now uses journalctl --user-unit. The raw summary and objectives confirm that cmd_service_logs replaces --user -u with --user-unit so logs i…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: the camera_viz sender-log lookup now uses journalctl --user-unit. The raw summary and objectives confirm that cmd_service_logs replaces --user -u with --user-unit so logs in the system journal can be read on a Jetson without persistent journal storage. The title is specific and matches the single changed line. The conventional-commit prefix is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between dc10c4f and 9a6c834.

Files selected for processing: 1

  • examples/camera_viz/camera_viz.sh

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants