0

I need command to get process memory usage in MiB or KiB by PID. I prefer the number I see in gnome-system-monitor in "Memory" column. I tried a lot of different commands but all of them give me some other numbers.

For example, I've tried ps with different keys. The most interesting was ps aux. The RSS column is something close but number here greater than in gnome-system-monitor. A lot of answers on question similar to mine contain top command but it gives memory usage in percents.

Okumo
  • 169
  • 1
  • 12

1 Answers1

0
cat /proc/YourPid/status

ps aux YourPid

top -p YourPid

pmap -x YourPid

All of them give process memory usage; top gives both percents and absolute value (RES - Resident size)

Look at Understanding Process memory and How to measure actual memory usage of an application or process? for more details about memory usage and monitor.

gile
  • 5,580
  • 1
  • 25
  • 31