EN

Linux and networking

Find your Linux server's specifications

Display the CPU, memory, disks, network and system of your Linux server with lscpu, free, lsblk and ip, and interpret these values correctly on a VPS.

6 min read, updated on 18 November 2026

On this page

This guide shows you how to find out the CPU, memory, disks and network of your Linux server from an SSH session. These commands are read-only: they do not change your configuration. They work on Debian, Ubuntu, Rocky Linux and AlmaLinux.

Prerequisites

  • SSH access to your server
  • sudo privileges for some detailed commands

Most of the tools are already present. Install the optional ones as follows:

Terminal
# Debian, Ubuntu
sudo apt install ethtool dmidecode pciutils smartmontools nvme-cli sysstat

# Rocky Linux, AlmaLinux
sudo dnf install ethtool dmidecode pciutils smartmontools nvme-cli sysstat

Get a summary in one go

Copy this block into your terminal to display the essentials:

Terminal
{
  echo "== System"; grep '^PRETTY_NAME=' /etc/os-release; uname -srm
  echo "== CPU"; LC_ALL=C lscpu | grep -E '^(Model name|CPU\(s\)|Thread|Core|Socket)'
  echo "== Memory"; free -h
  echo "== Disks"; lsblk -d -e 7,11 -o NAME,SIZE,ROTA,TYPE,MODEL
  echo "== Network"; ip -br address; ip route show default
}

The following sections go through each part in detail.

System and virtualization

Terminal
cat /etc/os-release
uname -srm
hostnamectl
systemd-detect-virt
  • /etc/os-release gives the distribution and its version.
  • uname -srm shows the kernel and the architecture, for example x86_64 or aarch64.
  • systemd-detect-virt shows the virtualization technology, for example kvm. The value none means that no virtualization was detected.

CPU

Terminal
LC_ALL=C lscpu
nproc

LC_ALL=C keeps the labels in English, which makes them easier to search for. The most useful lines are:

Line Meaning
Architecture CPU architecture
CPU(s) Number of visible logical processors, i.e. the vCPUs on a VPS
Model name Model reported to the system
Thread(s) per core Threads per core
Core(s) per socket Cores per processor
Socket(s) Number of processors
Hypervisor vendor Detected hypervisor
Virtualization type Type of virtualization

To see how each logical processor is laid out:

Terminal
lscpu -e=CPU,CORE,SOCKET,ONLINE

Check whether the CPU is available

Terminal
vmstat 1 5

The st (steal) column shows the time the virtual machine spent waiting for the physical CPU. The id column shows idle time, and wa the time spent waiting for disks. High, sustained st values can explain a slowdown. Ignore the first line, which summarizes the period since boot.

Memory

Terminal
free -h
swapon --show
grep -E '^(MemTotal|MemAvailable|SwapTotal):' /proc/meminfo

In free -h, focus on:

  • total: memory visible to the system
  • available: memory actually available for new applications
  • buff/cache: cache that Linux frees when needed

A low free value is therefore nothing to worry about as long as available remains comfortable.

On some machines, dmidecode also gives details of the memory modules. On a VPS, it describes the virtual hardware:

Terminal
sudo dmidecode -t memory

Disks

List of physical or virtual disks:

Terminal
lsblk -d -e 7,11 -o NAME,SIZE,ROTA,TYPE,TRAN,MODEL

Partitions, filesystems and mount points:

Terminal
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
df -hT -x tmpfs -x devtmpfs
  • ROTA is 0 for a disk reported as non-rotational, and 1 for a disk reported as rotational.
  • SIZE in lsblk shows the size of the disk or partition.
  • df shows the usable space in the filesystem.

To analyze what is filling the disk, see Check Disk Space and Usage in Linux.

On a physical server, you can also query the health of the disks:

Terminal
sudo smartctl -i /dev/sda
sudo nvme list

Network

Interfaces and addresses:

Terminal
ip -br address
ip -br link

Default route, in IPv4 then IPv6:

Terminal
ip route show default
ip -6 route show default

IPv4 address the server uses to reach the Internet, without sending any traffic:

Terminal
ip -4 route get 1.1.1.1 | grep -oP 'src \K\S+'

DNS servers and listening ports:

Terminal
cat /etc/resolv.conf
sudo ss -tulpn

Reported speed and counters of the main interface:

Terminal
IFACE=$(ip route show default | awk '{print $5; exit}')
echo "$IFACE"
sudo ethtool "$IFACE" | grep -E 'Speed|Duplex|Link detected'
ip -s link show "$IFACE"

The errors and dropped counters should stay low. If they keep rising, note the values and the time before contacting support.

The reported speed is not a measured throughput. To measure the real throughput, follow Test server bandwidth.

Command summary

Purpose Command
System version cat /etc/os-release
Kernel and architecture uname -srm
Virtualization type systemd-detect-virt
CPU LC_ALL=C lscpu
Number of vCPUs nproc
Stolen CPU time vmstat 1 5
Memory free -h
Swap swapon --show
Disks lsblk -d -e 7,11 -o NAME,SIZE,ROTA,TYPE,MODEL
Partitions lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT
Used space df -hT -x tmpfs -x devtmpfs
Network addresses ip -br address
Gateway ip route show default
Listening ports sudo ss -tulpn

Interpret the values on a VPS

A VPS sees virtual hardware. Some information therefore describes what the hypervisor presents, not necessarily the physical machine:

  • The CPU model can be generic, for example QEMU Virtual CPU.
  • Thread(s) per core and Socket(s) describe the virtual topology.
  • ROTA and MODEL do not always reveal the actual storage type.
  • The interface speed may be missing or unrelated to your throughput.

To check your plan, compare the number of vCPUs, the memory and the disk size with the information in your client area.

Troubleshooting

The memory shown is lower than in your plan

A small difference is normal: the kernel and the virtual hardware reserve part of the memory before free does its calculation, and free -h counts in Gi (base 2), a larger unit than the GB (base 10), which gives a smaller number for the same amount of memory. If the difference is large, note the output of free -h and contact support.

The disk is larger than the partition

If lsblk shows a disk larger than its partition, for example after a capacity upgrade, the extra space is not usable yet. Make a backup, then identify the disk, the partition number and the filesystem:

Terminal
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT

Install growpart with cloud-guest-utils on Debian and Ubuntu, or cloud-utils-growpart on Rocky Linux and AlmaLinux. In this example, partition 1 of the /dev/vda disk is extended:

Terminal
sudo growpart /dev/vda 1
sudo resize2fs /dev/vda1      # ext4
sudo xfs_growfs /             # XFS mounted on /

Run only the command matching your filesystem. If the disk uses LVM, the logical volume must be extended as well.

command not found

Command Debian, Ubuntu package Rocky Linux, AlmaLinux package
lscpu, lsblk util-linux util-linux
free, vmstat procps procps-ng
ip, ss iproute2 iproute
ethtool ethtool ethtool
dmidecode dmidecode dmidecode
lspci pciutils pciutils
smartctl smartmontools smartmontools

ifconfig and netstat belong to the old net-tools package. Use ip and ss instead.

No SMBIOS nor DMI entry point found, sorry.

The environment does not present a hardware table to dmidecode. Use lscpu, free and lsblk, which are enough to see the visible resources.

Speed: Unknown! with ethtool

This result is common with a virtual network card. It does not indicate a fault. Check Link detected instead, then measure the real throughput.

smartctl returns no information

A virtual disk generally does not expose SMART data. This data is managed at the host machine level.

References