free memory command

Posted on 2008-11-18
Last Modified: 2013-11-22
hello there,
I am trying to get the same results on freebsd as I get them in linux..
how can I do that?
[(05:00 PM)][(root@dedicated)] [(~)] $ free -bt

             total       used       free     shared    buffers     cached

Mem:    2115526656 1922269184  193257472          0  155131904  961261568

-/+ buffers/cache:  805875712 1309650944

Swap:   1077501952     184320 1077317632

Total:  3193028608 1922453504 1270575104

[(05:00 PM)][(root@dedicated)] [(~)] $ free -bt | grep buffers\/cache | awk '{print $3}'


[(05:00 PM)][(root@dedicated)] [(~)] $ free -bt | grep buffers\/cache | awk '{print $4}'


Open in new window

Question by:XK8ER
    LVL 3

    Expert Comment


    I have already answered it on ID:23916230 and specifying the same again in this thread. Please see below:

    Get the following file on your freebsd box
    bash# mv /usr/local/bin/free
    bash# chmod +x /usr/local/bin/free
    bash# /usr/local/bin/free ( Note: Perl need to be installed)
    LVL 1

    Author Comment

    both questions are totally different so you cannot answer the same!
    LVL 3

    Accepted Solution

    Yes I noticed it after I submit it. Sorry about that.
    You may try "top" command or "sysctl -a | grep -i memory".
    LVL 1

    Author Comment

    so how exactly can I get the same results on a freebsd system?
    LVL 61

    Expert Comment

    Memory manager is different. Use Linux if you do not like FreeBSD, or use SNMP for more generic and unified view of different systems.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now