Wednesday, December 9, 2015

The Linux “free” command for Solaris/illumos


I never understood why Solaris does not contain a simple way to checking the amount of used/free memory and swap.  On Linux you can check the used and available space of physical memory and swap by using "free" command.  Here's the simple analogue for solaris/illumos, based on Brendan Gregg's swapinfo. Unlike Linux version, “cached" means here memory used by the ZFS ARC Cache. Many thanks to Sebastian Wiedenroth, who has made significant changes and continues development.

# uname -s
SunOS
# free
           total       used       free     locked     kernel     cached
Mem:        128G       916M      87.0G          0      17.0G      23.1G
Swap:      75.9G      1.26G      74.7G

No comments: