Linux command
cytune 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Get current threshold and timeout values
cytune -g /dev/ttyC0
Get default threshold and timeout values
cytune -G /dev/ttyC0
Set current threshold value
cytune -s [8] /dev/ttyC0
Set current flush timeout value
cytune -t [10] /dev/ttyC0
Set both threshold and timeout
cytune -s [8] -t [10] /dev/ttyC0
Set default threshold for next open
cytune -S [8] /dev/ttyC0
Gather statistics at an interval
cytune -q -i [5] /dev/ttyC0
说明
cytune is a utility for tuning the interrupt threshold and flush timeout parameters for Cyclades-Z multiport serial card drivers. These parameters affect how the driver buffers data before triggering an interrupt, balancing latency against CPU overhead. Each serial line on a Cyclades card has a 12-byte FIFO for input and output. The threshold specifies how many characters must be present in the FIFO before an interrupt is raised. Higher values reduce interrupt overhead but increase latency. If set too high, the FIFO can overflow and characters will be lost. The flush timeout ensures data is delivered even when the threshold is not reached. Default thresholds are set based on baud rate when the tty is opened: 10 for 50-4800 baud, 8 for 9600, 4 for 19200, 2 for 38400, 1 for 57600+.
参数
- -s _VALUE_
- Set the current threshold to VALUE characters (1-12). Resets on next open if the tty is not held open.
- -S _VALUE_
- Set the default threshold to VALUE characters (1-12). Applied when the tty is next opened.
- -t _VALUE_
- Set the current flush timeout to VALUE units (0-255). Each unit is 5ms. Zero forces the default timeout.
- -T _VALUE_
- Set the default flush timeout to VALUE units. Applied when the tty is next opened.
- -g
- Get current threshold and timeout values.
- -G
- Get default threshold and flush timeout values.
- -q
- Gather and report driver statistics (interrupts and characters transferred). Only available if the driver was compiled with ENABLE_MONITORING.
- -i _interval_
- Statistics gathering interval in seconds (used with -q).
FAQ
What is the cytune command used for?
cytune is a utility for tuning the interrupt threshold and flush timeout parameters for Cyclades-Z multiport serial card drivers. These parameters affect how the driver buffers data before triggering an interrupt, balancing latency against CPU overhead. Each serial line on a Cyclades card has a 12-byte FIFO for input and output. The threshold specifies how many characters must be present in the FIFO before an interrupt is raised. Higher values reduce interrupt overhead but increase latency. If set too high, the FIFO can overflow and characters will be lost. The flush timeout ensures data is delivered even when the threshold is not reached. Default thresholds are set based on baud rate when the tty is opened: 10 for 50-4800 baud, 8 for 9600, 4 for 19200, 2 for 38400, 1 for 57600+.
How do I run a basic cytune example?
Run `cytune -g /dev/ttyC0` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -s _VALUE_ do in cytune?
Set the current threshold to VALUE characters (1-12). Resets on next open if the tty is not held open.