Files
2026-07-12 08:16:17 +03:30

8 lines
183 B
Bash
Executable File

#!/bin/sh
swap_used_kib=$(awk '/SwapTotal/ {total=$2} /SwapFree/ {free=$2} END {print total - free}' /proc/meminfo)
swap_used_mib=$((swap_used_kib / 1024))
echo "${swap_used_mib}"