Falling In Love Again. FreeBSD: Not Always Like Linux. Go figure. Lesson 1: Checking For Memory/ RAM
April 28th, 2006Right now I’m working on a project that involves FreeBSD, a UNIX flavor I’m not so familiar with. I’m finding many of my fave Linux commands… completely useless.
Let’s start with looking for memory usage. On Linux, I’d try the ol’:
# cat /proc/meminfo
On FreeBSD? Not so much. (note: there are some compatibility packages that can get you pretty close, but let’s assume we don’t have those, and we want to do it like the natives do it)
What about…. THIS!?!?
#sysctl -a | grep -i memory
Virtual Memory: (Total: 53359K, Active 12614616K)
Real Memory: (Total: 3993828K Active 3084828K)
Shared Virtual Memory: (Total: 228120K Active: 72076K)
Shared Real Memory: (Total: 107012K Active: 32160K)
Free Memory Pages: 265452K
Booyah!…
And that’s one way to check memory usage on FreeBSD.



