First of all, I'm very new to Linux but I don't think this is a "Linux ate my RAM" issue. While searching about my problem I ran in to that issue a lot but it doesn't fit with what I see. This seems to be really happening.
Everything I've tried is telling me that the RAM usage is very very high. I've tried top, htop, vmstat 2 10. My Hypanel admin page too (this is a VPS that I access remotely). Also I have started to get errors stating that it cannot allocate memory to whatever I'm trying to do, even opening a terminal. It didn't even have enough RAM to allow me to logout of Ubuntu at one point.
The VPS has 1gb of RAM. It's not a lot but from everything I have read it should be more than enough to run, particularly when I have basically no traffic going through it. I have setup Apache2 and added 2 domain names pointing to their own html folders. I can access the domains. For example: t4nk.com
I then installed some recommended things like modsecurity, fail2ban, MySQL, and tried to install PHP5 which didn't work (probably because it couldn't allocate memory), but this may be irrelevant because the RAM usage apparently started last month before I did much of anything, as you'll see in the screenshots below. The first shot is just the general info from Hypanel.
In the next screenshot you can see that the RAM usage spikes back up immediately after turning off the VPS for a few minutes:
And when I view the RAM usage from last month I can see that it all went bad after changing from CentOS 5 to Ubuntu 12.04. The reason that I changed to Ubuntu was that I thought it would be easier for a newbie like me to use, but honestly I haven't gained much from having a GUI and I spend most of my time in the terminal just like I did on CentOS.
Last month RAM usage:
vmstat 2 10:
I don't really know what vmstat does, but it was recommended in one of the many threads I read on my many searches for a solution. I hope someone can help me out here. Please keep in mind that I'm very new to Linux.
How to resolve this ?