Warm tip: This article is reproduced from serverfault.com, please click

What is equivalent of Linux's 'free' command on FreeBSD v8.1

发布于 2010-11-04 03:58:56

What is equivalent of Linux's 'free' command on FreeBSD v8.1?

I am calling 'free' from my application and reporting the results in my application's log file. What would be the replacement when porting to FreeBSD v8.1?

Here is a sample run of 'free' on Linux:

[centos4x32 ~] free
             total       used       free     shared    buffers     cached
Mem:        774452     733044      41408          0      98040     328880
-/+ buffers/cache:     306124     468328
Swap:      2031608        224    2031384
Questioner
WilliamKF
Viewed
0
Ben Jackson 2019-02-14 03:36:00
  • vmstat has default output which is similar in nature and takes many options that give extremely detailed information, eg vmstat -m
  • swapinfo would cover the swap part
  • top -d1 causes top to print one screen and exit, and the banner is very similar to free. Use top -d1 | head -n 7 to see only the banner