5 Commits

Author SHA1 Message Date
Mason Rowe
edfdf8e511 Modify fio build process to use EXTLIBS
Updated build-fio.yml to include EXTLIBS for make.
2025-12-29 02:28:19 -05:00
Mason Rowe
8eac4a01f4 Remove duplicate checkout steps in build-fio.yml
Removed redundant checkout steps from the workflow.
2025-12-29 01:58:19 -05:00
Mason Rowe
0e07af99a0 Add LDFLAGS for atomic library during build 2025-12-29 01:56:09 -05:00
Mason Rowe
069c70708d Modify build-fio.yml to include CFLAGS
Add CFLAGS to include linux/falloc.h during build.
2025-12-29 01:49:04 -05:00
Mason Rowe
f994de59e9 Simplify directory change command for fio build 2025-12-29 01:27:35 -05:00
3 changed files with 30 additions and 41 deletions

View File

@@ -10,9 +10,6 @@ jobs:
latest-version: ${{ steps.get-version.outputs.version }} latest-version: ${{ steps.get-version.outputs.version }}
should-build: ${{ steps.check-version.outputs.should-build }} should-build: ${{ steps.check-version.outputs.should-build }}
steps: steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get latest fio release - name: Get latest fio release
id: get-version id: get-version
run: | run: |
@@ -58,9 +55,6 @@ jobs:
host: arm-linux-gnueabihf host: arm-linux-gnueabihf
steps: steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@@ -107,9 +101,10 @@ jobs:
cd ~ cd ~
curl -L -4 --retry 5 --retry-delay 2 --connect-timeout 15 "https://github.com/axboe/fio/archive/\$VERSION.tar.gz" -o "fio.tar.gz" curl -L -4 --retry 5 --retry-delay 2 --connect-timeout 15 "https://github.com/axboe/fio/archive/\$VERSION.tar.gz" -o "fio.tar.gz"
tar xf fio.tar.gz tar xf fio.tar.gz
cd fio-\${VERSION#fio-}* cd fio*
CFLAGS+=' -include linux/falloc.h'
CC=/root/\$CROSS-cross/bin/\$CROSS-gcc ./configure --disable-native --build-static CC=/root/\$CROSS-cross/bin/\$CROSS-gcc ./configure --disable-native --build-static
make make EXTLIBS+=' -latomic'
# verify no external shared library links # verify no external shared library links
libcheck fio libcheck fio

View File

@@ -7,17 +7,15 @@ Logo design by [Dian Pratama](https://github.com/dianp)
This script automates the execution of the best benchmarking tools in the industry. Included are several tests to check the performance of critical areas of a server: disk performance with [fio](https://github.com/axboe/fio), network performance with [iperf3](https://github.com/esnet/iperf), and CPU/memory performance with [Geekbench](https://www.geekbench.com/). The script is designed to not require any external dependencies to be installed nor elevated privileges to run. If there are any features that you would like to see added, feel free to submit an issue describing your feature request or fork the project and submit a PR! This script automates the execution of the best benchmarking tools in the industry. Included are several tests to check the performance of critical areas of a server: disk performance with [fio](https://github.com/axboe/fio), network performance with [iperf3](https://github.com/esnet/iperf), and CPU/memory performance with [Geekbench](https://www.geekbench.com/). The script is designed to not require any external dependencies to be installed nor elevated privileges to run. If there are any features that you would like to see added, feel free to submit an issue describing your feature request or fork the project and submit a PR!
View Daily and Historical 📊 **[YABS Usage Stats Here](https://stats.yabs.sh/)** 📈 ([source](https://github.com/masonr/yabs-stats)).
### **What's New With YABS?** ### **What's New With YABS?**
* [04 Jul 2026](https://stats.yabs.sh/) - Check out YABS usage stats here -> https://stats.yabs.sh/
* [27 Feb 2023](https://github.com/masonr/yet-another-bench-script/commit/06eaa2ab3b32355bec8278c51c4be93b3662a96d) - Newly released [Geekbench 6](https://www.geekbench.com/) is added as the default Geekbench test. * [27 Feb 2023](https://github.com/masonr/yet-another-bench-script/commit/06eaa2ab3b32355bec8278c51c4be93b3662a96d) - Newly released [Geekbench 6](https://www.geekbench.com/) is added as the default Geekbench test.
* [26 Feb 2023](https://github.com/masonr/yet-another-bench-script/commit/f075baf59c3057983fff0a30ea0c746b5ea88d91) - Network information added to YABS output using [ip-api](https://ip-api.com/). * [26 Feb 2023](https://github.com/masonr/yet-another-bench-script/commit/f075baf59c3057983fff0a30ea0c746b5ea88d91) - Network information added to YABS output using [ip-api](https://ip-api.com/).
* [15 Aug 2022](https://github.com/masonr/yet-another-bench-script/commit/ae24e70fbf7a4848e81a70cf829ec44e060e63d5) - Added JSON output/upload support to export or auto-upload of YABS results for sharing.
## How to Run ## How to Run
``` ```
curl -sL yabs.sh | bash curl -sL https://yabs.sh | bash
``` ```
or or
@@ -37,7 +35,7 @@ wget -qO- yabs.sh | bash
### Flags (Skipping Tests, Reducing iperf Locations, Geekbench 4/5/6, etc.) ### Flags (Skipping Tests, Reducing iperf Locations, Geekbench 4/5/6, etc.)
``` ```
curl -sL yabs.sh | bash -s -- -flags curl -sL https://yabs.sh | bash -s -- -flags
``` ```
| Flag | Description | | Flag | Description |
@@ -75,9 +73,8 @@ Sites supporting submission of YABS JSON results:
| Website | Example Command | | Website | Example Command |
| --- | --- | | --- | --- |
| [YABSdb](https://yabsdb.com/) | `curl -sL yabs.sh \| bash -s -- -s "https://yabsdb.com/add"` | | [YABSdb](https://yabsdb.com/) | `curl -sL https://yabs.sh \| bash -s -- -s "https://yabsdb.com/add"` |
| [VPSBenchmarks](https://www.vpsbenchmarks.com/yabs/get_started) | `curl -sL yabs.sh \| bash -s -- -s https://www.vpsbenchmarks.com/yabs/upload` | | [VPSBenchmarks](https://www.vpsbenchmarks.com/yabs/get_started) | `curl -sL https://yabs.sh \| bash -s -- -s https://www.vpsbenchmarks.com/yabs/upload` |
| [ServerVerify](https://serververify.com/benchmarks) | (sign up for account) |
Example JSON output: [example.json](bin/example.json). Example JSON output: [example.json](bin/example.json).

47
yabs.sh
View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Yet Another Bench Script by Mason Rowe # Yet Another Bench Script by Mason Rowe
# Initial Oct 2019; Last update Jul 2026 # Initial Oct 2019; Last update Apr 2025
# Disclaimer: This project is a work in progress. Any errors or suggestions should be # Disclaimer: This project is a work in progress. Any errors or suggestions should be
# relayed to me via the GitHub project page linked below. # relayed to me via the GitHub project page linked below.
@@ -12,7 +12,7 @@
# performance via fio. The script is designed to not require any dependencies # performance via fio. The script is designed to not require any dependencies
# - either compiled or installed - nor admin privileges to run. # - either compiled or installed - nor admin privileges to run.
YABS_VERSION="v2026-07-03" YABS_VERSION="v2025-04-20"
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
echo -e '# Yet-Another-Bench-Script #' echo -e '# Yet-Another-Bench-Script #'
@@ -235,7 +235,7 @@ function format_size {
echo -e echo -e
echo -e "Basic System Information:" echo -e "Basic System Information:"
echo -e "---------------------------------" echo -e "---------------------------------"
UPTIME=$(uptime | awk -F'( |,|:)+' '{d=h=m=0; if ($7=="min") m=$6; else {if ($7~/^day/) {d=$6; if ($9~/^min/) m=$8; else {h=$8;m=$9}} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}') UPTIME=$(uptime | awk -F'( |,|:)+' '{d=h=m=0; if ($7=="min") m=$6; else {if ($7~/^day/) {d=$6;h=$8;m=$9} else {h=$6;m=$7}}} {print d+0,"days,",h+0,"hours,",m+0,"minutes"}')
echo -e "Uptime : $UPTIME" echo -e "Uptime : $UPTIME"
# check for local lscpu installs # check for local lscpu installs
if command -v lscpu >/dev/null 2>&1; then if command -v lscpu >/dev/null 2>&1; then
@@ -383,18 +383,16 @@ function catch_abort() {
# format_speed # format_speed
# Purpose: This method is a convenience function to format the output of the fio disk tests which # Purpose: This method is a convenience function to format the output of the fio disk tests which
# always returns a result in KiB/s (fio terse v3 bandwidth fields are always KiB/s regardless # always returns a result in KB/s. If result is >= 1 GB/s, use GB/s. If result is < 1 GB/s
# of --kb_base setting). Converts KiB/s to decimal units (KB/s, MB/s, GB/s) for display. # and >= 1 MB/s, then use MB/s. Otherwise, use KB/s.
# Conversion: multiply KiB/s by 1024 to get bytes/s, then divide by 1000, 1000000, or
# 1000000000 to get KB/s, MB/s, or GB/s respectively.
# Thresholds (in KiB/s): >= 976563 -> GB/s, >= 977 -> MB/s, otherwise -> KB/s
# Parameters: # Parameters:
# 1. RAW - the raw disk speed result (in KiB/s) # 1. RAW - the raw disk speed result (in KB/s)
# Returns: # Returns:
# Formatted disk speed in GB/s, MB/s, or KB/s # Formatted disk speed in GB/s, MB/s, or KB/s
function format_speed { function format_speed {
RAW=$1 # disk speed in KiB/s RAW=$1 # disk speed in KB/s
RESULT=$RAW RESULT=$RAW
local DENOM=1
local UNIT="KB/s" local UNIT="KB/s"
# ensure raw value is not null, if it is, return blank # ensure raw value is not null, if it is, return blank
@@ -403,19 +401,18 @@ function format_speed {
return 0 return 0
fi fi
# check if disk speed >= 1 GB/s (976563 KiB/s = 1,000,000,000 bytes/s) # check if disk speed >= 1 GB/s
if [ "$RAW" -ge 976563 ]; then if [ "$RAW" -ge 1000000 ]; then
DENOM=1000000
UNIT="GB/s" UNIT="GB/s"
RESULT=$(awk -v a="$RAW" 'BEGIN { print a * 1024 / 1000000000 }') # check if disk speed < 1 GB/s && >= 1 MB/s
# check if disk speed >= 1 MB/s (977 KiB/s ~ 1,000,000 bytes/s) elif [ "$RAW" -ge 1000 ]; then
elif [ "$RAW" -ge 977 ]; then DENOM=1000
UNIT="MB/s" UNIT="MB/s"
RESULT=$(awk -v a="$RAW" 'BEGIN { print a * 1024 / 1000000 }')
else
# convert KiB/s to KB/s (multiply by 1.024)
RESULT=$(awk -v a="$RAW" 'BEGIN { print a * 1024 / 1000 }')
fi fi
# divide the raw result to get the corresponding formatted result (based on determined unit)
RESULT=$(awk -v a="$RESULT" -v b="$DENOM" 'BEGIN { print a / b }')
# shorten the formatted result to two decimal places (i.e. x.xx) # shorten the formatted result to two decimal places (i.e. x.xx)
RESULT=$(echo "$RESULT" | awk -F. '{ printf "%0.2f",$1"."substr($2,1,2) }') RESULT=$(echo "$RESULT" | awk -F. '{ printf "%0.2f",$1"."substr($2,1,2) }')
# concat formatted result value with units and return result # concat formatted result value with units and return result
@@ -572,9 +569,9 @@ elif [ -z "$SKIP_FIO" ]; then
# Proceed only if a relevant ZFS path was found # Proceed only if a relevant ZFS path was found
if [[ -n "$long" ]]; then if [[ -n "$long" ]]; then
# Get the 'Avail' space directly for the detected path and explicitly for ZFS type # Get the 'Avail' space directly for the detected path and explicitly for ZFS type
# The 'Avail' column is the 5th field in `df -Th` output (-T adds a Type column, shifting fields right) # The 'Avail' column is the 4th field in `df -Th` output
# Example: '7.3T', '104G', '17G' # Example: '7.3T', '104G', '17G'
avail_space_with_unit=$(df -Th | grep -w "$long" | awk '$2 == "zfs" {print $5; exit}') avail_space_with_unit=$(df -Th | grep -w "$long" | awk '$2 == "zfs" {print $4; exit}')
# If a valid free space value was extracted # If a valid free space value was extracted
if [[ -n "$avail_space_with_unit" ]]; then if [[ -n "$avail_space_with_unit" ]]; then
@@ -801,7 +798,7 @@ function iperf_test {
done done
# Run a latency test via ping -c1 command -> will return "xx.x ms" # Run a latency test via ping -c1 command -> will return "xx.x ms"
[[ -n $LOCAL_PING ]] && LATENCY_RUN="$(ping "$FLAGS" -c1 "$URL" 2>/dev/null | grep -o 'time=.*' | sed 's/time=//')" [[ -n $LOCAL_PING ]] && LATENCY_RUN="$(ping -c1 "$URL" 2>/dev/null | grep -o 'time=.*' | sed s/'time='//)"
[[ -z $LATENCY_RUN ]] && LATENCY_RUN="--" [[ -z $LATENCY_RUN ]] && LATENCY_RUN="--"
# parse the resulting send and receive speed results # parse the resulting send and receive speed results
@@ -975,8 +972,8 @@ function launch_geekbench {
|| GB_URL="https://cdn.geekbench.com/Geekbench-5.5.1-Linux.tar.gz" || GB_URL="https://cdn.geekbench.com/Geekbench-5.5.1-Linux.tar.gz"
GB_CMD="geekbench5" GB_CMD="geekbench5"
else # Geekbench v6 else # Geekbench v6
[[ $ARCH = *aarch64* || $ARCH = *arm* ]] && GB_URL="https://cdn.geekbench.com/Geekbench-6.7.1-LinuxARMPreview.tar.gz" \ [[ $ARCH = *aarch64* || $ARCH = *arm* ]] && GB_URL="https://cdn.geekbench.com/Geekbench-6.5.0-LinuxARMPreview.tar.gz" \
|| GB_URL="https://cdn.geekbench.com/Geekbench-6.7.1-Linux.tar.gz" || GB_URL="https://cdn.geekbench.com/Geekbench-6.5.0-Linux.tar.gz"
GB_CMD="geekbench6" GB_CMD="geekbench6"
fi fi
GB_RUN="True" GB_RUN="True"
@@ -1040,7 +1037,7 @@ function launch_geekbench {
printf "%-15s | %-30s\n" "Full Test" "$GEEKBENCH_URL" printf "%-15s | %-30s\n" "Full Test" "$GEEKBENCH_URL"
if [[ -n $JSON ]]; then if [[ -n $JSON ]]; then
JSON_RESULT+='{"version":'$VERSION',"single":'${GEEKBENCH_SCORES_SINGLE:-null}',"multi":'${GEEKBENCH_SCORES_MULTI:-null} JSON_RESULT+='{"version":'$VERSION',"single":'$GEEKBENCH_SCORES_SINGLE',"multi":'$GEEKBENCH_SCORES_MULTI
JSON_RESULT+=',"url":"'$GEEKBENCH_URL'"},' JSON_RESULT+=',"url":"'$GEEKBENCH_URL'"},'
fi fi