0

Is possible to get know what process consumed all memory or why server start killing all processes? All started about 02:47 Kern.log Syslog.log

2 Answers2

2

To list the processes sorted by the memory usage

ps --sort -rss -eo pid,pmem,rss,vsz,comm 

More information here : how-to-detect-a-memory-leak

The server is killing processes to free memory, this is what happens when all the virtual pages are allocated (swap+ram). If possible the best would be to restart the server to have all the stopped services restarted and and memory free.

More information here : Debug out-of-memory with /var/log/messages

Edit:

May  8 03:53:21 bwnet kernel: [5088999.370529] Free swap  = 0kB
May  8 03:53:21 bwnet kernel: [5088999.370530] Total swap = 0kB

Reading your logs it seems that you have no swap. You may allocate some, that will allows you to manage the problem before it becomes critical.

Emmanuel
  • 1,333
2

enter image description here

  • Install htop via sudo apt install htop
  • start htop by typing htop
  • Press F6 to trigger the sort-function and select MEM% on the left side via arrow keys

As a result you get a dynamic list of all processes sorted by mem-usage

dufte
  • 14,198
  • 5
  • 41
  • 43