Linux lists the top 10 of memory /cpu usage.

MemoryThe first 10 lines of usage

# ps aux | head -1;ps aux | grep -v PID | sort -rn -k +4 | head

CPUThe first 10 lines of usage

# ps aux | head -1;ps aux | grep -v PID | sort -rn -k +3 | head

ps aux | head -1 The name of a field is displayed first.

grep -v PID Remove field names

sort -rn -k +4Sorting according to fourth columns

head Acquiescence the first 10 rows.

 

Leave a Reply

Your email address will not be published. Required fields are marked *