Skip to content

Command Line Flags

Mason Rowe edited this page Oct 31, 2026 · 1 revision

Command-Line Flags

In short

Every YABS feature can be turned on or off with single-letter flags. The defaults are: disk test on, network test on, Geekbench 6 on, no JSON. When you pipe the script to bash, flags go after bash -s -- (e.g. curl -sL yabs.sh | bash -s -- -fig). Flags can be combined (-fg, -95).

Full flag reference

Parsed by getopts 'bfdignhr45796jw:s:p:' — letters with : take an argument.

Flag Effect Notes
-b Prefer the precompiled repo binaries over locally installed fio/iperf3. Without it, local fio/iperf3 on PATH are used when present.
-f Skip the fio disk benchmark. -f and -d are aliases; -d is kept for historical reasons ("disk").
-d Same as -f.
-i Skip the iperf3 network speed tests.
-g Skip all Geekbench tests.
-n Skip the Network Information lookup (ip6.me + ip-api.com) — the ISP/ASN/location section. Does not skip the iperf tests; only the geolocation printout.
-h Print usage, detected arch/flags/binaries/connectivity/JSON options, then exit. A dry run — no tests execute.
-r Reduced network test: only 3 iperf locations instead of 7. Uses Clouvider London, Leaseweb Singapore, Leaseweb NYC. Lessens bandwidth use. (The README's server names for -r are stale — trust this list, it matches the code.)
-4 Run Geekbench 4 instead of Geekbench 6.
-5 Run Geekbench 5 instead of Geekbench 6.
-7 Run Geekbench 7 instead of Geekbench 6.
-9 Run Geekbench 4 and 5 instead of Geekbench 6. Mnemonic: 4 + 5 = 9.
-6 Run Geekbench 6 in addition to whichever of -4/-5/-7/-9 are set. Ordering matters — see below.
-j Print the JSON result to stdout at the end.
-w <file> Write the JSON result to <file> in the current directory. Created/overwritten at end of run.
-s <url> POST the JSON result to <url> (comma-separated for multiple). Content-Type: application/json POST; plain JSON body. See JSON Output and Integrations.
-p <servers> Replace the iperf server list with your own. Format below.

An unknown flag aborts the script immediately (exit code 1).

Common combinations

curl -sL yabs.sh | bash -s -- -fig   # system info only — no tests at all
curl -sL yabs.sh | bash -s -- -ig    # disk only
curl -sL yabs.sh | bash -s -- -fg    # network only
curl -sL yabs.sh | bash -s -- -fi    # Geekbench only
curl -sL yabs.sh | bash -s -- -r     # full run, reduced bandwidth
curl -sL yabs.sh | bash -s -- -j -w results.json -s https://example.com/yabs

-f -i -g -n is the standard "does the script still work" smoke test — it prints system info and exits in seconds.

Geekbench selection

Geekbench 6 is enabled by default. -4, -5, -7, and -9 each replace it (they unset GB6); -6 re-enables GB6. Because flags are processed left to right:

  • -45 → GB4 + GB5 (same as -9)
  • -96 → GB4 + GB5 + GB6
  • -6 -9 → GB4 + GB5 only — the later -9 unsets the GB6 that -6 enabled. -6 must come last.
  • -76 → GB6 + GB7

Whatever the flag order, the selected versions always execute in the sequence 4 → 5 → 6 → 7.

If ./geekbench.license exists in the directory you run from, YABS runs geekbenchN --unlock "$(cat geekbench.license)" before the test (format: email@domain.com ABCDE-12345-FGHIJ-57890). This unlocks the licensed features of a purchased Geekbench key. The license file is yours to create; it is not produced by YABS.

Custom iperf servers: -p

Format (five colon-separated fields per server, servers separated by commas):

-p "host:port_range:name:location:network_modes[,host:port_range:name:location:network_modes,...]"

Worked example:

curl -sL yabs.sh | bash -s -- -p "iperf.example.net:5201-5210:MyHost:Frankfurt DE (1G):IPv4|IPv6,speedtest.example.org:5200-5209:Other:Paris FR (10G):IPv4"
  • port_range is low-high; YABS picks a random port in the range for each attempt.
  • network_modes controls which passes the server appears in: IPv4, IPv6, or IPv4|IPv6.
  • An entry that does not split into exactly 5 colon-separated fields is skipped with Invalid server format: <entry> (expected format: host:port_range:name:location:network_modes).

Known limitations: no field may contain a colon (it is the delimiter), and no field may contain a comma — London, UK (10G) parses as two servers and both get rejected. Use e.g. London UK (10G) instead.

-h output (real, captured from yabs.sh v2026-10-31)

# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2026-10-31                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

Sat Oct 31 02:13:22 EDT 2026

Usage: ./yabs.sh [-flags]
       curl -sL yabs.sh | bash
       curl -sL yabs.sh | bash -s -- -flags
       wget -qO- yabs.sh | bash
       wget -qO- yabs.sh | bash -s -- -flags

Flags:
       -b : prefer pre-compiled binaries from repo over local packages
       -f/d : skips the fio disk benchmark test
       -i : skips the iperf network test
       -g : skips the geekbench performance test
       -n : skips the network information lookup and print out
       -h : prints this lovely message, shows any flags you passed,
            shows if fio/iperf3 local packages have been detected,
            then exits
       -r : reduce number of iperf3 network locations (to only three)
            to lessen bandwidth usage
       -4 : use geekbench 4 instead of geekbench 6
       -5 : use geekbench 5 instead of geekbench 6
       -7 : use geekbench 7 instead of geekbench 6
       -9 : use both geekbench 4 AND geekbench 5 instead of geekbench 6
       -6 : use geekbench 6 in addition to 4, 5, and/or 7 (only needed if -4, -5, -7, or -9 are set; -6 must come last)
       -j : print jsonified YABS results at conclusion of test
       -w <filename> : write jsonified YABS results to disk using file name provided
       -s <url> : send jsonified YABS results to URL
       -p <servers> : specify custom iperf servers (format: host:port_range:name:location:network_modes)
                      multiple servers separated by commas
                      example: -p "example.com:5201-5210:MyServer:New York (10G):IPv4|IPv6"

Detected Arch: x64

Detected Flags:
       running geekbench 6

Local Binary Check:
       fio not detected, will download precompiled binary
       iperf3 not detected, will download precompiled binary
       tar detected, required to extract geekbench

Detected Connectivity:
       IPv4 connected
       IPv6 not connected

JSON Options:
       none

Exiting...

Use -h before a real run to sanity-check flag parsing, binary availability, and connectivity on a new host.

See also

Clone this wiki locally