Wednesday, July 05, 2017

Kill Linux process that consumes all memory

Found on SatckOverFlow. I love it :

ps -eo pid --no-headers --sort=-%mem | head -1 | xargs kill -9
  • ps -eo pid --no-headers --sort=-%mem: display the process ids of all running processes, sorted by memory usage
  • head -1: only keep the first line (process using the most memory)
  • xargs kill -9: kill the process


kishankapoor said...

Nice post! I thank you for sharing this nice blog with us. Likewise, I would like to say something that Happy Heap Marketing is also one of the Jobs in Java

Anonymous said...

A easy and exciting blog about java learning. Please comment your opinions and share..

Download Oracle JDK from command line

Found on the web. You can adapt the url with one grabbed from Oracle JDK download page. What I love here is the fact is send Oracle licence ...