Start with a baseline
These checks apply to Ubuntu 24.04 LTS and AlmaLinux 9. Connect over SSH and run them as your normal user. Most information is readable without administrator privileges. Start while the server is behaving normally, then repeat during the problem so you can compare. A single reading can catch a brief spike and should not be treated as a diagnosis.
Confirm the operating system and the number of CPUs presented to the guest. On a VPS, the CPU model and virtual core count describe the virtual machine's view; they do not establish exclusive ownership of the host's physical processors.
cat /etc/os-release
lscpu
uptimeWatch CPU activity
Run top and leave it open for several refreshes. Press P to sort processes by CPU usage and q to exit. The us field represents time spent on ordinary application code, sy covers kernel work, and id is idle time. Consistently low idle time suggests CPU pressure, especially when one application dominates the process list.
The wa field reflects time waiting for input or output, while st indicates time the hypervisor allocated elsewhere. Investigate patterns across repeated samples. Load average also includes tasks waiting on certain resources, so it is not a direct CPU percentage.
topRead memory correctly
Use free with human-readable units. Focus on the available column rather than judging the server solely by its free column. Linux keeps useful file data in cache and can reclaim much of that space when an application needs it. A small free value can therefore be entirely normal.
Swap use by itself does not prove an immediate problem: pages may remain swapped after an earlier busy period. Compare available memory with application behavior and watch whether performance changes as more work arrives.
free -h total used free shared buff/cache available
Mem: 7.7Gi 621Mi 6.7Gi 1.4Mi 686Mi 7.1Gi
Swap: 8.0Gi 0B 8.0GiCheck filesystem capacity
The root filesystem contains the operating system and usually much of your application data. Check both byte capacity and inode capacity: a large collection of tiny files can exhaust file entries even when some disk space remains. Pay attention to the mount point rather than assuming every listed filesystem is the same disk.
To inspect your own files, summarize your home directory. This can take time on a directory containing many files. The command reports sizes without removing anything; investigate large directories before deciding what to archive or delete.
df -h /
df -i /
du -h --max-depth=1 "$HOME"Record useful evidence
Record the time, affected application, and whether the problem is constant or intermittent. Keep a few representative readings instead of only the worst one. If a process is busy, identify its service and review that service's logs before restarting it. A restart can remove the evidence you need to understand the original cause.
Official documentation
These upstream references provide more detail on the commands and workflows in this guide.