I tried to check amount of free memory in cygwin, but it says that free
is not found. Is it possible to do in cygwin, if so what package do I need to install?
$ free
-bash: free: command not found
$ cat /proc/meminfo
...
MemFree: 1552148 kB
...
SwapFree: 8050832 kB
This command lists the contents of the special file /proc/meminfo
, which reports the current distribution and utilization of memory, one line per item, including the free memory on the line beginning with "MemFree". This value matches the value reported by Windows(TM) task manager for free memory.
The /proc
file system is part of Cygwin base package, intended to mimic its Linux version, described in kernel document proc.txt. Search for the word "meminfo" twice.
For the meaning of special files and their differences from Linux, see the Cygwin document using-specialnames.html. Look for the title "The /proc
filesystem".
The line with SwapFree shows the amount of swap space remaining. If the physical memory is mostly free, the swap should also be free, at its initial maximum, typically equal to the physical memory size. A lower value shows the presence of a memory hog/leak, may lead to general slowdown of the system, growth of the swap file (pagefile.sys), consume disk space, and require terminating the memory hog and/or a system restart to return to normal.
free
just formats it in a different way
Feb 13, 2021 at 13:58