Unfortunately, it is not possible to display the memory usage on macOS.
This is because macOS does not have a free command.
Instead, macOS has a vm_stat command. This is different from the linux vmstat command, but it can be used in such cases.
This is the code that uses the vm_stat command to display memory on macOS. It works well in my environment. I would be glad if it would be helpful.
The display result of the vm_stat command is difficult to understand for me. I looked into it as much as I could. And it looks like it's working. However, I may have made a mistake.
It is a very nice plugin for me. Thank you.
Unfortunately, it is not possible to display the memory usage on macOS. This is because macOS does not have a free command.
Instead, macOS has a
vm_stat
command. This is different from the linuxvmstat
command, but it can be used in such cases.This is the code that uses the
vm_stat
command to display memory on macOS. It works well in my environment. I would be glad if it would be helpful.The display result of the
vm_stat
command is difficult to understand for me. I looked into it as much as I could. And it looks like it's working. However, I may have made a mistake.