Me he encontrado este script en Quora:
#! /bin/bash # # swap.sh: Shows the swap usage of each process # Author: Robert Love swap_total=0 for i in /proc/[0-9]*; do pid=$(echo $i | sed -e 's/\/proc\///g') swap_pid=$(cat /proc/$pid/smaps | awk 'BEGIN{total=0}/^Swap:/{total+=$2}END{print total}') if [ "$swap_pid" -gt 0 ]; then name=$(cat /proc/$pid/status | grep ^Name: | awk '{print $2}') echo "${name} (${pid}) ${swap_pid} kB" let swap_total+=$swap_pid fi done echo echo "Total: ${swap_total} kB"
Se le añade un "chmod +x" y listo para usar.
1 Del gralion torile -
Excellent blog here! Also your site so much up fast! What web host are you the usage of? Can I get your associate hyperlink on your host? I desire my website loaded up as quickly as yours lol