monitor ram usage linux code example
Example 1: ubuntu memory command line
watch -n 5 free -m
Example 2: linux memory usage
// linux command for reporting used memory percentage
$ free | grep Mem | awk '{print $3/$2 * 100.0}'
23.8171
watch -n 5 free -m
// linux command for reporting used memory percentage
$ free | grep Mem | awk '{print $3/$2 * 100.0}'
23.8171