Linux Find Out What Process Are Using Swap Space

Originally published at: https://www.cyberciti.biz/faq/linux-which-process-is-using-swap/

The top and free command display the total amount of free and used physical and swap memory in the server. How do I determine which process is using swap space under Linux operating systems? How do I find out swap space usage of particular process such as memcached?

Hello,

I read this article and think that it could be helpful in my situation. My Linux OS (mint 19) is trying to encrypt swap space using crypt swap when the system starts (boots). The problem is that there is no swap space to encrypt so the “job” fails to execute and times out. This job repeats itself a number of times during the boot sequence (always failing) and causes the boot time to be quite prolonged before the machine finally starts up.

I have looked around and have received a couple of suggestions to remedy this situation but nothing that I have tried has worked. I need to: 1. identify what program or command is trying to encrypt the non-existent swap space and 2. How to stop this from happening during the system startup.

I’ll attach the latest boot.log from my machine. Any suggestions will be appreciated.
Oh, I see that as a “newbie” I am unable to upload any files… c’est la vie!

kenji

I think following command tells service related to swap file during boot time

systemctl  
systemctl  | grep -i swap

You can disable swap related service.