← All procedures

algebra.tbfBuckets

This function gives the depths of the buckets of a tbf qdisc and its largest packet.

CLI
Package
@procedures/algebra · README
Path
["algebra","tbfBuckets"]
CLI
mark algebra tbfBuckets --queue <object>
As data
{"$proc":["algebra","tbfBuckets"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/algebra/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["algebra","tbfBuckets"], { queue: {} });
console.log(JSON.stringify(result));

From the command line

$ mark algebra tbfBuckets --queue <object>

As data, in a program

{ "$proc": ["algebra", "tbfBuckets"], "input": { "queue": {} } }

Input

FieldTypeRequiredDefaultDescription
queueobjectyes

Output

FieldTypeRequiredDefaultDescription
buffernumberyesThis value is the depth of the bucket of the rate, in nanoseconds.
mtunumberyesThis value is the depth of the bucket of the peak rate, in nanoseconds, or 0 with no peak rate.
maxSizenumberyesThis value is the largest qdisc length that tbf takes, in bytes.
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "queue": {
        "type": "object",
        "properties": {
          "rate": {
            "type": "object",
            "properties": {
              "rate": {
                "type": "number",
                "description": "This value is the rate in bytes per second."
              },
              "overhead": {
                "type": "number",
                "description": "This value is the overhead that the rate adds to each length."
              },
              "mpu": {
                "type": "number",
                "description": "This value is the least length that the rate counts."
              },
              "linklayer": {
                "type": "string",
                "enum": [
                  "atm",
                  "ethernet"
                ],
                "description": "An ATM link counts the length in cells of 48 bytes, and each cell takes 53 bytes."
              }
            },
            "required": [
              "rate"
            ],
            "additionalProperties": {}
          },
          "burst": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          },
          "peak": {
            "type": "object",
            "properties": {
              "burst": {
                "type": "number",
                "description": "This value is the depth of the bucket of the peak rate, in bytes (`TCA_TBF_PBURST`)."
              },
              "rate": {
                "type": "number",
                "description": "This value is the rate in bytes per second."
              },
              "overhead": {
                "type": "number",
                "description": "This value is the overhead that the rate adds to each length."
              },
              "mpu": {
                "type": "number",
                "description": "This value is the least length that the rate counts."
              },
              "linklayer": {
                "type": "string",
                "enum": [
                  "atm",
                  "ethernet"
                ],
                "description": "An ATM link counts the length in cells of 48 bytes, and each cell takes 53 bytes."
              }
            },
            "required": [
              "burst",
              "rate"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "rate",
          "burst",
          "limit"
        ],
        "additionalProperties": {}
      }
    },
    "required": [
      "queue"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "object",
    "properties": {
      "buffer": {
        "type": "number",
        "description": "This value is the depth of the bucket of the rate, in nanoseconds."
      },
      "mtu": {
        "type": "number",
        "description": "This value is the depth of the bucket of the peak rate, in nanoseconds, or 0 with no peak rate."
      },
      "maxSize": {
        "type": "number",
        "description": "This value is the largest qdisc length that tbf takes, in bytes."
      }
    },
    "required": [
      "buffer",
      "mtu",
      "maxSize"
    ],
    "additionalProperties": {}
  }
}