Posts Tagged ‘ps’

Monitoring top 10 Linux CPU consuming processes

I always need to check the processes that are consuming CPU at my machine, using ps its easy. With the following command, you can write a script and then send email, take action, etc.

ps aux –sort=-pcpu | head -n 10

If you want to sort by memory:

ps aux –sort=-rss | head -n 10

You can play with TOP also, but I prefer PS for this case.

top -b -c -n 1 | head -n 17 | tail -n 10


Categorias:AIX, Linux Tags:, , , , ,