Running disk space and RAM usage
df answers “how full are the filesystems?” du answers “which folder is fat?” free answers “how much RAM and swap are used?” Together they tell you whether the dedicated server is healthy.

Disk space right now
df -hdf -hTdf -h / /boot /varWhat you should see
Filesystem Size Used Avail Use% Mounted on/dev/mapper/vg0-root 49G 6.2G 41G 14% //dev/md1 974M 112M 795M 13% /boot/dev/mapper/vg0-var 410G 38G 351G 10% /vartmpfs 63G 0 63G 0% /dev/shmRead Use%. Above about 80% on / or /var, start cleaning or expanding LVM. 100% can stop apt, logs, and databases. df -hT adds the filesystem type column (ext4, xfs, btrfs) — what those names mean: Partitioning.
df -iWhat you should see
Filesystem Inodes IUsed IFree IUse% Mounted on/dev/mapper/vg0-root 3276800 48210 3228590 2% //dev/mapper/vg0-var 27262976 191002 27071974 1% /vardf -h still shows free bytes. Mail queues and session folders do this. To see one file’s inode number, use ls -li or stat — File listings & metadata.What is using the space
du -h --max-depth=1 / 2>/dev/null | sort -hdu -sh /var/* /home/* /root 2>/dev/nulldu -sh /var/log /var/lib /var/cacheWhat you should see
1.2G /usr3.8G /var6.2G /38G /var/lib412M /var/log88M /var/cachefind /var -xdev -type f -printf '%s %p' 2>/dev/null | sort -n | tailWhat you should see
89123456 /var/log/journal/….journal210445312 /var/lib/mysql/ibdata1ncdu is a nicer interactive view:
apt install -y ncduncdu /What you should see
ncdu 1.19 ~ Use the arrow keys to drill down, d to delete, q to quit--- / ---------------------------------------------------------- 38.1 GiB [##########] /var 1.2 GiB [ ] /usr 88.0 MiB [ ] /bootRAM and swap
free -hfree -mwatch -n 1 free -hWhat you should see
total used free shared buff/cache availableMem: 125Gi 4.1Gi 98Gi 12Mi 23Gi 120GiSwap: 8.0Gi 0B 8.0Gi| Column | Meaning |
|---|---|
| total | Physical RAM the OS sees |
| used | In use (includes cache depending on view) |
| available | What new programs can still get — trust this more than “free” |
| buff/cache | Linux using spare RAM as disk cache. This is normal. |
| swap | Overflow on disk. Some swap use is OK. Constant heavy swap is slow. |
ps aux --sort=-%mem | headapt install -y htophtopWhat you should see
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMANDmysql 882 1.2 3.1 2.1g 3.8g ? Ssl Apr12 4:11 mysqldroot 1 0.0 0.0 167m 12m ? Ss Apr12 0:08 systemdIn htop, F6 sorts. Watch MEM% and CPU%. Press q to quit. top is always there if htop is not installed.
topvmstat 1 5cat /proc/meminfoWhat you should see
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 103809024 412 24117248 0 0 3 12 110 220 1 0 98 0 0Is the disk busy?
apt install -y sysstatiostat -xz 1 5iotop -oWhat you should see
Device r/s w/s %utilnvme0n1 12.0 4.1 3.2nvme1n1 11.8 4.0 3.1High %util on a disk in iostat means that device is saturated. On RAID1 both members should look similar. If one disk is much slower, check SMART.
Logs filling the disk
journalctl --disk-usagedu -sh /var/logls -lhS /var/log | headjournalctl --vacuum-time=7dWhat you should see
Archived and active journals take up 412.0M in the file system.412M /var/log-rw-r----- 1 root systemd-journal 128M Apr 14 10:22 journalVacuuming done, freed 0B of archived journals from /var/log/journal.journalctl --vacuum-time and logrotate.