DRR¶
The following classes provides access to the drr
(deficit round robin) queueing discipline
and its statistics:
- class DRRQDisc(handle: Handle, parent_handle: Optional[Handle])[source]¶
Bases:
QDiscThis class provides access to the multiqueue (
drr) queueing discipline of Linux- Parameters:
handle –
Handleof thisQDiscparent_handle –
Handleof the parent of thisQDisc(ifNone, this is a rootQDisc)
- qdisc_creation_args() List[str][source]¶
Returns the arguments expected by the tc(8) command to create a DRR qdisc
- dump(outfile: TextIO, level=0, qclass_map: Optional[Mapping[Handle, QClass]] = None)¶
Recursively dump this
Qdisctooutfile.The
qclass_map, if present, is used to determine the destinationQClassobjects of traffic filters.
- get_config() QDiscConfig¶
Returns the
QDiscConfigwhere thisQDisc/QClasshas been instantiated, orNoneif not instantiated.
- get_description() str¶
Return a string that fully describes this
QDisc
- get_handle() Handle¶
Returns the
QDisc/QClasshandle
- get_interface() Optional[str]¶
Returns the interface where this
QDisc/QClasshas been instantiated, orNoneif theQDisc/QClassis not instantiated.
- get_parent_handle() Optional[Handle]¶
Returns the handle of the parent of this
QDisc/QClass
- is_default() bool¶
Returns
Trueif thisQDiscis the default qdisc used by the kernel.
- static is_ingress() bool¶
Returns
Trueif thisQDiscis the ingress qdisc
- is_root() bool¶
Returns
Trueif this is a rootQDisc
- class DRRQClass(class_handle: Handle, parent_handle: Handle, *, quantum: int)[source]¶
Bases:
QClassA class of the
DRRQDisc(drr) queuing discipline.- Parameters:
- get_stats() Optional[DRRQClassStats][source]¶
Returns class stats (an
DRRQClassStatsinstance) orNoneif no stats are available.
- dump(outfile: TextIO, level: int, qclass_map: Optional[Mapping[Handle, QClass]] = None)¶
Recursively dump this
QClasstooutfile.The
qclass_map, if present, is used to determine the destinationQClassobjects of traffic filters.
- get_class_name() str¶
Returns the class name
- get_config() QDiscConfig¶
Returns the
QDiscConfigwhere thisQDisc/QClasshas been instantiated, orNoneif not instantiated.
- get_handle() Handle¶
Returns the
QDisc/QClasshandle
- get_interface() Optional[str]¶
Returns the interface where this
QDisc/QClasshas been instantiated, orNoneif theQDisc/QClassis not instantiated.
- get_parent_handle() Optional[Handle]¶
Returns the handle of the parent of this
QDisc/QClass
- get_qdisc() Optional[QDisc]¶
Returns the
QDiscunder thisQClass; returnsNoneif there is noQDisc, or if this is not a leaf queuing class
- is_leaf() bool¶
Returns
Trueif this is a leaf queuing class
- set_class_name(class_name: str) None¶
Sets the class name
- class DRRQClassStats[source]¶
Bases:
QStatsDRR-specific class stats (see
QStatsfor inherited stats)- property deficit: int¶
Byte deficit
- 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 leastwidthcharacters.
- 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.