Reputation: 2828
I just want to get RAM information consumed by a specific app using shell command, currently i as using ps -x | grep 'packageName' but its results vary with the memory shown by profiler
This is the result of the above command that i am using
u0_a73 7623 4287 3271364 225728 SyS_epoll_ 73289f334c S packageName (u:193963, s:87819)
The bold part is the ram consumed by the app in kB
Upvotes: 1
Views: 72
Reputation: 4865
Try this:
ps -x|awk '/packageName/{print $5}'
The awk
command extract the 5th word from the ps -x
output having packageName in the line.
Upvotes: 1