From my understanding, the value returned from
(1) awk '/Rss:/{ sum += $2 } END { print sum }' /proc/$$/smaps
and
(2) cat /proc/$$/stat | cut -d " " -f24
should be equal, why is this not the case?
They are in fact a factor of 4 out, so (1)/4 = (2) from everything I have tested
Details of the files can be found at man 5 proc
uname -a: Linux home-server 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux