Use the following command to check the memory usage of a specific process.
- cat /proc/<process ID>/status
You will get the following output.
Name: httpd State: S (sleeping) SleepAVG: 98% Tgid: 29927 Pid: 29927 PPid: 3407 TracerPid: 0 Uid: 48 48 48 48 Gid: 48 48 48 48 FDSize: 64 Groups: 48 VmPeak: 417648 kB VmSize: 417392 kB VmLck: 0 kB VmHWM: 104592 kB VmRSS: 97572 kB VmData: 124316 kB VmStk: 332 kB VmExe: 312 kB VmLib: 24856 kB VmPTE: 820 kB StaBrk: 2aaf805ad000 kB Brk: 2aaf807cc000 kB StaStk: 7fff14cd3b80 kB Threads: 1 SigQ: 0/16384 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 000000018c00466b CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 Cpus_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed: 00000000,00000001
Done =)
Reference: StackOverflow – Linux: How to measure actual memory usage of an application or process?
