I have an Ubuntu system running an apache server. I have found a process cache.sh
which I think might be a crypto-mining process and which is running all the time on my server consuming up to 98% CPU. This is causing other stuff to stop working like MySQL and apache.
I used the top
command to find out that cache.sh
is consuming all the CPU.
I have tried killing the process but it starts running again after some time.
I then learned that I could pause the process instead of killing it and that works quite well but I still want to find out what it is and get rid of it permanently. After restarting the whole server this process starts automatically.
The process cache.sh
is running under www-data user, which is also responsible for handling the apache process which runs under the same user.
What could I do to find the origin of this process and to resolve this issue?
lsof
command to find the files that are opened by the running process. This will help you the find the directory where thecache.sh
file is located. Usage:lsof -p PID
, where PID is the actual PID of the process. – RoseHosting Oct 16 '18 at 16:55locate cache.sh
will find the file.dlocate -S cache.sh
will let you know if it came from a package. – waltinator Oct 20 '18 at 03:36