Skip to content

Add filters for journalctl and fs_cli (systemd/FreeSWITCH dev workflows) #2259

Open

Description

@Panbaron1

Summary

Requesting RTK filter support for two commands that show up heavily in systemd-service and FreeSWITCH development workflows but currently pass through unfiltered: journalctl and fs_cli.

From rtk discover on a real project (34 sessions, 2880 Bash commands), these were among the top unhandled commands:

  • journalctl — 32 invocations (e.g. journalctl -u portal-backend -u portal-frontend)
  • fs_cli — 29 invocations (e.g. sudo /usr/local/freeswitch/bin/fs_cli -x "sofia status")

Both produce verbose output that is a strong fit for RTK-style compression.

journalctl

Why it's noisy: Default output repeats the full timestamp, hostname, unit, and PID on every line; multi-unit tails (-u a -u b) interleave and balloon fast.

Suggested filter behavior:

  • Strip the redundant per-line hostname and leading year/timezone from timestamps (keep MMM DD HH:MM:SS).
  • Collapse repeated identical log lines into a single line with an (xN) count.
  • Respect -n/--lines, -u, -p/--priority, --since, and -o json (pass JSON through untouched).
  • Preserve full content under -x / when a single line is an error or stacktrace.

fs_cli

Why it's noisy: FreeSWITCH -x command output (e.g. sofia status, show channels, show registrations) is wide ASCII tables with separator rows and trailing row-count footers.

Suggested filter behavior:

  • Drop decorative separator rows (====, ----, +---+).
  • Compress show channels/show registrations tables, keeping headers + data rows, dropping the redundant N total. footer when row count is derivable.
  • Handle the common invocation shapes: fs_cli -x "<cmd>" and absolute-path binaries like /usr/local/freeswitch/bin/fs_cli.
  • Pass through cleanly when output is already small (single OK/error line).

Environment

  • rtk 0.42.1, Linux x86_64 (musl build)
  • Both commands frequently invoked via sudo and with absolute paths — matcher should handle a sudo prefix and full binary paths.

Activity

  1. added
    enhancement
    help wanted
    on Jun 4, 2026
  2. pszymkowiak commented on Jun 4, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    ✨ Category feature
    🟡 Priority medium
    🎯 Confidence 92%

    Summary

    Feature request to add RTK output filters for journalctl and fs_cli, both frequent in systemd/FreeSWITCH workflows; well-specified with usage data from rtk discover.


    Triaged automatically by wshm · This is an automated analysis, not a human review.

  3. lntutor commented on Jul 19, 2026

    @lntutor
    Contributor

    I am working on both requested filters against current develop. I will add failure-safe journalctl compaction with JSON/follow/catalog passthrough and duplicate collapse, plus fs_cli table cleanup with absolute-path and sudo rewrite coverage.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clienhancementhelp wantedpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions