update json output; geekbench v6.0.2; update readme

This commit is contained in:
Mason Rowe 2023-04-23 14:23:19 -04:00
parent b7c0b8cfe7
commit 68a571e48b
3 changed files with 141 additions and 178 deletions

View File

@ -1,11 +1,11 @@
# Yet-Another-Bench-Script # Yet-Another-Bench-Script
Here's an attempt to create _yet another_ damn Linux server *bench*marking _script_. Presenting an attempt to create _yet another_ Linux server *bench*marking _script_...
![](https://user-images.githubusercontent.com/8313125/106475387-e1f6da00-6473-11eb-918c-c785ebeef8b9.jpg) ![](https://user-images.githubusercontent.com/8313125/106475387-e1f6da00-6473-11eb-918c-c785ebeef8b9.jpg)
Logo design by [Dian Pratama](https://github.com/dianp) Logo design by [Dian Pratama](https://github.com/dianp)
This script isn't an attempt to be a golden standard. It's just yet another bench script to add to your arsenal. Included are several tests that I think are most beneficial for the end-user. If there's features that you would like to see added, feel free to submit an issue describing your feature request or fork the project! This script throws together and automates the execution of the best benchmarking tools of the biz. 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 YABS usage stats [here](https://yabs.rowe.sh). View YABS usage stats [here](https://yabs.rowe.sh).
@ -26,7 +26,7 @@ or
wget -qO- yabs.sh | bash wget -qO- yabs.sh | bash
``` ```
This script has been tested on the following Linux distributions: CentOS 6+, Debian 8+, Fedora 30, and Ubuntu 16.04+. It is designed to not require any external dependencies to be installed nor elevated privileges to run. This script has been tested on the following Linux distributions: CentOS 6+, Debian 8+, Fedora 30, and Ubuntu 16.04+.
**Local fio/iperf3 Packages**: If the tested system has fio and/or iperf3 already installed, the local package will take precedence over the precompiled binary. **Local fio/iperf3 Packages**: If the tested system has fio and/or iperf3 already installed, the local package will take precedence over the precompiled binary.
@ -36,8 +36,6 @@ This script has been tested on the following Linux distributions: CentOS 6+, Deb
### Flags (Skipping Tests, Reducing iperf Locations, Geekbench 4/5/6, etc.) ### Flags (Skipping Tests, Reducing iperf Locations, Geekbench 4/5/6, etc.)
By default, the script runs all three tests described in the next section below. In the event that you wish to skip one or more of the tests, use the commands below:
``` ```
curl -sL yabs.sh | bash -s -- -flags curl -sL yabs.sh | bash -s -- -flags
``` ```
@ -73,7 +71,15 @@ curl -sL yabs.sh | bash -s -- -s "https://example.com/yabs/post"
JSON results can be sent to multiple endpoints by entering each site joined by a comma (e.g. "https://example.com/yabs/post,http://example.com/yabs2/post"). JSON results can be sent to multiple endpoints by entering each site joined by a comma (e.g. "https://example.com/yabs/post,http://example.com/yabs2/post").
A list of websites supporting acceptance of YABS JSON results will be posted here (when available). Example JSON output: [example.json](bin/example.json). Sites supporting submission of YABS JSON results:
| Website | Example Command |
| --- | --- |
| [YABSdb](https://yabsdb.com/) | `curl -sL yabs.sh \| bash -s -- -s "https://yabsdb.com/add"` |
| [VPSBenchmarks](https://www.vpsbenchmarks.com/yabs/get_started) | `curl -sL yabs.sh \| bash -s -- -5 -6 -s https://www.vpsbenchmarks.com/yabs/upload` |
| [s0c Online](https://s0c.org/) | `curl -sL yabs.sh \| bash -s -- -s https://s0c.org/api/yabs -9` |
Example JSON output: [example.json](bin/example.json).
## Tests Conducted ## Tests Conducted
@ -90,32 +96,32 @@ This script relies on external binaries in order to complete the performance tes
``` ```
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## # # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
# Yet-Another-Bench-Script # # Yet-Another-Bench-Script #
# v2023-02-27 # # v2023-04-23 #
# https://github.com/masonr/yet-another-bench-script # # https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## # # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
Mon 27 Feb 2023 11:03:22 PM EST Sun 23 Apr 2023 01:41:14 PM EDT
Basic System Information: Basic System Information:
--------------------------------- ---------------------------------
Uptime : 288 days, 4 hours, 57 minutes Uptime : 342 days, 18 hours, 35 minutes
Processor : Intel(R) Xeon(R) E-2276G CPU @ 3.80GHz Processor : Intel(R) Xeon(R) E-2276G CPU @ 3.80GHz
CPU cores : 12 @ 4430.782 MHz CPU cores : 12 @ 4693.667 MHz
AES-NI : ✔ Enabled AES-NI : ✔ Enabled
VM-x/AMD-V : ✔ Enabled VM-x/AMD-V : ✔ Enabled
RAM : 15.5 GiB RAM : 15.5 GiB
Swap : 14.9 GiB Swap : 14.9 GiB
Disk : 864.5 GiB Disk : 864.5 GiB
Distro : Ubuntu 20.04.5 LTS Distro : Ubuntu 20.04.6 LTS
Kernel : 5.4.0-110-generic Kernel : 5.4.0-110-generic
VM Type : NONE VM Type : NONE
IPv4/IPv6 : ✔ Online / ✔ Online
Basic Network Information: IPv6 Network Information:
--------------------------------- ---------------------------------
Protocol : IPv4
ISP : Clouvider Limited ISP : Clouvider Limited
ASN : AS62240 Clouvider ASN : AS62240 Clouvider
Host : Clouvider HB Host : USA Network
Location : New York, New York (NY) Location : New York, New York (NY)
Country : United States Country : United States
@ -123,65 +129,57 @@ fio Disk Speed Tests (Mixed R/W 50/50):
--------------------------------- ---------------------------------
Block Size | 4k (IOPS) | 64k (IOPS) Block Size | 4k (IOPS) | 64k (IOPS)
------ | --- ---- | ---- ---- ------ | --- ---- | ---- ----
Read | 416.79 MB/s (104.1k) | 415.00 MB/s (6.4k) Read | 405.41 MB/s (101.3k) | 407.96 MB/s (6.3k)
Write | 417.89 MB/s (104.4k) | 417.19 MB/s (6.5k) Write | 406.48 MB/s (101.6k) | 410.11 MB/s (6.4k)
Total | 834.68 MB/s (208.6k) | 832.20 MB/s (13.0k) Total | 811.90 MB/s (202.9k) | 818.08 MB/s (12.7k)
| | | |
Block Size | 512k (IOPS) | 1m (IOPS) Block Size | 512k (IOPS) | 1m (IOPS)
------ | --- ---- | ---- ---- ------ | --- ---- | ---- ----
Read | 403.89 MB/s (788) | 421.15 MB/s (411) Read | 380.21 MB/s (742) | 394.55 MB/s (385)
Write | 425.35 MB/s (830) | 449.20 MB/s (438) Write | 400.41 MB/s (782) | 420.82 MB/s (410)
Total | 829.24 MB/s (1.6k) | 870.36 MB/s (849) Total | 780.62 MB/s (1.5k) | 815.37 MB/s (795)
iperf3 Network Speed Tests (IPv4): iperf3 Network Speed Tests (IPv4):
--------------------------------- ---------------------------------
Provider | Location (Link) | Send Speed | Recv Speed | Ping Provider | Location (Link) | Send Speed | Recv Speed | Ping
----- | ----- | ---- | ---- | ---- ----- | ----- | ---- | ---- | ----
Clouvider | London, UK (10G) | 1.80 Gbits/sec | 2.40 Gbits/sec | 76.8 ms Clouvider | London, UK (10G) | 1.61 Gbits/sec | 2.39 Gbits/sec | 77.5 ms
Scaleway | Paris, FR (10G) | 2.61 Gbits/sec | 2.39 Gbits/sec | 75.5 ms Scaleway | Paris, FR (10G) | busy | 2.25 Gbits/sec | 83.3 ms
NovoServe | North Holland, NL (40G) | 2.33 Gbits/sec | 2.14 Gbits/sec | 78.4 ms Clouvider | NYC, NY, US (10G) | 9.10 Gbits/sec | 8.85 Gbits/sec | 1.21 ms
Uztelecom | Tashkent, UZ (10G) | 1.21 Gbits/sec | 1.09 Gbits/sec | 158 ms
Clouvider | NYC, NY, US (10G) | 8.94 Gbits/sec | 7.88 Gbits/sec | 0.109 ms
Clouvider | Dallas, TX, US (10G) | 4.99 Gbits/sec | 5.54 Gbits/sec | 34.0 ms
Clouvider | Los Angeles, CA, US (10G) | 2.80 Gbits/sec | 2.69 Gbits/sec | 55.9 ms
iperf3 Network Speed Tests (IPv6): iperf3 Network Speed Tests (IPv6):
--------------------------------- ---------------------------------
Provider | Location (Link) | Send Speed | Recv Speed | Ping Provider | Location (Link) | Send Speed | Recv Speed | Ping
----- | ----- | ---- | ---- | ---- ----- | ----- | ---- | ---- | ----
Clouvider | London, UK (10G) | 2.25 Gbits/sec | 2.40 Gbits/sec | 76.7 ms Clouvider | London, UK (10G) | 2.00 Gbits/sec | 21.1 Mbits/sec | 76.7 ms
Scaleway | Paris, FR (10G) | busy | 2.38 Gbits/sec | 75.5 ms Scaleway | Paris, FR (10G) | 2.66 Gbits/sec | 1.56 Gbits/sec | 75.9 ms
NovoServe | North Holland, NL (40G) | 2.24 Gbits/sec | 2.29 Gbits/sec | 78.4 ms Clouvider | NYC, NY, US (10G) | 3.42 Gbits/sec | 7.80 Gbits/sec | 1.15 ms
Uztelecom | Tashkent, UZ (10G) | 1.16 Gbits/sec | 1.12 Gbits/sec | 158 ms
Clouvider | NYC, NY, US (10G) | 9.16 Gbits/sec | 8.27 Gbits/sec | 0.077 ms
Clouvider | Dallas, TX, US (10G) | 4.52 Gbits/sec | 5.57 Gbits/sec | 33.9 ms
Clouvider | Los Angeles, CA, US (10G) | 2.53 Gbits/sec | 2.78 Gbits/sec | 56.0 ms
Geekbench 4 Benchmark Test: Geekbench 4 Benchmark Test:
--------------------------------- ---------------------------------
Test | Value Test | Value
| |
Single Core | 5976 Single Core | 5949
Multi Core | 22084 Multi Core | 23425
Full Test | https://browser.geekbench.com/v4/cpu/16721228 Full Test | https://browser.geekbench.com/v4/cpu/16746501
Geekbench 5 Benchmark Test: Geekbench 5 Benchmark Test:
--------------------------------- ---------------------------------
Test | Value Test | Value
| |
Single Core | 1077 Single Core | 1317
Multi Core | 4773 Multi Core | 5529
Full Test | https://browser.geekbench.com/v5/cpu/20772711 Full Test | https://browser.geekbench.com/v5/cpu/21102444
Geekbench 6 Benchmark Test: Geekbench 6 Benchmark Test:
--------------------------------- ---------------------------------
Test | Value Test | Value
| |
Single Core | 1524 Single Core | 1549
Multi Core | 4847 Multi Core | 5278
Full Test | https://browser.geekbench.com/v6/cpu/343254 Full Test | https://browser.geekbench.com/v6/cpu/1021916
YABS completed in 16 min 34 sec YABS completed in 12 min 49 sec
``` ```

View File

@ -1,11 +1,12 @@
{ {
"version": "v2023-02-27", "version": "v2023-04-23",
"time": "20230227-230322", "time": "20230423-134114",
"os": { "os": {
"arch": "x64", "arch": "x64",
"distro": "Ubuntu 20.04.5 LTS", "distro": "Ubuntu 20.04.6 LTS",
"kernel": "5.4.0-110-generic", "kernel": "5.4.0-110-generic",
"uptime": 24901047.67 "uptime": 29615719.72,
"vm": "NONE"
}, },
"net": { "net": {
"ipv4": true, "ipv4": true,
@ -14,161 +15,127 @@
"cpu": { "cpu": {
"model": "Intel(R) Xeon(R) E-2276G CPU @ 3.80GHz", "model": "Intel(R) Xeon(R) E-2276G CPU @ 3.80GHz",
"cores": 12, "cores": 12,
"freq": "4430.782 MHz", "freq": "4693.667 MHz",
"aes": true, "aes": true,
"virt": true "virt": true
}, },
"mem": { "mem": {
"ram": 16246580, "ram": 16246580,
"ram_units": "KiB",
"swap": 15625212, "swap": 15625212,
"disk": 906519496 "swap_units": "KiB",
"disk": 906519496,
"disk_units": "KB"
},
"ip_info": {
"protocol": "IPv6",
"isp": "Clouvider Limited",
"asn": "AS62240 Clouvider",
"org": "USA Network",
"city": "New York",
"region": "New York",
"region_code": "NY",
"country": "United States"
}, },
"fio": [{ "fio": [{
"bs": "4k", "bs": "4k",
"speed_r": 416793, "speed_r": 405417,
"iops_r": 104198, "iops_r": 101354,
"speed_w": 417893, "speed_w": 406487,
"iops_w": 104473, "iops_w": 101621,
"speed_rw": 834686, "speed_rw": 811904,
"iops_rw": 208671 "iops_rw": 202975,
"speed_units": "KBps"
}, { }, {
"bs": "64k", "bs": "64k",
"speed_r": 415009, "speed_r": 407967,
"iops_r": 6484, "iops_r": 6374,
"speed_w": 417193, "speed_w": 410114,
"iops_w": 6518, "iops_w": 6408,
"speed_rw": 832202, "speed_rw": 818081,
"iops_rw": 13002 "iops_rw": 12782,
"speed_units": "KBps"
}, { }, {
"bs": "512k", "bs": "512k",
"speed_r": 403890, "speed_r": 380212,
"iops_r": 788, "iops_r": 742,
"speed_w": 425350, "speed_w": 400413,
"iops_w": 830, "iops_w": 782,
"speed_rw": 829240, "speed_rw": 780625,
"iops_rw": 1618 "iops_rw": 1524,
"speed_units": "KBps"
}, { }, {
"bs": "1m", "bs": "1m",
"speed_r": 421159, "speed_r": 394550,
"iops_r": 411, "iops_r": 385,
"speed_w": 449208, "speed_w": 420827,
"iops_w": 438, "iops_w": 410,
"speed_rw": 870367, "speed_rw": 815377,
"iops_rw": 849 "iops_rw": 795,
"speed_units": "KBps"
}], }],
"iperf": [{ "iperf": [{
"mode": "IPv4", "mode": "IPv4",
"provider": "Clouvider", "provider": "Clouvider",
"loc": "London, UK (10G)", "loc": "London, UK (10G)",
"send": "1.80 Gbits/sec", "send": "1.61 Gbits/sec",
"recv": "2.40 Gbits/sec", "recv": "2.39 Gbits/sec",
"latency": "76.8 ms" "latency": "77.5 ms"
}, { }, {
"mode": "IPv4", "mode": "IPv4",
"provider": "Scaleway", "provider": "Scaleway",
"loc": "Paris, FR (10G)", "loc": "Paris, FR (10G)",
"send": "2.61 Gbits/sec", "send": "busy ",
"recv": "2.39 Gbits/sec", "recv": "2.25 Gbits/sec",
"latency": "75.5 ms" "latency": "83.3 ms"
}, {
"mode": "IPv4",
"provider": "NovoServe",
"loc": "North Holland, NL (40G)",
"send": "2.33 Gbits/sec",
"recv": "2.14 Gbits/sec",
"latency": "78.4 ms"
}, {
"mode": "IPv4",
"provider": "Uztelecom",
"loc": "Tashkent, UZ (10G)",
"send": "1.21 Gbits/sec",
"recv": "1.09 Gbits/sec",
"latency": "158 ms"
}, { }, {
"mode": "IPv4", "mode": "IPv4",
"provider": "Clouvider", "provider": "Clouvider",
"loc": "NYC, NY, US (10G)", "loc": "NYC, NY, US (10G)",
"send": "8.94 Gbits/sec", "send": "9.10 Gbits/sec",
"recv": "7.88 Gbits/sec", "recv": "8.85 Gbits/sec",
"latency": "0.109 ms" "latency": "1.21 ms"
}, {
"mode": "IPv4",
"provider": "Clouvider",
"loc": "Dallas, TX, US (10G)",
"send": "4.99 Gbits/sec",
"recv": "5.54 Gbits/sec",
"latency": "34.0 ms"
}, {
"mode": "IPv4",
"provider": "Clouvider",
"loc": "Los Angeles, CA, US (10G)",
"send": "2.80 Gbits/sec",
"recv": "2.69 Gbits/sec",
"latency": "55.9 ms"
}, { }, {
"mode": "IPv6", "mode": "IPv6",
"provider": "Clouvider", "provider": "Clouvider",
"loc": "London, UK (10G)", "loc": "London, UK (10G)",
"send": "2.25 Gbits/sec", "send": "2.00 Gbits/sec",
"recv": "2.40 Gbits/sec", "recv": "21.1 Mbits/sec",
"latency": "76.7 ms" "latency": "76.7 ms"
}, { }, {
"mode": "IPv6", "mode": "IPv6",
"provider": "Scaleway", "provider": "Scaleway",
"loc": "Paris, FR (10G)", "loc": "Paris, FR (10G)",
"send": "busy ", "send": "2.66 Gbits/sec",
"recv": "2.38 Gbits/sec", "recv": "1.56 Gbits/sec",
"latency": "75.5 ms" "latency": "75.9 ms"
}, {
"mode": "IPv6",
"provider": "NovoServe",
"loc": "North Holland, NL (40G)",
"send": "2.24 Gbits/sec",
"recv": "2.29 Gbits/sec",
"latency": "78.4 ms"
}, {
"mode": "IPv6",
"provider": "Uztelecom",
"loc": "Tashkent, UZ (10G)",
"send": "1.16 Gbits/sec",
"recv": "1.12 Gbits/sec",
"latency": "158 ms"
}, { }, {
"mode": "IPv6", "mode": "IPv6",
"provider": "Clouvider", "provider": "Clouvider",
"loc": "NYC, NY, US (10G)", "loc": "NYC, NY, US (10G)",
"send": "9.16 Gbits/sec", "send": "3.42 Gbits/sec",
"recv": "8.27 Gbits/sec", "recv": "7.80 Gbits/sec",
"latency": "0.077 ms" "latency": "1.15 ms"
}, {
"mode": "IPv6",
"provider": "Clouvider",
"loc": "Dallas, TX, US (10G)",
"send": "4.52 Gbits/sec",
"recv": "5.57 Gbits/sec",
"latency": "33.9 ms"
}, {
"mode": "IPv6",
"provider": "Clouvider",
"loc": "Los Angeles, CA, US (10G)",
"send": "2.53 Gbits/sec",
"recv": "2.78 Gbits/sec",
"latency": "56.0 ms"
}], }],
"geekbench": [{ "geekbench": [{
"version": 4, "version": 4,
"single": 5976, "single": 5949,
"multi": 22084, "multi": 23425,
"url": "https://browser.geekbench.com/v4/cpu/16721228" "url": "https://browser.geekbench.com/v4/cpu/16746501"
}, { }, {
"version": 5, "version": 5,
"single": 1077, "single": 1317,
"multi": 4773, "multi": 5529,
"url": "https://browser.geekbench.com/v5/cpu/20772711" "url": "https://browser.geekbench.com/v5/cpu/21102444"
}, { }, {
"version": 6, "version": 6,
"single": 1524, "single": 1549,
"multi": 4847, "multi": 5278,
"url": "https://browser.geekbench.com/v6/cpu/343254" "url": "https://browser.geekbench.com/v6/cpu/1021916"
}] }],
"runtime": {
"start": 1682271674,
"end": 1682272443,
"elapsed": 769
}
} }

40
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 Mar 2023 # Initial Oct 2019; Last update Apr 2023
# 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="v2023-03-24" YABS_VERSION="v2023-04-23"
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
echo -e '# Yet-Another-Bench-Script #' echo -e '# Yet-Another-Bench-Script #'
@ -253,14 +253,9 @@ echo -e "Kernel : $KERNEL"
VIRT=$(systemd-detect-virt 2>/dev/null) VIRT=$(systemd-detect-virt 2>/dev/null)
VIRT=${VIRT^^} || VIRT="UNKNOWN" VIRT=${VIRT^^} || VIRT="UNKNOWN"
echo -e "VM Type : $VIRT" echo -e "VM Type : $VIRT"
if [[ ! -z $IPV4_CHECK && ! -z $IPV6_CHECK ]]; then [[ -z "$IPV4_CHECK" ]] && ONLINE="\xE2\x9D\x8C Offline / " || ONLINE="\xE2\x9C\x94 Online / "
ONLINE="IPv4 & IPv6" [[ -z "$IPV6_CHECK" ]] && ONLINE+="\xE2\x9D\x8C Offline" || ONLINE+="\xE2\x9C\x94 Online"
elif [[ ! -z $IPV4_CHECK ]]; then echo -e "IPv4/IPv6 : $ONLINE"
ONLINE="IPv4"
elif [[ ! -z $IPV6_CHECK ]]; then
ONLINE="IPv6"
fi
echo -e "Net Online : $ONLINE"
# Function to get information from IP Address using ip-api.com free API # Function to get information from IP Address using ip-api.com free API
function ip_info() { function ip_info() {
@ -316,21 +311,23 @@ function ip_info() {
if [[ -n "$country" ]]; then if [[ -n "$country" ]]; then
echo "Country : $country" echo "Country : $country"
fi fi
}
if [ -z $SKIP_NET ]; then [[ ! -z $JSON ]] && JSON_RESULT+=',"ip_info":{"protocol":"'$net_type'","isp":"'$isp'","asn":"'$as'","org":"'$org'","city":"'$city'","region":"'$region'","region_code":"'$region_code'","country":"'$country'"}'
ip_info }
fi
if [ ! -z $JSON ]; then if [ ! -z $JSON ]; then
UPTIME_S=$(awk '{print $1}' /proc/uptime) UPTIME_S=$(awk '{print $1}' /proc/uptime)
IPV4=$([ ! -z $IPV4_CHECK ] && echo "true" || echo "false") IPV4=$([ ! -z $IPV4_CHECK ] && echo "true" || echo "false")
IPV6=$([ ! -z $IPV6_CHECK ] && echo "true" || echo "false") IPV6=$([ ! -z $IPV6_CHECK ] && echo "true" || echo "false")
AES=$([[ "$CPU_AES" = *Enabled* ]] && echo "true" || echo "false") AES=$([[ "$CPU_AES" = *Enabled* ]] && echo "true" || echo "false")
VIRT=$([[ "$CPU_VIRT" = *Enabled* ]] && echo "true" || echo "false") CPU_VIRT_BOOL=$([[ "$CPU_VIRT" = *Enabled* ]] && echo "true" || echo "false")
JSON_RESULT='{"version":"'$YABS_VERSION'","time":"'$TIME_START'","os":{"arch":"'$ARCH'","distro":"'$DISTRO'","kernel":"'$KERNEL'",' JSON_RESULT='{"version":"'$YABS_VERSION'","time":"'$TIME_START'","os":{"arch":"'$ARCH'","distro":"'$DISTRO'","kernel":"'$KERNEL'",'
JSON_RESULT+='"uptime":'$UPTIME_S'},"net":{"ipv4":'$IPV4',"ipv6":'$IPV6'},"cpu":{"model":"'$CPU_PROC'","cores":'$CPU_CORES',' JSON_RESULT+='"uptime":'$UPTIME_S',"vm":"'$VIRT'"},"net":{"ipv4":'$IPV4',"ipv6":'$IPV6'},"cpu":{"model":"'$CPU_PROC'","cores":'$CPU_CORES','
JSON_RESULT+='"freq":"'$CPU_FREQ'","aes":'$AES',"virt":'$VIRT'},"mem":{"ram":'$TOTAL_RAM_RAW',"swap":'$TOTAL_SWAP_RAW',"disk":'$TOTAL_DISK_RAW'}' JSON_RESULT+='"freq":"'$CPU_FREQ'","aes":'$AES',"virt":'$CPU_VIRT_BOOL'},"mem":{"ram":'$TOTAL_RAM_RAW',"ram_units":"KiB","swap":'$TOTAL_SWAP_RAW',"swap_units":"KiB","disk":'$TOTAL_DISK_RAW',"disk_units":"KB"}'
fi
if [ -z $SKIP_NET ]; then
ip_info
fi fi
# create a directory in the same location that the script is being run to temporarily store YABS-related files # create a directory in the same location that the script is being run to temporarily store YABS-related files
@ -650,10 +647,10 @@ elif [ -z "$SKIP_FIO" ]; then
if [ ! -z $JSON ]; then if [ ! -z $JSON ]; then
JSON_RESULT+='{"bs":"'${BLOCK_SIZES[DISK_COUNT]}'","speed_r":'${DISK_RESULTS_RAW[DISK_COUNT*6+1]}',"iops_r":'${DISK_RESULTS_RAW[DISK_COUNT*6+4]} JSON_RESULT+='{"bs":"'${BLOCK_SIZES[DISK_COUNT]}'","speed_r":'${DISK_RESULTS_RAW[DISK_COUNT*6+1]}',"iops_r":'${DISK_RESULTS_RAW[DISK_COUNT*6+4]}
JSON_RESULT+=',"speed_w":'${DISK_RESULTS_RAW[DISK_COUNT*6+2]}',"iops_w":'${DISK_RESULTS_RAW[DISK_COUNT*6+5]}',"speed_rw":'${DISK_RESULTS_RAW[DISK_COUNT*6]} JSON_RESULT+=',"speed_w":'${DISK_RESULTS_RAW[DISK_COUNT*6+2]}',"iops_w":'${DISK_RESULTS_RAW[DISK_COUNT*6+5]}',"speed_rw":'${DISK_RESULTS_RAW[DISK_COUNT*6]}
JSON_RESULT+=',"iops_rw":'${DISK_RESULTS_RAW[DISK_COUNT*6+3]}'},' JSON_RESULT+=',"iops_rw":'${DISK_RESULTS_RAW[DISK_COUNT*6+3]}',"speed_units":"KBps"},'
JSON_RESULT+='{"bs":"'${BLOCK_SIZES[DISK_COUNT+1]}'","speed_r":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+1]}',"iops_r":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+4]} JSON_RESULT+='{"bs":"'${BLOCK_SIZES[DISK_COUNT+1]}'","speed_r":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+1]}',"iops_r":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+4]}
JSON_RESULT+=',"speed_w":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+2]}',"iops_w":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+5]}',"speed_rw":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6]} JSON_RESULT+=',"speed_w":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+2]}',"iops_w":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+5]}',"speed_rw":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6]}
JSON_RESULT+=',"iops_rw":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+3]}'},' JSON_RESULT+=',"iops_rw":'${DISK_RESULTS_RAW[(DISK_COUNT+1)*6+3]}',"speed_units":"KBps"},'
fi fi
DISK_COUNT=$(expr $DISK_COUNT + 2) DISK_COUNT=$(expr $DISK_COUNT + 2)
done done
@ -886,8 +883,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.0.1-LinuxARMPreview.tar.gz" \ [[ $ARCH = *aarch64* || $ARCH = *arm* ]] && GB_URL="https://cdn.geekbench.com/Geekbench-6.0.2-LinuxARMPreview.tar.gz" \
|| GB_URL="https://cdn.geekbench.com/Geekbench-6.0.1-Linux.tar.gz" || GB_URL="https://cdn.geekbench.com/Geekbench-6.0.2-Linux.tar.gz"
GB_CMD="geekbench6" GB_CMD="geekbench6"
fi fi
GB_RUN="True" GB_RUN="True"
@ -994,6 +991,7 @@ function calculate_time_taken() {
else else
echo "YABS completed in ${time_taken} sec" echo "YABS completed in ${time_taken} sec"
fi fi
[[ ! -z $JSON ]] && JSON_RESULT+=',"runtime":{"start":'$start_time',"end":'$end_time',"elapsed":'$time_taken'}'
} }
calculate_time_taken $YABS_END_TIME $YABS_START_TIME calculate_time_taken $YABS_END_TIME $YABS_START_TIME