FQ_CODEL

The following classes provides access to the fq_codel (Fair Queuing with Controlled Delay) queueing discipline and its statistics:


class FQCoDelQDisc(qdisc_handle: Handle, parent_handle: Optional[Handle], *, limit: Optional[int], flows: Optional[int], quantum: Optional[int], target: Optional[float], interval: Optional[float], memory_limit: Optional[int], ecn: Optional[bool])[source]

Bases: QDisc

This class provides access to the Fair Queuing (FQ) with Controlled Delay (fq_codel) queueing discipline (see tc-fq_codel(8))

Parameters:
  • qdisc_handle – handle of this FQCoDelQDisc

  • parent_handle – handle of parent, None if this is a root queuing discipline

  • limit – as documented in tc-fq_codel(8)

  • flows – as documented in tc-fq_codel(8)

  • quantum – as documented in tc-fq_codel(8)

  • target – as documented in tc-fq_codel(8)

  • interval – as documented in tc-fq_codel(8)

  • memory_limit – as documented in tc-fq_codel(8)

  • ecn – as documented in tc-fq_codel(8)

get_packet_limit() Optional[int][source]

Returns packet limit

get_flows() Optional[int][source]

Returns number of flows

get_quantum() Optional[int][source]

Returns quantum

get_memory_limit() Optional[int][source]

Returns memory limit in bytes

get_queue_delay_target() Optional[int][source]

Returns target for the minimum queue delay (in ms)

get_queue_delay_interval() Optional[int][source]

Returns time interval in which to measure queue delay (in ms)

get_ecn() Optional[bool][source]

Returns the ecn value

qdisc_creation_args() List[str][source]

Returns the arguments expected by the tc(8) command to create a fq_codel qdisc

get_description() str[source]

Returns a string describing the qdisc and its attributes

get_stats() Optional[FQCoDelQDiscStats][source]

Returns qdisc stats (an FQCoDelQDiscStats instance) or None if no stats are available.

dump(outfile: TextIO, level=0, qclass_map: Optional[Mapping[Handle, QClass]] = None)

Recursively dump this Qdisc to outfile.

The qclass_map, if present, is used to determine the destination QClass objects of traffic filters.

get_config() QDiscConfig

Returns the QDiscConfig where this QDisc/QClass has been instantiated, or None if not instantiated.

get_handle() Handle

Returns the QDisc/QClass handle

get_interface() Optional[str]

Returns the interface where this QDisc/QClass has been instantiated, or None if the QDisc/QClass is not instantiated.

get_parent_handle() Optional[Handle]

Returns the handle of the parent of this QDisc/QClass

is_default() bool

Returns True if this QDisc is the default qdisc used by the kernel.

static is_ingress() bool

Returns True if this QDisc is the ingress qdisc

is_root() bool

Returns True if this is a root QDisc

FQCoDelQDiscStats

class FQCoDelQDiscStats[source]

Bases: QStats

FQCoDelQDisc stats

property maxpacket: int

Size of largest packet seen

property drop_overlimit: int

Number of packets dropped because the queue was full.

property new_flow_count: int

Returns number of times a new flow was identified.

property ecn_packets: int

Number of packets that were ECN marked (instead of dropped)

property new_flows_len: int

Number of new flows.

This value is not a statistic; it reflects the qdisc state at the time the stats were obtained.

property old_flows_len: int

Number of old flows.

This value is not a statistic; it reflects the qdisc state at the time the stats were obtained.

dump(outfile: TextIO, width: Optional[int] = None) None[source]

Dump stats to outfile. There is one stat per line output. Each line has the format:

header: value

The header: part occupies at least width characters.

property bitrate: int

Consumed bandwidth measured in bits/sec

property bytes_sent: int

Number of bytes sent.

property dropped_packets: int

Number of packets dropped.

get_byte_backlog() int

Queue backlog in bytes

get_overlimits() int

Number of times a packet was delayed due to rate limits.

get_packet_backlog() int

Queue backlog in packets

property packetrate: int

Consumed bandwidth measured in packets/sec

property packets_sent: int

Number of packets sent.

property requeued_packets: int

Number of packets that were requeued for some reason.