Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Limit TCP Throughput Bandwidth to 500Mb

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Limit TCP Throughput Bandwidth to 500Mb


Chronological Thread 
  • From: Mark Feit <>
  • To: "Yamamoto, Miguel" <>, "" <>
  • Subject: Re: [perfsonar-user] Limit TCP Throughput Bandwidth to 500Mb
  • Date: Thu, 14 Mar 2024 14:01:57 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=internet2.edu; dmarc=pass action=none header.from=internet2.edu; dkim=pass header.d=internet2.edu; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NTI4O3m+LPgl2mPL0jndUnOv4XANNKVHDEMduglBgAA=; b=E/RZM3/psE48Bi8/ci84jtvjFx1CnhHW5P9ZaWRSkfM0N/12fB3JwWmhsAEdl7kBKE3DV379BkmR2OKVuJo+IehtvJMTXpeZnVw15iHU9Iztf+y/RiZrV8KYVlYyC8BkmqGbobm11RhLbrEbBtYy5N+/htG+DYmMgujt5wK4/oXzv3H2LZhDIobnlAlQasdFn2ushDRGozIXd0IhYvFqA6g9klD0tZDjrZWjT2gLlSog6aB+evygG5rE3D+1CtoJ/OOLu+B/Cmpxa7ZzG82Eh4C+lKLNs8RfpHrOM5KYDAz6tM0fEyDYO0Q3XUlkUOvY5/V8kSeRr3lNviOX76nhWQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a3Y9tBxgNbxOeT5ugc7rEE2OJVbce1uuiBk/ov/pE0DCM/Hfmt+8cmRMJBDg3fHJUbSjZeuhehLsR/wwuE+E6nJTcZl9iJpdoML4gQ2ajpzj3LE1cGRqzBQI4kqTQXf7FrWcweWwf9ELn6hx28fHjIJjI24gzPrNGCqKym9D3ob9WxPVm6kUqJg1a8ExNawc7JYgvolUURVfczLfbZ8xCQWxd8IcyyW7ML8MWe+IVhIQIR4HsNTAeU9SLRPHCnnz9c0mdeoA31IwLD7np2sTSEgp4wzJc/UEbqWi6G/5H4RvGipnyEpgFqvZcKXQdeOCsy8UB8gTUvhGtflbN6ozSA==

Yamamoto, Miguel writes:

 

    "rewrite": {

        "script": [

            "500000000 as $max_bw",

            "| if .test.type == \"throughput\"",

            "    and (",

            "      (.test.spec.bandwidth == null)",

            "      or (.test.spec.bandwidth > $max_bw)",

            "    )",

            "    and (classifiers_has (\"friendlies\")",    SEE BELOW

            "  then",

            "    .test.spec.bandwidth = 500000000",

            "    | change(\"Limited to \\($max_bw)\")",

            "  else  . ",

            "  end"

        ]

    },

 

The error:

jq: error: syntax error, unexpected then (Unix shell quoting issues?) at <top-level>, line 30:

  then

jq: 1 compile error

 

The line with the arrow above needs an extra closing parenthesis:

 

            "    and (classifiers_has (\"friendlies\"))",   

 

 

The limit system adds some additional lines of script ahead of your script to make it function properly, which is why the line number is off.  I’ll fix the next release so the line number is correct when there’s an error; for now, subtracting 23 will get you to the right place.

 

--Mark

 




Archive powered by MHonArc 2.6.24.

Top of Page