Skip to navigation

Log Viewer

View as Markdown

Log Viewer provides a browser-based dashboard for real-time analysis of Safety Core logs. It is packaged as a self-contained binary with all runtime dependencies included.

Overview

Log Viewer streams Safety Core logs to a browser-based dashboard. It auto-detects components, parses multiple log formats, and reflects new log entries in near real-time.

PropertyDetails
DeploymentSelf-contained binary with all runtime dependencies bundled
Live updatesNear real-time via Linux inotify
Max log filesUp to 2 files merged into one dashboard
Default port8080 (configurable via --port)

Features

  • Dashboard — per-component tabs with stats, error counts, and timeline charts.
  • Filtering — severity, free-text search, and timestamp range filters per tab.
  • Live tailing — new log entries are reflected in near real-time with smart auto-scroll.
  • Export — HTML, PDF, Excel, and CSV; respects active filters.
  • AI Debug — ask natural-language questions against the live log state; export chat as HTML/PDF.

Launching the tool

pss_log_viewer is distributed separately and is not part of the Safety Core Debian packages or the Safety Core container image. The commands below assume you have already obtained the binary and are running it from its own directory.

The Safety Core writes its logs under /var/log/psf/. Which file holds which component is listed in Launchers and command-line options. In a Docker deployment the SEI daemon, the NvPSD Gateway and the MDX client log to psf.log; with --runtime host and the package’s rsyslog rule installed, their records go to pss.log.

# Single log file (default port 8080)
./pss_log_viewer /var/log/psf/psf.log
# Two log files merged
./pss_log_viewer /var/log/psf/psf.log /var/log/psf/atl_sdm.log
# Custom port
./pss_log_viewer /var/log/psf/psf.log --port 9090
# Large files: load only the last N lines on startup
./pss_log_viewer /var/log/psf/psf.log --last 50000

The tool prints the full network URL on startup, for example http://192.0.2.10:8080. Open it from any browser on the same network.

Launching with AI Debug

The AI Debug tab is an optional feature that enables natural-language querying of the live log state. It supports any LLM inference endpoint that implements the standard Chat Completions API, giving users the flexibility to connect their preferred model and service.

Set the following environment variables before launching:

export PSS_AI_BASE_URL=<your-llm-endpoint-url>
export PSS_AI_MODEL=<your-model-name>
export PSS_AI_API_KEY=<your-api-key>
./pss_log_viewer /var/log/psf/psf.log

All other dashboard features — log viewing, filtering, and export — are available without configuring the AI Debug tab.

CLI reference

Usage: pss_log_viewer [logfile1] [logfile2] [options]
Positional Arguments:
logfiles Path(s) to log file(s). Up to 2 files supported.
Options:
--port, -p Dashboard port (default: 8080)
--last, -n Read only last N lines on startup
-h, --help Show this help message
Environment Variables:
PSS_AI_API_KEY LLM API key — required for AI debug tab
PSS_AI_BASE_URL LLM endpoint URL
PSS_AI_MODEL LLM model name