ServerBot/mem.sh

9 lines
175 B
Bash
Raw Normal View History

2019-05-10 20:01:51 +02:00
#!/bin/bash
function memUsage {
top -bn1 | sed -n 4p | awk '{ print int( $6 / $4 * 100) }'
}
2019-07-07 09:41:39 +02:00
function memHighest {
ps -eo pid,cmd,%mem --sort=-%mem | head -2 | tail -n 1
}