isochron-send(8)
β¨ isochron-send(8) β¨
okay bestie, sit DOWN, because we're about to talk about isochron-send from the ISOCHRON family of manual pages, section 8, and it's giving very serious networking main character energy π
πΈ NAME πΈ
isochron-send β start an isochron test while playing the role of the sender π«Ά
π¦ SYNOPSIS π¦
isochron send [OPTIONS]
π DESCRIPTION π
this command sends test packets, and it does it using whatever transport you told it to use β either plain Ethernet or UDP. that's the whole vibe. simple. iconic. no cap. β¨
π OPTIONS π
so like. here's every single flag, and yes we're doing ALL of them, because we don't skip. periodt. π
-h,--helpβ prints the short help message and then dips out. that's it, that's the flag. π«-i,--interface <IFNAME>β tells everyone which network interface the packets are gonna be sent on. pick your fave. π-d,--dmac <MACADDRESS>β sets the destination MAC address for the test packets. it should match the MAC address that the receiver is listening for, so coordinate with your bestie on the other end, fr fr. it can be either unicast or multicast. this one is only necessary for the L2 transport (plain Ethernet). it's optional if you also passed--client, because in that case the sender can just go ask the receiver directly what destination MAC address it's listening for. π-A,--smac <MACADDRESS>β sets the source MAC address for the test packets. optional, and it defaults to the network interface's unicast address. only necessary for the L2 transport. π-p,--priority <NUMBER>β sets theSO_PRIORITY(that's the traffic class) that gets communicated to the kernel for the test packets. qdiscs liketc-mqprioortc-taprioactually use this. optional, defaults to0. πΈ-P,--stats-port <NUMBER>β sets the TCP port where the receiver program is listening for incoming connections. this socket is the management-and-statistics socket, iykyk. optional, defaults to port5000. π-b,--base-time <TIME>β sets the scheduled transmission time for the very first packet. you can shift this forward and backwards in time later with the--shift-timeargument. here's the cute part: this time is allowed to be in the past, and if it is, it gets automatically advanced by an integer number of cycles until it's larger than the current time by at least one second. the time base isCLOCK_TAI. optional, defaults to0. β°-a,--advance-time <TIME>β sets how far in advance of the scheduled packet transmission time isochron will wake up. optional, and it defaults to the cycle time minus the window size, which means the sender wakes up at the earliest possible moment and gets the longest possible amount of time to prepare for transmission. bestie said "early bird gets the worm" π¦-S,--shift-time <TIME>β shifts the base time by the specified amount of nanoseconds, either into the past or into the future. this is super useful when you're enqueuing packets into a NIC that uses atc-taprioqdisc and the time slot for your application's traffic class is not the first one. when you use it that way, you can set the application's base time equal to the base time of thetc-taprioschedule, and set the shift time to the length of all the time slots that come before the one your application should enqueue in. optional, defaults to0. π¦-c,--cycle-time <TIME>β sets the interval between consecutive wakeup times, for the purpose of sending a packet. π«-w,--window-size <TIME>β when the NIC uses atc-taprioschedule, this sets the duration in nanoseconds of the time slot that corresponds to the application's priority. this stops isochron from waking up too early and potentially enqueuing the packet prematurely into its time slot from the previous cycle. with a correctly configured window size, the wakeup time gets set no earlier than the end of the previous time slot, which makes that condition impossible (assuming proper system clock synchronization, obviously). optional, defaults to0. π₯-n,--num-frames <NUMBER>β sets how many packets to send for this test. optional β and if you leave it unspecified, the program just runs indefinitely, but it will not collect logs. go off, infinite loop, we guess π-s,--frame-size <NUMBER>β sets the size of the test frames. the size is counted from the first octet of the destination MAC address all the way until the last octet of data before the FCS. measure carefully, bestie π-T,--no-tsβ disables the whole process of collecting TX timestamps. π-v,--vid <NUMBER>β inserts a VLAN header with the specified VLAN ID into the test packets. the VLAN PCP gets set equal to the priority you configured with--priority. this has lower overhead compared to using a kernel VLAN interface to insert the VLAN tag, so it's the efficient choice, and we love that. optional, defaults to no VLAN header being inserted at all. π-C,--client <IPADDRESS>β sets the IPv4 or IPv6 address where the receiver is listening for management/statistics connections. optional, and it defaults to not attempting to connect to the receiver. and when you don't connect, the sender operates in a limited mode where it does not collect logs and does not check the receiver's sync status or its expected destination MAC address. also, the receiver won't log packets unless the sender connects to it, so like... keep that in mind. π-q,--quietβ when the sender is not connected to the receiver's management/statistics socket, it will by default print the packets and their TX timestamps to standard output at the end of the test. this option suppresses that print. optional, defaults tofalse. shhh π€«-e,--etype <NUMBER>β sets the EtherType for test packets sent using the L2 transport. optional, defaults to0xdead. cute hex, love that for us π-o,--omit-syncβ when set, the sender will not monitor the local ptp4l and phc2sys processes for synchronization status (and optionally the remote ones too, if--clientis being used), and it'll just proceed to send test packets regardless. optional, defaults tofalse. chaotic but valid β¨-y,--omit-remote-syncβ when set, it will only monitor the sync status of the local station. the assumption here is that the receiver interface is implicitly synchronized (it shares the same PHC as the sender interface), and therefore no ptp4l instance runs on it, so the sync status can't be monitored anyway. optional, defaults tofalse. π§-m,--tracemarkβ when set, the sender writes to the kernel's ftrace buffer to mark the moment it wakes up to transmit a packet, plus the moment right after the packet has been enqueued into the kernel. this is the debugging bestie for latency issues β use it together withtrace-cmdandkernelshark, because the packet's sequence number gets logged, which means latencies reported by the isochron report can be quickly associated with the kernel trace buffer. optional, defaults tofalse. π-Q,--taprioβ when set, the sender records this information to the output file. this changes how the logged data is interpreted β for example, withtc-taprio, TX timestamps are expected to be higher than the scheduled transmission time, whereas otherwise they're expected to be lower. you're expected to set this option when you're enqueuing to a NIC wheretc-tapriois the qdisc. π-x,--txtimeβ when set, the sender uses theSO_TXTIMEsocket option when enqueuing packets to the kernel. this also changes the interpretation of logged data, similar to--taprio. the TX time that the sender requests is equal to the scheduled transmission time for the packet. you're expected to set this option when enqueuing to a NIC wheretc-etfis the qdisc. π₯-D,--deadlineβ when set, this sets theSOF_TXTIME_DEADLINE_MODEflag for the data socket. heads up: this can only be used together with--txtime. this option changes the kernel's interpretation of the TX time β it's no longer the PTP time at which the packet should be sent, but rather the latest moment in time at which the packet should be sent. so like, the deadline. obviously. β³-f,--sched-fifoβ when set, the program requests that the kernel change its scheduling policy toSCHED_FIFOfor the duration of the test. π-r,--sched-rrβ when set, the program requests that the kernel change its scheduling policy toSCHED_RRfor the duration of the test. π-H,--sched-priority <NUMBER>β when either--sched-fifoor--sched-rris being used, the program requests that the kernel change its scheduling priority for the duration of the test. β-M,--cpu-mask <NUMBER>β a bit mask of the CPUs on which the sender thread is allowed to be scheduled. note that the program's other threads are not affected by this selection. optional, defaults to the CPU affinity of the isochron process. π-O,--utc-tai-offset <NUMBER>β the program uses theCLOCK_TAItime base for its timers and for all reported timestamps, and this option specifies the correction in seconds to apply to software timestamps, which the kernel takes in theCLOCK_REALTIME(UTC) time base. if this option is present, isochron will also change the kernel'sCLOCK_TAIoffset to the specified value, to make sure its timers fire correctly. if the option is absent, isochron queries the kernel'sCLOCK_TAIoffset and tries to use that. and if isochron can also query the UTC offset from ptp4l'sTIME_PROPERTIES_DATA_SETusing management messages, it does that too and compares that offset to the kernel's UTC offset. plot twist: the UTC offset reported by ptp4l has the highest priority, so if the application detects that it's different from the kernel'sCLOCK_TAIoffset, it changes the kernel offset to the value queried from ptp4l. ptp4l is the one in charge here, basically π-J,--ip-destination <IPADDRESS>β sets the IPv4 or IPv6 address of the receiver, which gets placed in the test packet datagrams. mandatory if the UDP transport is used, no exceptions. also, a heads up: when you're using the UDP transport, the destination IP address should have a static entry in the kernel's IP neighbor table, to avoid unpredictable latencies caused by the kernel's neighbor resolution process. and one more thing β the isochron program does not have control over which interface gets used for sending the test packets, so you (yes, you, bestie) should make sure the kernel's routing table will select the correct interface for this destination IP address. the program is not gonna hold your hand on this one π«Ά-2,--l2β this option specifies that the plain Ethernet transport should be used for the test packets. optional, defaults totrue. and it cannot be used together with--l4. pick a lane, we can't do both π
ok and that's the end of part one, bestie β there's more coming, so don't go anywhere π
-4,--l4β bestie, this one says "we're doing UDP for the test packets." π Optional, and it defaults to false. β οΈ You cannot use it together with--l2, okay? Pick a lane. π£οΈ-W,--data-port <NUMBER>β if you went with the UDP transport, this is the destination UDP port for test packets. π― Optional, defaults to6000. That's the whole vibe. β¨-U,--unix-domain-socket <PATH>β so isochron finds out whatptp4lis up to by creating and sending PTP management messages over a local UNIX domain socket. 𧦠This option tells it where that socket lives in the filesystem. Optional, defaults to/var/run/ptp4l. π-N,--domain-number <NUMBER>β this is thedomainNumbervalue used when constructing the PTP management messages that get sent to theptp4lprocess. π¨ It must match thedomainNumberthatptp4lis using, otherwise it literally will not respond to management messages and you'll be sitting there like ποΈπποΈ. Optional, defaults to0.-t,--transport-specific <NUMBER>β same energy, different field: this provides thetransportSpecificvalue used when constructing PTP management messages sent toptp4l. π°οΈ It must coincide with thetransportSpecificthatptp4luses, or again β no response, ghosted. π Optional, defaults to0. And heads up π«Ά: PTP variants like IEEE 802.1AS/gPTP need this set to a different value, such as1.-X,--sync-threshold <TIME>β when the program is set up to monitor the sync status ofptp4landphc2sys, this specifies the positive threshold in nanoseconds that the absolute offset reported by those external programs has to beat to count as "good enough to start the test." π Mandatory β unless you passed--omit-sync, in which case you're off the hook. π-R,--num-readings <NUMBER>β okay so here's what isochron does: it monitors the synchronization quality between the NIC's PTP Hardware Clock (PHC) and the system time by reading the system time, then the PHC time, then the system time again β several times in a row β and then it picks the group of 3 time readouts that took the least amount of time overall. π΅οΈββοΈ Iconic detective work, honestly. This option says how many readouts happen before picking the fastest one. Optional, defaults to5. β±οΈ-F,--output-file <PATH>β save the packet timestamps to a file so you can query them later withisochron report. π Defaults toisochron.dat. This requires the--clientoption, because logging only TX timestamps is not supported β the girlies need both sides of the story. π
π EXAMPLES π
Wanna spin up an isochron sender with PTP synchronization and a tc-taprio qdisc? Say less. π
ip link set eth0 up && ip addr add 192.168.100.1/24 dev eth0
ptp4l -i eth0 -2 -P --step_threshold 0.00002 &
phc2sys -a -rr --step_threshold 0.00002 &
tc qdisc add dev eth0 root taprio num_tc 5 \
map 0 1 2 3 4 \
queues 1@0 1@1 1@2 1@3 1@4 \
base-time 0 \
sched-entry S 10 50000 \
sched-entry S 0f 450000 \
flags 2
taskset $((1 << 0)) isochron send \
--cpu-mask $((1 << 1)) \
--interface eth0 \
--cycle-time 0.0005 \
--frame-size 64 \
--num-frames 1000000 \
--client 192.168.100.2 \
--quiet \
--sync-threshold 2000 \
--output-file isochron.dat \
--taprio \
--priority 4 \
--sched-rr \
--sched-priority 98 \
--window-size 50000
Copy it, run it, thrive. π«Άβ¨
π AUTHOR π
isochron was written by Vladimir Oltean vladimir.oltean@nxp.com π
π¦ SEE ALSO π¦
isochron(8) isochron-rcv(8) isochron-report(1) β go read them, they're all part of the same slay. π
π¬ COMMENTS π¬
This man page was written using pandoc by the same author. π
And that's a wrap, bestie!! πΈ This was the isochron-send(8) manual page β that's the source and the version footer vibe right there, with its date and everything. Not me getting emotional over a man page ππ Go forth and send some packets. Periodt. π β¨
π¦ where this page comes from
- debian trixie: isochron 0.9-0.2 Β· GPL-2.0-only
- ubuntu questing: isochron 0.9-0.2
- ubuntu resolute: isochron 0.9-0.2build1 Β· GPL-2.0-only
- ubuntu stonking: isochron 0.9-0.2build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms