I want to calculate the **memory usage as percentage** for some processes on the device. With `top` command, we get the memory usage as size (KB, MB, GB) and the value is also not the actual physical memory (RAM) used but the virtual memory (physical + swap memory). Q1. So, if I manually calculate the memory usage percentage, what formula should I use: - `(process mem usage from top command) / (total physical memory + swap space used) * 100` - `(process mem usage from top command) / (total physical memory + swap space alloted) * 100` - `(process mem usage from top command) / (total physical memory) * 100` Q2. Is there any other way other than top command which only gives physical memory usage for individual process so that I can use the third formula above ? Example: If Chrome is using 1 GB memory, then I can say that it is using xx % of memory. But to calculate that I need the same units in numerator (memory usage of process) and denominator (memory available in system).