Description of problem: Hello, There seems to be some problem with the consistency of the memory reporting for a process when we use /proc/<pid/statm file, to report the memory. The VmSize in the /proc/<pid>/status file should be excatly 4 times the first entry in the /proc/<pid>/statm file. (Since statm reports in pages and page size= 4Kb). But see the following output of status and statm files on ally RHEL-3.0 platforms. ------------------------------- $cat /proc/self/status Name: csh State: R (running) Tgid: 20664 Pid: 20664 PPid: 20663 TracerPid: 0 Uid: 6207 6207 6207 6207 Gid: 30 30 30 30 FDSize: 32 Groups: 30 2034 31 VmSize: 5048 kB VmLck: 0 kB VmRSS: 1748 kB VmData: 960 kB VmStk: 164 kB VmExe: 292 kB VmLib: 1488 kB SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000010002 SigIgn: 0000000000384004 SigCgt: 0000000009812003 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 $cat /proc/self/statm 437 437 245 71 20 346 0 In the above RSS size turns out to be the same but VmSize i.e size varies. Also found a bug in proc documentation, it says the order of the fields in /proc/<pid>/statm file is size resident share trs drs lrs dt when I checked up in fs/proc/array.c its printed in the order size resident share trs lrs drs dt Version-Release number of selected component (if applicable): How reproducible: $uname --all Linux 2.4.21-32.ELhugemem #1 SMP Fri Apr 15 21:04:31 EDT 2005 i686 i686 i386 GNU/Linux Steps to Reproduce: 1. 2. 3. Actual results: o Inconsistent VMSIZE when we read from /proc/<pid>/status and /proc/<pid>/statm/ Expected results: o Both the VmSize in status file and statm file should be the same. Please let us know what excatly is the actual VmSize. Best Regards Vamsi kundeti
This is apparently an accidental double bug entry. *** This bug has been marked as a duplicate of 192612 ***