Available test scripts reference
The following hardware testing scripts are available during machine commissioning:
Name | Category Tags | Description |
---|---|---|
smartctl-short | storage | Run the short SMART self-test and validate SMART health on all drives in parallel |
smartctl-long | storage | Run the long SMART self-test and validate SMART health on all drives in parallel |
smartctl-conveyance | storage | Run the conveyance SMART self-test and validate SMART health on all drives in parallel |
memtester | memory | Run memtester against all available userspace memory. |
internet-connectivity | network, internet, node | Check if the system has access to the internet. |
stress-ng-cpu-long | cpu | Run stress-ng memory tests for 12 hours. |
stress-ng-cpu-short | cpu | Run stress-ng memory tests for 5 minutes. |
stress-ng-memory-long | memory | Run stress-ng memory tests for 12 hours. |
stress-ng-memory-short | memory | Run stress-ng memory tests for 5 minutes. |
ntp | network, ntp, node | Run ntp clock set to verify NTP connectivity. |
badblocks | storage | Run badblocks on disk in read-only mode. |
badblocks-destructive | destructive, storage | Run badblocks on a disk in read/write destructive mode. |
7z | cpu | Run 7zip CPU benchmarking. |
fio | storage, destructive | Run Fio benchmarking against selected storage devices. |
After either commissioning, testing, or installation has started, MAAS reports in real-time which script is running.
You can access the verbatim output from any test by selecting a machine, selecting the ‘Hardware tests’ page and clicking on the ‘Log view’ link in the ‘Results’ column for the specific test.
Hardware test script example: CPU stress test
Here’s a simple example of a functional Bash test script, replicating part of the stress-ng script bundled with MAAS:
#!/bin/bash -e
# --- Start MAAS 1.0 script metadata ---
# name: stress-ng-cpu-test
# title: CPU validation
# description: Run stress-ng memory tests for 5 minutes.
# script_type: test
# hardware_type: cpu
# packages: {apt: stress-ng}
# tags: cpu
# timeout: 00:05:00
# --- End MAAS 1.0 script metadata ---
sudo -n stress-ng --matrix 0 --ignite-cpu --log-brief --metrics-brief --times \
--tz --verify --timeout 2m
This Bash script contains comment-delineated metadata, which configures the script environment and installs any dependencies. There is also a single line that runs stress-ng (a CPU stress-test utility) with various arguments.