GoAdmio

speed

Show the server's disk type (HDD, SSD, or NVMe), a quick read-speed test of its largest disk, and how long the drive has been running and how worn it is

On this page: Overview · Quick start · Syntax · Output · Examples · Troubleshooting · Details · See also


Overview

/go/speed gives you a quick look at the server's storage. It reports:

Use it to compare servers, to check that a new server's disk is as fast as the plan promises, or to spot a drive that is wearing out.

The command installs hdparm and smartmontools if they are missing, so the server needs internet access the first time you run it.

[!WARNING] The line labeled Write Speed is not a write test. See Output.


Quick start

/go/speed

It takes about 10 seconds. Run it as root.


Syntax

/go/speed

The command takes no arguments. Anything you type after it is ignored, and is only written to /var/log/go/speed.log with a timestamp.


Output

Hard Disk Storage Type: NVMe SSD
Hard Disk Read Speed: 2150.33 MB/sec
Hard Disk Write Speed: 1980.12 MB/sec
Hard Disk Working Days: 412
Hard Disk Percentage Used: 3%
Hard Disk Health: 97%

The numbers above are only an illustration.

Line Meaning When it is shown
Hard Disk Storage Type HDD, SSD, or NVMe SSD. Always.
Hard Disk Read Speed Speed of reading from the disk through the operating system's cache. Always.
Hard Disk Write Speed Speed of reading directly from the disk, bypassing the cache. Despite the label, nothing is written. Always.
Hard Disk Working Days Power-on hours divided by 24. Only if the drive reports its power-on hours, and the result is not 0.
Hard Disk Percentage Used How much of the drive's rated wear has been used. Only if the drive reports it. NVMe drives usually do.
Hard Disk Health 100 minus the percentage used. Only if the percentage used is 1% or more.

[!NOTE] Health is a wear estimate for flash drives. It is not SMART's overall health result. A drive can show no health line, or show a high percentage, and still be failing. To check that, run smartctl -H /dev/<disk>.

If the drive doesn't report power-on hours or wear, those lines are left out. A brand-new drive at 0% used also shows no Health line.


Examples

# Run the check
/go/speed
# See the disks and whether Linux considers them rotating (1) or not (0)
lsblk -d -o NAME,ROTA,SIZE
# Check the drive's overall SMART health result yourself
sudo smartctl -H /dev/nvme0
# Review recent calls
tail /var/log/go/speed.log

Troubleshooting

Symptom Likely cause Fix
hdparm: Permission denied or empty speed lines The command was not run as root. Run it as root.
Packages are not installed No internet access, or the OS name is not one of the supported ones. Install hdparm and smartmontools yourself.
Storage type looks wrong, such as SSD for a rotating disk Only the first device that lsblk lists is checked. This can be a loop device. Check lsblk -d -o NAME,ROTA.
HDD is shown for a cloud server with an SSD Many virtual disks report themselves as rotating. Ignore the type, and rely on the speed values.
Read speed is empty The largest filesystem is not a local disk, or hdparm can't test it, for example in a container. Run hdparm -t /dev/<disk> yourself.
No Working Days or Health lines The drive doesn't report them. This is common for virtual disks, hardware RAID, and many hard disks. Try smartctl -a /dev/<disk>.
Only one disk is reported on a server with several Only the first disk is checked. Run hdparm and smartctl on the other disks by hand.
The speed changes a lot between runs Other work on the server, or shared disks on a virtual server. Run it again when the server is quiet.

Details

What it does

  1. Records the call in /var/log/go/speed.log.
  2. Finds the disk type from the first device listed by lsblk: HDD if it is rotating, SSD if not, and NVMe SSD if its name contains nvme.
  3. Installs hdparm and smartmontools if they are missing (dnf or apt).
  4. Prints the disk type.
  5. Picks the largest filesystem from df whose device name contains a /, and runs two hdparm -t tests on it:
    • hdparm -t: reads through the cache, shown as Read Speed
    • hdparm -t --direct: reads bypassing the cache, shown as Write Speed
  6. Takes the first device from smartctl --scan and reads its power-on hours, percentage used, and wear.
  7. Prints the days, percentage used, and health lines that the drive reports.
flowchart TD
    A["speed"] --> B["Find disk type"]
    B --> C["Install hdparm and smartmontools if missing"]
    C --> D["Pick the largest filesystem"]
    D --> E["hdparm read test, then direct read test"]
    E --> F["Read SMART data from the first device"]
    F --> G["Print days, percentage used, and health when available"]

What is measured

Item Source
Disk type lsblk, first device listed
Speeds hdparm -t on the largest filesystem's device. Each test lasts a few seconds.
Working days, percentage used smartctl -a on the first device from smartctl --scan

Limits


See also

Command Description
speedtest Measure MariaDB write throughput
cpu Show the server's CPU load and its top CPU-consuming processes
mem Check the top ten memory-consuming commands or services
loadavg Check the weekly server load average
memoryavg Check the weekly server memory average
clean Delete old backups, trash, session files, and expired mail to free up disk space
quota Enable disk quotas in GoAdmio
heal Monitor key services, memory, load, and disk, and automatically fix problems