---
title: Hardware test scripts reference
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical-com-2950.demos.haus/maas/docs/reference-hardware-test-scripts?format=md
---

*Submit*

# Hardware test scripts reference

This page enumerates standard MAAS test scripts and explains how to create your own custom scripts.

## [MAAS test scripts](https://canonical-com-2950.demos.haus/maas/docs/reference-hardware-test-scripts?format=md#p-9386-maas-test-scripts)

| **Name** | **Tags** | **What It Does** |
| --- | --- | --- |
| `smartctl-short` | storage | Executes a short SMART self-test, assessing all your drives concurrently |
| `smartctl-long` | storage | Like the short test, but goes deeper. Ideal for comprehensive disk health checks |
| `smartctl-conveyance` | storage | Specialised SMART test that checks how your disks fare during transit |
| `memtester` | memory | Pushes your RAM with various memory-specific tests |
| `internet-connectivity` | network, internet, node | Verifies if the node has an active internet connection |
| `stress-ng-cpu-long` | cpu | A 12-hour CPU endurance test to push its limits |
| `stress-ng-cpu-short` | cpu | A quick 5-minute stress test for the CPU |
| `stress-ng-memory-long` | memory | A marathon 12-hour memory stress test |
| `stress-ng-memory-short` | memory | A quick dip to test memory, lasting only 5 minutes |
| `ntp` | network, ntp, node | Checks if the node can connect to NTP servers for time syncing |
| `badblocks` | storage | Scans the disk for bad sectors, in read-only mode |
| `badblocks-destructive` | destructive, storage | Same as above, but in a read/write mode that wipes data |
| `7z` | cpu | Tests CPU performance using 7zip benchmarking |
| `fio` | storage, destructive | Storage performance testing, with the potential to alter data |

## [Real-time updates](https://canonical-com-2950.demos.haus/maas/docs/reference-hardware-test-scripts?format=md#p-9386-real-time-updates)

As MAAS runs these tests, it gives you real-time updates. Navigate to the ‘Hardware tests’ page for the machine in question and click on the ‘Log view’ link in the ‘Results’ column to view unfiltered test output.

## [DIY testing](https://canonical-com-2950.demos.haus/maas/docs/reference-hardware-test-scripts?format=md#p-9386-diy-testing)

You can create your own test scripts; here’s a simple example:

```
#!/bin/bash -e
# --- Start MAAS 1.0 script metadata ---
# name: stress-ng-cpu-test
# title: CPU Validation
# description: 5-minute stress test to validate your CPU.
# 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 snippet features metadata comments that help configure the environment and handle any package dependencies. It ends with a line that triggers `stress-ng`, the workhorse that stresses your CPU to its core.

---

[Previous

Configuration tables](https://canonical-com-2950.demos.haus/maas/docs/configuration-reference)
[Next

Logging](https://canonical-com-2950.demos.haus/maas/docs/maas-logging-reference)

Last updated 1 year, 7 months ago. [Help improve this document in the forum](https://discourse.maas.io/t/hardware-test-scripts-reference/5392).
