Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/tegrastats_api/model_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ def _monitor_logs(self) -> None:
# Get more historical lines to ensure we capture startup logs
# LLM startup can be verbose, so we need more lines
history_lines = 300 if self.model_type == "llm" else 200
cmd = ["journalctl", "-u", self.service_name, "-f", "-n", str(history_lines)]
# Use stdbuf to force line-buffered output from journalctl
# This prevents log lines from getting stuck in journalctl's buffer
cmd = ["stdbuf", "-oL", "journalctl", "-u", self.service_name, "-f", "-n", str(history_lines)]
self._process = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
Expand Down