You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
200 B

#!/bin/bash
function memUsage {
top -bn1 | sed -n 4p | awk '{ print int( $6 / $4 * 100) }'
}
function memTop {
ps -eo pid,cmd,%mem --sort=-%mem | head -2 | tail -n 1 | sed 's: :%20:g; s:/:%2F:g'
}