Q:

High CPU and RAM usage, how to know what is the cause?

I am maintaining a cloud server (ubuntu 14, webuzo) on Amazon (AWS).
Recently the usage of CPU and RAM are increasing high which cause the server going down.
i thought there is an attact to the server, then i try to modify the security from the AWS console. I block all the ports, except for accessing the control panel of my hosting panel which i set it to only accept from my ip address.
But still, the CPU and RAM usage is still high.
I guess this is not caused from the outside(attact/flood), but it comes from inside the server.
So the question is how to know or determine what is the cause?
Regards

A:

You can check the processess using more memmory using top or htop
top -o %MEM -o %CPU

here you can get a visual repersentation of what is going on in your server then you can stop the service
service <service name> restart

or process by
kill -9 <process id>

You can also clear the cache by
sync; echo 3 > /proc/sys/vm/drop_caches

