On 20 September 2010 11:32, raid fifa <[email protected]> wrote:

> sorry for my puzzled email.
> I mean "used memory" of free should be around equal to SUM of the values of
> RES column from top cmd. Is that right? or my mis-understand?
>
>
In /proc/<pid>/smaps there are "Shared_clean" and "Shared_dirty" entries for
each map.  So, for example, the on and only instance of /bin/bash on a
running system shows

08048000-080f5000 r-xp 00000000 fd:00 2326623    /bin/bash
Size:               692 kB
Rss:                552 kB
Shared_Clean:         0 kB
Shared_Dirty:         0 kB
Private_Clean:      552 kB
Private_Dirty:        0 kB
Swap:                 0 kB
Pss:                552 kB

but when I start a second instance I see

08048000-080f5000 r-xp 00000000 fd:00 2326623    /bin/bash
Size:               692 kB
Rss:                552 kB
Shared_Clean:       548 kB
Shared_Dirty:         0 kB
Private_Clean:        4 kB
Private_Dirty:        0 kB
Swap:                 0 kB
Pss:                278 kB

There's more about this in
/usr/share/doc/kernel-doc-*/Documentation/filesystems/proc.txt but basically
a component of the RSS of any running process includes memory (usually the
executable part of a binary or library) that is shared among several
processes.

Alas, the RHEL5 kernel-doc is out of date: smaps is there but the
corresponding kernel doc is missing.  It's there for Fedora13 of course.

jch
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to