"When I despair, I remember that all through history the way of truth and love has always won. There have been tyrants and murderers and for a time they seem invincible, but in the end, they always fall — think of it, always." Mohandas Gandhi
In a time of universal deceit - telling the truth is a revolutionary act. George Orwell

Monday, November 26, 2007

usando o pmap para verificar a memória usada por um processo ou comando

podemos ver de diversas maneiras que processos estão a correr e que memória gastam usando comandos como:

$ps aux
$free

e também podemos usar o $pmap que nos dá bastante info sobre a memória gasta por esse processo ou comando

$ pmap pid

$ pmap 3724

$ pmap
Usage: pmap [-x | -d] [-q] pid...
-x show details
-d show offset and device number
-q quiet; less header/footer info
-V show the version number


$ pmap -x 9734
9734: /bin/sh /usr/lib/firefox/run-mozilla.sh /usr/lib/firefox/firefox-bin
Address Kbytes RSS Anon Locked Mode Mapping
08048000 80 - - - r-x-- dash
0805c000 4 - - - rw--- dash
0805d000 140 - - - rw--- [ anon ]
b7e38000 4 - - - rw--- [ anon ]
b7e39000 1296 - - - r-x-- libc-2.6.1.so
b7f7d000 4 - - - r---- libc-2.6.1.so
b7f7e000 8 - - - rw--- libc-2.6.1.so
b7f80000 12 - - - rw--- [ anon ]
b7f95000 8 - - - rw--- [ anon ]
b7f97000 104 - - - r-x-- ld-2.6.1.so
b7fb1000 8 - - - rw--- ld-2.6.1.so
bfcbc000 88 - - - rw--- [ stack ]
ffffe000 4 - - - r-x-- [ anon ]
-------- ------- ------- ------- -------
total kB 1760 - - -



Powered by ScribeFire.

No comments: