[rrd-users] memory on Linux/graphing & understanding ps output

mrugan mrugan at softhome.net
Wed Feb 11 23:27:32 MET 2004


Hy ,

I know this might sound inappropiate for this mailing list
but is there anyone out (t)here that graphs various "ps" output
on linux regarding memory amount a process is using?

I have some unsolved questions about compatibilities between
some variables that "ps" uses versus "top"

in "top" i am interested in the following variables:

TSIZE      = Code Size (kb)
DSIZE      = Data+Stack Size (kb)
SIZE       = Virtual Image Size (kb)
TRS        = Resident Text Size (kb)
SWAP       = Swapped kb
SHARE      = Shared Pages (kb)
RSS        = Resident Set Size (kb)

some of them are drawn from /proc/ same way "ps" does,
[ps ax -o comm,%mem,vsz,sz,rss] as an example but beats me
explaining the SHARE/SWAP (at these values "top" performs some
calculations within the code); i have tried to reverse engineer the code
but got stucked when it comes to OOP; (it could take a lifetime to
understand what procps package does within' kernel, /proc/ filesystem
and so on... cuz i ain't a guru in this)

one thing i have found fooling aroung with this is that most people
think that SIZE variable in "top" contains the amount of memory a
process is using. some wihite-paper on this subject explains that
RSS-SHARE would be a GOOD approximation on the memory amount a process
is using.
ps output won't give out a SHARE value ... (SHARE in "top" as i said is
calculated out of some values as i found out while looking into the
code)
man ps won't explain that various variables really are ... like
"...SIZE is the virtual size of the proc (code+data+stack)..."

SIZE doesn't appear anywhere else in the manual ... maybe it's vsz ?
stack ... which one of them?
AIX's ps v : Displays the PGIN, SIZE, RSS, LIM, TSIZ, TRS, %CPU, %MEM
fields .. which is not what i see on my linux box.

so ... anyone has some answers on this?
it seems the web doesn't.
thanks.

------
mrugan                          mailto:mrugan at softhome.net

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list