A (set of) Tool/Script(s) To Show/Display Free/Used/Total/etc Memory/RAM Amount/Size, on macOS/macOSX, BSD/Unix, etc.
Later Linux support will be added. Later GUI tool will be added.
ShowMemory.sh - ShowMemory - it shows Free/Used/Total/etc RAM/Memory Size/Amount.
Copyright © 2020 Erik T Ashfolk (<atErïk@ÖυťĹöōķ·ċōm;atErïk@AśhFölķ·ćōm>, Do Not Copy
Eml-Adrs, Type in English/basic-latin char, No Soliciting Permitted). All rights reserved.
Released with below License(s)+Restrictions+Permissions:
(*) Do Not Use My/Our Contribution(s) To Kill/Harm/Violate(or Steal-from)(Any) Human/Community,Earth,etc.
(*) GNU General Public License v3 (GPL v3) https://www.GNU.org/licenses/gpl-3.0.en.html
(Written initially on 2020-06-24 by Erik T Ashfolk).
(All other trademarks, etc cited here are the property of their respective owners.)
(All other copyright items cited here are the copyright of their respective author/creator.)
Currently the "ShowMemory.sh" is a bash-shell based script/tool, & for macOSX.
-
Abbreviations : pg = Page (each page is 4096 bytes) . 1048576 is Bytes in 1MB(MegaBytes) . Purgbl = Purgeable .
WirdDn = Wired Down . FileBkd = File-backed . Actv = Active . Cmprsr = Occupied by Compressor .
"CATEGORY OF MEMORY : MB (MegaBytes)"
"Free (Physical/RAM) Memory = ( $pgFree * $pgSize ) / 1048576 "
"Purgeable (Physical/RAM) Memory = ( $pgPurgbl * $pgSize ) / 1048576 "
"Cached (Physical/RAM) Memory = ( $pgFileBkd * $pgSize ) / 1048576 "
"Used (Physical/RAM) Memory = (( $pgActv + $pgWirdDn + $pgCmprsr ) * $pgSize ) / 1048576 "
"Total (Physical/RAM) Memory = ( $totalPhysicalMem * $pgSize ) / 1048576 "
Script/tool was tested, it Worked.
- Mac:~ atErik$ uname -a
Darwin Mac.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
Mac:~ atErik$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
Mac:~ atErik$ sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.
Mac:~ atErik$ zsh --version
zsh 5.7.1 (x86_64-apple-darwin19.0)
Any executable file needs the "Execute" attribute bit set, & if thats not done already:
execute below command in CLI "Terminal"/shell:
chmod +x ShowMemory.sh
./ShowMemory.sh
(above command will show memory stat/info on screen)