Skip to content

System Information

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

System Information

In short

Before benchmarking, YABS prints two information blocks: "Basic System Information" (uptime, CPU, memory, disk, distro, kernel, virtualization, connectivity) and "Network Information" (ISP, ASN, location from a geolocation lookup). Every line is assembled from /proc, sysfs, and a few standard commands — nothing requires root.

For everyone

Basic System Information:
---------------------------------
Uptime     : 47 days, 17 hours, 45 minutes
Processor  : AMD EPYC 7443P 24-Core Processor
CPU cores  : 4 @ 2844.000 MHz
AES-NI     : ✔ Enabled
VM-x/AMD-V : ❌ Disabled
RAM        : 7.8 GiB
Swap       : 2.0 GiB
Disk       : 98.3 GiB
Distro     : Debian GNU/Linux 12 (bookworm)
Kernel     : 6.1.0-26-amd64
VM Type    : KVM
IPv4/IPv6  : ✔ Online / ✔ Online

IPv4 Network Information:
---------------------------------
ISP        : Example Hosting Ltd
ASN        : AS64500 Example Hosting
Host       : Example Hosting
Location   : Nuremberg, Bavaria (BY)
Country    : Germany

Two readings worth internalising:

  • CPU cores : N @ M MHz — on x86 this MHz is the current clock of one core, sampled once at script start. An idle VPS often prints a low value (e.g. 800 MHz); that's the power state, not a defect. On ARM/RISC-V it's the max clock from lscpu/cpufreq, or ??? when unknown.
  • VM-x/AMD-V reports whether the virtualisation flag is exposed to this guest. Disabled inside a VM usually means the host doesn't pass the flag through (no nested virt) — not that the physical CPU lacks it. Same caveat for AES-NI.

Under the hood: line by line

Basic System Information

Line Source Caveats
Uptime uptime output parsed by awk into d days, h hours, m minutes Parser rewritten May 2026 (#92) to handle all uptime formats (days/min/hh:mm).
Processor x86: last model name in /proc/cpuinfo. ARM: lscpu "Model name". RISC-V: lscpu → uarch field → /proc/device-tree/model → "RISC-V", with the base ISA string appended in parentheses RISC-V cpuinfo has no model name; on QEMU the lscpu value may reflect the emulated CPU.
CPU cores x86: count of model name lines. ARM: lscpu CPU(s). RISC-V: count of ^processor lines Logical cores/threads, not necessarily physical.
CPU cores @ MHz x86: last cpu MHz in /proc/cpuinfo — the current frequency of one core. ARM/RISC-V: lscpu "CPU max MHz" → cpufreq sysfs → ??? See "For everyone" — low MHz on idle x86 is normal.
AES-NI x86/ARM: grep aes /proc/cpuinfo. RISC-V: zkn/zknd/zkne in the ISA string Means the flag is exposed, not that the CPU lacks/has it at silicon level.
VM-x/AMD-V x86/ARM: grep 'vmx|svm' /proc/cpuinfo. RISC-V: h extension in the base ISA Same exposure caveat; in containers this reflects host passthrough.
RAM free row 2, column 2 (KiB) → format_size Total, not available. Binary units (KiB/MiB/GiB).
Swap free Swap row, column 2 A host without swap prints 0.0 KiB.
Disk Sum over /proc/mounts entries whose fstype is in simfs ext2 ext3 ext4 btrfs xfs vfat exfat ntfs swap, stat -f -c '%b %S' per mountpoint, deduplicated by source device; fallback: df -t ... --total Dedup fixes double-counting of btrfs subvolumes and bind mounts (#130, Oct 2026). Network filesystems are deliberately never stat'd — a stale NFS/CIFS mount could hang the script. simfs covers OpenVZ.
Distro PRETTY_NAME from /etc/os-release
Kernel uname -r
VM Type systemd-detect-virt, uppercased (KVM, LXC, OPENVZ, DOCKER, WSL, NONE, ...) Prints an empty value when the tool is absent (the script's UNKNOWN fallback is attached to the uppercase assignment, which always succeeds, so it is never reached).
IPv4/IPv6 The connectivity probe done at startup: `ping -4 -6 -c1 -W4 ipv4.google.com/ipv6.google.com, falling back to curl -4

Network Information (ip_info()), skipped by -n

Line Source
Section title http://ip6.me/api/ returns IPv4,<ip> or IPv6,<ip> — whichever the host prefers outbound — deciding the IPv4 Network Information: / IPv6 Network Information: header
ISP, ASN, Host, Location, Country http://ip-api.com/json/<ip> fields isp, as, org, city+regionName+region, country — parsed with sed/awk (no JSON parser dependency)

Constraints and choices:

  • ip-api.com's free tier is HTTP-only, IPv4-only, 45 req/min. An IPv6-only host gets no Network Information section at all — the lookup itself can't happen.
  • The project deliberately kept ip-api over ipinfo.io (#108): ipinfo's free tier lacks separate isp/org, the region code, and the full country name — all of which JSON consumers rely on. (The ip_info JSON keys are part of the public schema — see JSON Output.)
  • Fields come back best-effort: empty isp/as print Unknown; Host/Location/Country lines are omitted entirely when empty.
  • The IPv4/IPv6 line combines the startup probes — ✔ Online / ❌ Offline (v4 up, v6 down) is the most common real-world shape; both-offline triggers the DNS warning at startup.
  • Everything in this section also feeds the JSON ip_info object — same fields, same source.

What's deliberately NOT shown

A few omissions are choices, not gaps:

  • No disk model/serial — proposed and declined (#106): on VPSes the "disk" is a virtual device whose reported model is usually meaningless, so it'd be noise for the majority audience.
  • No CPU steal time / load — the script doesn't sample load; for that context use top/vmstat alongside a run (steal time matters when interpreting Geekbench — see Interpreting Results).
  • No per-core frequencies — one sampled clock (or max) only.
  • No public IPv4 address printed — the IP used for geolocation isn't echoed to the report, only the derived ISP/location fields are.

Per-architecture differences

Aspect x86 (x64/x86) ARM (aarch64/arm) RISC-V (riscv64)
CPU model /proc/cpuinfo model name lscpu "Model name" lscpu → uarch → device-tree → "RISC-V" (+ISA)
Core count model name count lscpu CPU(s) ^processor count
Frequency last cpu MHz (current clock) lscpu "CPU max MHz" else ??? lscpu → cpufreq sysfs → ???
AES detection aes flag aes flag zkn* ISA extensions
Virt detection vmx/svm flags vmx/svm flags h ISA extension
fio file size 2 GiB 512 MiB 512 MiB

The lscpu fallbacks exist because some minimal ARM images lack it, and RISC-V's /proc/cpuinfo contains no model name, cpu MHz, or x86-style flags at all — its capabilities live in the isa/uarch/hart fields.

How the disk total is actually computed

The Disk line is the most subtle piece of the block — it's been fixed twice for real-world edge cases:

  1. Read /proc/mounts; keep only entries whose filesystem type is in simfs ext2 ext3 ext4 btrfs xfs vfat exfat ntfs swap.
  2. For each kept mount, stat -f -c '%b %S' gives blocks × block-size → total KiB.
  3. Sum, deduplicating by source device — a btrfs filesystem mounted as several subvolumes (or bind-mounted elsewhere) shares one device and counts once. Before this dedup (#130, Oct 2026), btrfs/subvolume systems reported several times their real capacity.
  4. If that produced nothing (no /proc/mounts, no stat -f), fall back to df -t <types> --total.

Two deliberate choices hide in there: network filesystems are never stat'd — a stale NFS or CIFS mount can block a statfs call for minutes, so they're excluded at the filter stage, and octal-escaped mountpoints (\040 for spaces) are decoded before stat'ing. Mountpoints are filtered, never blindly enumerated — the failure mode that motivated this was real.

The uptime parser

uptime output varies by system (3 days, 2:14, 45 min, 1:23...) so a single awk program normalizes all shapes into d days, h hours, m minutes. It was rewritten in May 2026 (#92) after edge cases with mixed day/minute formats produced wrong values on some systems.

See also

Clone this wiki locally