Skip to content

JSON Output and Integrations

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

JSON Output and Integrations

In short

YABS can emit its entire report as one JSON document — print it (-j), save it (-w), or POST it (-s) to a result-collection site. Several community sites accept these submissions and let you compare your server against others. The JSON schema is treated as a public contract: fields are only ever added, never renamed or repurposed.

Enabling JSON output

Flag Effect
-j Print the JSON document to stdout after YABS completed in ...
-w <file> Write the JSON document to <file> in the current directory
-s <url> POST the document to <url> with Content-Type: application/json — accepts a comma-separated list of URLs

The three flags are independent and can be combined (-j -w out.json -s https://...). JSON is only built if at least one is given. Skipped tests simply have no corresponding section — a -fig run still emits version, time, os, net, cpu, mem, ip_info (unless -n), and runtime.

Schema reference

Top level (in emission order): version, time, os, net, cpu, mem, ip_info, partition, fio, iperf, geekbench, runtime.

Key Type Units / format Where it comes from
version string e.g. "v2026-10-31" YABS_VERSION
time string YYYYMMDD-HHMMSS local time date at script start
os.arch string x64, x86, aarch64, arm, riscv64 uname -m mapping
os.distro string PRETTY_NAME /etc/os-release
os.kernel string e.g. "6.8.0-31-generic" uname -r
os.uptime number seconds, float (e.g. 29615719.72) /proc/uptime field 1
os.vm string uppercased, e.g. "KVM", "LXC", "NONE" systemd-detect-virt
net.ipv4 / net.ipv6 boolean connectivity probe (ping/icanhazip.com)
cpu.model string /proc/cpuinfo / lscpu (per arch)
cpu.cores number logical cores /proc/cpuinfo or lscpu
cpu.freq string e.g. "4693.667 MHz", may be "??? MHz" current/max clock — see System Information
cpu.aes / cpu.virt boolean cpuinfo flags / ISA string
mem.ram / mem.swap number ram_units/swap_units say "KiB" — accurate free column 2
mem.disk number disk_units says "KB" — actually KiB (1024-based) /proc/mounts + stat -f, see caveat
ip_info.* strings protocol, isp, asn, org, city, region, region_code, country ip6.me + ip-api.com
partition string device, e.g. "/dev/sda1", "/dev/mapper/vg0-root" df -P .
fio[] array one object per block size (4k, 64k, 512k, 1m) fio terse output
fio[].bs string block size
fio[].speed_r/speed_w/speed_rw number speed_units says "KBps" — actually KiB/s; speed_rw = read + write fio fields 7/48
fio[].iops_r/iops_w/iops_rw number IOPS fio fields 8/49
iperf[] array one object per server per IP mode iperf3 client output
iperf[].mode string "IPv4" or "IPv6"
iperf[].provider / iperf[].loc string e.g. "Clouvider", "London, UK (10G)" server list
iperf[].send / iperf[].recv string e.g. "1.61 Gbits/sec", "940 Mbits/sec" (iperf3 prints 3 significant figures), or "busy " (trailing space) [SUM] receiver line
iperf[].latency string e.g. "77.5 ms", or "--" single ping -c1
geekbench[] array one object per version run Geekbench
geekbench[].version number 4, 5, 6, or 7
geekbench[].single / multi number or null Geekbench score stdout or results page
geekbench[].url string browser.geekbench.com result URL
runtime.start / end / elapsed number epoch seconds date +%s

Example document (current schema, v2026-10-31)

Hand-constructed to match exactly what the code emits today — note partition (added November 2023), the current server list, and the GB6-only default:

{
	"version": "v2026-10-31",
	"time": "20261031-141522",
	"os": {
		"arch": "x64",
		"distro": "Debian GNU/Linux 12 (bookworm)",
		"kernel": "6.1.0-26-amd64",
		"uptime": 4123445.18,
		"vm": "KVM"
	},
	"net": {
		"ipv4": true,
		"ipv6": true
	},
	"cpu": {
		"model": "AMD EPYC 7443P 24-Core Processor",
		"cores": 4,
		"freq": "2844.000 MHz",
		"aes": true,
		"virt": false
	},
	"mem": {
		"ram": 8150232,
		"ram_units": "KiB",
		"swap": 2097148,
		"swap_units": "KiB",
		"disk": 103079820,
		"disk_units": "KB"
	},
	"ip_info": {
		"protocol": "IPv4",
		"isp": "Example Hosting Ltd",
		"asn": "AS64500 Example Hosting",
		"org": "Example Hosting",
		"city": "Nuremberg",
		"region": "Bavaria",
		"region_code": "BY",
		"country": "Germany"
	},
	"partition": "/dev/vda2",
	"fio": [
		{"bs": "4k", "speed_r": 412208, "iops_r": 103052, "speed_w": 413913, "iops_w": 103478, "speed_rw": 826121, "iops_rw": 206530, "speed_units": "KBps"},
		{"bs": "64k", "speed_r": 410055, "iops_r": 6407, "speed_w": 415020, "iops_w": 6484, "speed_rw": 825075, "iops_rw": 12891, "speed_units": "KBps"},
		{"bs": "512k", "speed_r": 390114, "iops_r": 762, "speed_w": 401772, "iops_w": 784, "speed_rw": 791886, "iops_rw": 1546, "speed_units": "KBps"},
		{"bs": "1m", "speed_r": 398802, "iops_r": 389, "speed_w": 418003, "iops_w": 408, "speed_rw": 816805, "iops_rw": 797, "speed_units": "KBps"}
	],
	"iperf": [
		{"mode": "IPv4", "provider": "Clouvider", "loc": "London, UK (10G)", "send": "940 Mbits/sec", "recv": "935 Mbits/sec", "latency": "8.14 ms"},
		{"mode": "IPv4", "provider": "Eranium", "loc": "Amsterdam, NL (100G)", "send": "938 Mbits/sec", "recv": "942 Mbits/sec", "latency": "11.2 ms"},
		{"mode": "IPv4", "provider": "Uztelecom", "loc": "Tashkent, UZ (10G)", "send": "busy ", "recv": "312 Mbits/sec", "latency": "98.7 ms"},
		{"mode": "IPv4", "provider": "Leaseweb", "loc": "Singapore, SG (10G)", "send": "255 Mbits/sec", "recv": "289 Mbits/sec", "latency": "182 ms"},
		{"mode": "IPv4", "provider": "Clouvider", "loc": "Los Angeles, CA, US (10G)", "send": "301 Mbits/sec", "recv": "344 Mbits/sec", "latency": "141 ms"},
		{"mode": "IPv4", "provider": "Leaseweb", "loc": "NYC, NY, US (10G)", "send": "498 Mbits/sec", "recv": "512 Mbits/sec", "latency": "78.3 ms"},
		{"mode": "IPv4", "provider": "Edgoo", "loc": "Sao Paulo, BR (1G)", "send": "118 Mbits/sec", "recv": "130 Mbits/sec", "latency": "196 ms"},
		{"mode": "IPv6", "provider": "Clouvider", "loc": "London, UK (10G)", "send": "941 Mbits/sec", "recv": "938 Mbits/sec", "latency": "8.22 ms"}
	],
	"geekbench": [
		{"version": 6, "single": 1420, "multi": 4410, "url": "https://browser.geekbench.com/v6/cpu/12345678"}
	],
	"runtime": {
		"start": 1793441722,
		"end": 1793442265,
		"elapsed": 543
	}
}

Notes on this example: on a dual-stack host, the iperf array really contains all 7 servers again under "mode": "IPv6" (every current server supports both) — only one is shown here for brevity. And the shipped bin/example.json documents schema v2023-04-23 — it predates partition and shows older servers; the document above reflects the current code.

Unit and type gotchas

Read this before writing a consumer — several labels lie for historical reasons:

  • mem.disk is KiB, not KB. disk_units: "KB" is a schema label kept for compatibility; the value is 1024-based like ram/swap. Treat it as KiB.
  • fio speed_* values are KiB/s, not KB/s. speed_units: "KBps" is likewise a compatibility label. Multiply by 1.024 for true kB/s.
  • iperf[].send/recv/latency are strings, exactly as printed: "1.61 Gbits/sec", "busy " (with a trailing space when the unit is empty), or "--" for missing latency. Parse the numeric prefix and normalize the unit yourself (Mbits/sec vs Gbits/sec).
  • cpu.freq is a string ("2844.000 MHz", or "??? MHz" when undetectable).
  • geekbench[].single/multi can be null when the run uploaded but scores could not be parsed (fixed May 2026, #127); before that fix the slot was left empty ("single":,), producing invalid JSON.
  • os.uptime is seconds with a fractional part (straight from /proc/uptime).

Submission sites

-s was added in August 2022 in response to #9 (opened 2020) and is opt-in only — results are never sent anywhere unless you ask. The README lists these receivers:

Site Submit URL / notes
YABSdb https://yabsdb.com/add
VPSBenchmarks https://www.vpsbenchmarks.com/yabs/upload
serverlist.dev https://serverlist.dev/api/v1/yabs/submit
ServerVerify submit via your ServerVerify account
VPS Host Review https://vpshostreview.com/yabs

Example: curl -sL yabs.sh | bash -s -- -s https://yabsdb.com/add

Writing your own receiver

-s performs an ordinary JSON POST — one request per comma-separated URL, at end of run:

curl -s -H "Content-Type:application/json" -X POST --data '<the-json-document>' <your-url>

(without curl, YABS uses the wget --post-data equivalent). A minimal receiver is any HTTP endpoint that stores the request body, e.g. netcat for a quick check:

nc -l 8080   # then run: bash yabs.sh -s http://127.0.0.1:8080/

Schema stability

The JSON keys are consumed by third-party sites and archived results; changes are additive only. Key renames, removed keys, or changed value formats/units are treated as breaking the public schema and are not accepted. If you need a new field, propose adding it alongside the existing ones.

See also

Clone this wiki locally