I've tried /proc/meminfo but my permission has been denied.
closed as unclear what you're asking by G-Man, Anthon, X Tian, steve, don_crissti Oct 14 '15 at 20:55
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
You need to use
cat /proc/meminfo, not execute
The reason you get "permission denied" is because you're trying to execute /proc/meminfo, and /proc/meminfo has no executable bit set (because it's not an executable, it's a file that you have to read).
Reading /proc/meminfo itself should not require any special permissions.
You might find it easier to find the total memory using the
free command, though.