How do I tell how much RAM is used on linux box?

Webmin tells me that <7GB is being used out of the 48GB we have.  Top tells me 47GB is used.  The server has been up for over a year without reboot... so I am not sure if top might be showing me any ram that was ever used and webmin is showing me what is actively used...

We are getting a new server soon to replace this one... I am trying to see if we really need 48GB again or if we can save and get less because we are not using it anyway.  Usage should stay about the same
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

☠ MASQ ☠Commented:
free -m ?

or install htop ?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
XetroximynAuthor Commented:

free -m reports 47GB used... But is this accurate?  For a server that has been running 500+ days straight... I mean in windows I see two metrics... "free" and "Available".  I assume the stuff that is not "free" but is "Available" is memory that was used at one point, but is not currently used.  

So if free -m is telling me whats free... I think I might be more curious in whats "available"... as that would  probably be a more accurate measure of how much RAM I am currently concurrently using... right?
☠ MASQ ☠Commented:
Right - but Linux also caches data from the hard drive pre-emptively much more that Windows so you aren't getting a picture of what is actually needed you're seeing what's used and Linux is great at going "OK I've got some free RAM available to me, how can I best use it to give optimum performance?".  Htop might be better for what you want as it shows what really is being used together with up time, line by line like Task Manager's metrics.
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

XetroximynAuthor Commented:
Thanks!  The server is redhat.  I tried yum install htop and I got "No package htop available."  How can I install htop on redhat?
☠ MASQ ☠Commented:
You need to install the rpmforge prerequisites first
Dan CraciunIT ConsultantCommented:
Can you use epel repository on Redhat? If so, you can use it to install htop directly.

If not, you'll need to compile it.

LE: looks like this should allow you to use epel packages:
yum install epel-release

+1 for htop. Realy.. use that!
XetroximynAuthor Commented:
I'd love to use htop... however it appears
yum install epel-release

Open in new window

No package epel-release available.

Open in new window

And I think I need epel-release to install htop... so I'm lost :-/
Dan CraciunIT ConsultantCommented:
Looks like you need rpms on newer Redhat releases to enable Epel:
XetroximynAuthor Commented:
Thanks!   I think redhat support told me they don't support EPEL... if I wanted to remove EPEL what would I need to do?
Dan CraciunIT ConsultantCommented:
>>redhat support told me they don't support EPEL
They can't support EPEL, since it's a repository of packages not found in the RedHat repository.

What they meant is that they don't support packages installed from EPEL.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.