linux memory size code example
Example 1: linux ram size
$ cat /proc/meminfo
Example 2: linux memory usage
// linux command for reporting used memory percentage
$ free | grep Mem | awk '{print $3/$2 * 100.0}'
23.8171
$ cat /proc/meminfo
// linux command for reporting used memory percentage
$ free | grep Mem | awk '{print $3/$2 * 100.0}'
23.8171