Watch Lines
Watch load, free mem, swap used
by Eric on Feb.09, 2009, under Watch Lines
Here's a watch line to watch load, free memory, and swap memory at 10 second intervals. Ignore the judicious use of escaping in this, I was under a time crunch and needed to make it work properly.
watch --interval="10" "uptime | awk '{print \"Load: \"\$10\" \"\$11\" \"\$12}' && free -m | grep \"Mem\" | awk '{print \"Free: \"\$4}' && free -m | grep \"Swap\" | awk '{print \"Swap: \"\$3}'"
Remember, escapism is rarely beautiful.





