Add profile filtering and fix DPLL lock detection#7
Open
alegacy wants to merge 2 commits into
Open
Conversation
Parse the config tag from log lines (e.g., ptp4l.0.config from "[ptp4l.0.config:6]") and store it in parsed_data during log parsing. Add optional config_tag parameter to all extraction methods in the log parser for per-profile filtering. Add profile_name parameter to get_ptp_logs, get_grandmaster_status, analyze_sync_status, get_clock_hierarchy, and check_ptp_health tools. The profile name is resolved to a config_tag via the runtime config mapping so the LLM only needs to know profile names, not internal config file paths. This enables correct per-profile analysis in T-BC setups where multiple ptp4l instances produce interleaved log output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Allain Legacy <alegacy@redhat.com>
extract_sync_status was filtering for a "decision" keyword in DPLL log messages that doesn't exist in actual linuxptp-daemon output. Fix to match dpll component logs by the phase_status field from the parsed data instead. phase_status == 3 indicates DPLL locked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Allain Legacy <alegacy@redhat.com>
Contributor
Author
|
@nocturnalastro I've fixed up the profile support and applied it to the existing tools with some cleanup. Once this merges I'll update the other tools in the WIP stack (feature/ai-investigation) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
profile_nameparameter to all log-based MCP tools (get_ptp_logs,get_grandmaster_status,analyze_sync_status,get_clock_hierarchy,check_ptp_health) for per-profile log filtering in multi-profile setups (T-BC, QE multi-clock)get_ptp_logs— it now returns raw log entries only; callers should use dedicated analysis tools insteadextract_sync_statuswas looking for a non-existent "decision" keyword in DPLL messages; now correctly usesphase_statusfrom dpll component logs andIn specfrom Go-style dpll event logsoffset_in_rangesourced from the daemon's own hardware-reportedIn specfield rather than an arbitrary software thresholdTested against cnfdg28 (single OC slave profile) and cnfdg3 (T-BC with tbc-tr and tbc-tt profiles).
🤖 Generated with Claude Code