[ILUG] SUMMARY: determining how much memory is shared between
multiple processes?
Justin Mason
jm at jmason.org
Fri Oct 8 00:45:05 IST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul Jakma writes:
> On Sun, 3 Oct 2004, Justin Mason wrote:
>
> > : jm 1313...; top -b -n1 | grep sharetest
> > 23784 jm 16 0 1032 37148 31m 2620 0 0.0 3.6 0:04 sharetest
> > 23788 jm 22 0 1032 37148 31m 2620 0 0.0 3.6 0:02 sharetest
> >
> > : jm 1258...; sudo cat /proc/23784/status
>
> > VmStk+VmExe+VmLib = 2540, which is pretty close to 2620.
>
> Hmm, well it seems to use /proc/.../stat and statm, which dont appear
> to contain quite same values. ah well.
>
> > hmm. wonder if there's an instrumentation module that'd do it...
>
> gdb?
>
> I doubt there's anything that can do it without serious overhead..
> (be it runtime or else memory).
oh, BTW, an update on this -- 2.4.19+ vanilla kernels, *not* Red Hat
patched, will successfully report the correct sharing figures in "top" and
"/proc/.../statm". 2.6.x and Red Hat versions won't, though.
- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFBZdUBQTcbUG5Y7woRArwpAKCFMDr7fXRGC4C09nHg4KnmpefgEwCZARCg
YROgb5cDsW4sJhFatIfUnSE=
=3H5j
-----END PGP SIGNATURE-----
More information about the ILUG
mailing list