I always use this one:
watch -n 1 'CORE=2; ps --sort=-c -e -o pid,psr,%cpu,%mem,wchan,vsize,time,cmd | grep -E "^[[:space:]][[:digit:]]+[[:space:]]+${CORE}"'
> Refresh display every second
> For core two (set CORE=x parameter)
> Is sorted by CPU load
> The following fields are used:
- Process ID
- Core
- CPU utilization in %
- Memory utilization in %
- Process type
- Process memory usage in KB
- Process time
- Process path+command
Output:
If you want to sort it by memory usage, use this:
watch -n 1 'CORE=2; ps --sort=-vsize -e -o pid,psr,%cpu,%mem,wchan,vsize,time,cmd | grep -E "^[[:space:]][[:digit:]]+[[:space:]]+${CORE}"'
➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips