Skip to content

Add pscheduler-tool-twampy: TWAMP-Light measurement via Nokia twampy#1626

Open
kaz-tk wants to merge 3 commits into
perfsonar:masterfrom
kaz-tk:feature/pscheduler-tool-twampy
Open

Add pscheduler-tool-twampy: TWAMP-Light measurement via Nokia twampy#1626
kaz-tk wants to merge 3 commits into
perfsonar:masterfrom
kaz-tk:feature/pscheduler-tool-twampy

Conversation

@kaz-tk

@kaz-tk kaz-tk commented Mar 14, 2026

Copy link
Copy Markdown

Summary

  • Add new pscheduler-tool-twampy plugin providing TWAMP-Light measurement support via Nokia twampy
  • Support latency and rtt test types with fragmentation control, DSCP/TOS, configurable packet parameters
  • Include full unit test suite (13 tests) and RPM/DEB packaging

Note: 現時点では TWAMP-Light モードのみ 対応しています。STAMP (RFC 8762) 対応は twampy 側の実装状況に応じて将来追加予定です。

Ref: #1624

Details

Plugin Structure

Follows the standard pscheduler-tool-* plugin layout:

  • can-run — validates test type (latency/rtt), protocol (stamp/twamp), and twampy availability
  • run — builds and executes twampy sender command, parses per-packet output into histograms/statistics
  • duration — calculates expected test duration
  • enumerate — declares tool metadata (name, supported tests, preference)
  • merged-results — combines multi-participant results with flip support
  • participant-data — returns participant-specific metadata

Supported Features

Feature Status
TWAMP-Light protocol ✅ Supported
STAMP protocol (RFC 8762) 🔜 Future (pending twampy support)
Latency test ✅ Supported
RTT test ✅ Supported
Fragmentation control (DF bit) ✅ Supported
DSCP/TOS marking ✅ Supported
Packet count/interval ✅ Supported
Packet padding ✅ Supported
Source address binding ✅ Supported
Timeout configuration ✅ Supported
Histogram output ✅ Supported
Raw packet output ✅ Supported
Reorder/loss detection ✅ Supported

Key Differences from twping

  • Uses Nokia's twampy Python CLI instead of C-based twping
  • Supports fragmentation control (--do-not-fragment)
  • Unauthenticated mode only (TWAMP-Light)
  • STAMP protocol support planned for future release

Test Plan

  • can-run — validates accepted/rejected test types, protocols, fragment option
  • duration — verifies duration calculation with default and custom parameters
  • enumerate — validates JSON schema, tool name, supported tests, preference
  • merged-results — single result, two results, flip option
  • participant-data — returns empty object for single-participant mode
  • E2E test with real TWAMP-Light reflector (requires twampy + reflector environment)

🤖 Generated with Claude Code

laeti-tia and others added 2 commits February 15, 2026 22:05
Adds a new pScheduler tool plugin that provides STAMP (RFC 8762) and
TWAMP protocol support using Nokia's twampy CLI client. Supports
latency and rtt test types with fragmentation control (DF bit),
DSCP/TOS marking, configurable packet count/interval, and source
address binding.

Includes unit tests for all plugin components (can-run, duration,
enumerate, merged-results, participant-data) and full RPM/DEB
packaging.

Ref: perfsonar#1624

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix per-packet regex to match twampy's actual output format:
  "Reply from <IP> [rseq=N sseq=N rtt=Xms outbound=Xms inbound=Xms]"
- Fix summary regex to parse tabular format (Outbound/Inbound/Roundtrip)
- Add --verbose flag (required for per-packet output from twampy)
- Combine stdout+stderr parsing (per-packet goes to stderr via logging)
- Enforce RFC 8762 minimum padding (30 bytes = 44 byte sender packet)
- Map outbound/inbound correctly to T2-T1 / T4-T3 timestamps
- Add clock synchronization note for one-way delay measurements
- Clarify STAMP/TWAMP-Light compatibility in description
- Track both sender and reflector sequence numbers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kaz-tk kaz-tk changed the title Add pscheduler-tool-twampy: STAMP/TWAMP support via Nokia twampy Add pscheduler-tool-twampy: TWAMP-Light measurement via Nokia twampy Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants