Article View: ch.comp.os.linux
Article #23379Re: Wieviel Heap alloziert?
From: Marc SCHAEFER
Date: Sun, 04 Apr 1999 00:00
Date: Sun, 04 Apr 1999 00:00
62 lines
3282 bytes
3282 bytes
Michael BοΏ½sch <michael.boesch@bluewin.ch> wrote:
> folgende Frage: gibt es ein Tool, mit dem ich feststellen kann, welcher
> Prozess wieviel Heap-Speicher alloziert hat?
Can you tell me what is heap in Linux ?
Using ``ps -auxw'' | head -5
USER PID %CPU %MEM VSZ RSS TT STAT START TIME COMMAND
at 174 0.0 0.5 820 164 ? S Apr 2 0:00 /usr/sbin/atd
djmatrox 16087 0.0 5.8 2828 1816 ? S 00:50 0:03 ./eggdrop BiLb0t
ghost 6806 0.0 3.0 2188 940 ? S Apr 2 0:21 ./eggdrop hellfire
news 468 0.3 14.7 5620 4568 ? S Apr 2 8:56 /usr/local/lib/news/bin/innd -p4 -i0
To my knowledge (but man ps will tell you more), VSZ is the virtual
size (not yet committed, or paged out), and RSS is the actual physical
RAM usage, including stack.
You can get more detailed information that way, and with man 5 proc
<vulcan> schaefer:/usr/users/schaefer> cd /proc
<vulcan> schaefer:/proc> cd 468
<vulcan> schaefer:/proc/468> ls
cmdline environ fd/ mem stat status
cwd@ exe@ maps| root@ statm
<vulcan> schaefer:/proc/468> ls -la
ls: exe: Permission denied
ls: root: Permission denied
ls: cwd: Permission denied
total 0
dr-xr-xr-x 3 news news 0 Apr 4 09:13 ./
dr-xr-xr-x 5 root root 0 Apr 2 09:58 ../
-r--r--r-- 1 news news 0 Apr 4 10:37 cmdline
lrwx------ 1 news news 64 Apr 4 10:39 cwd
-r-------- 1 news news 0 Apr 4 10:39 environ
lrwx------ 1 news news 64 Apr 4 10:39 exe
dr-x------ 1 news news 0 Apr 4 10:39 fd/
pr--r--r-- 1 news news 0 Apr 4 10:39 maps|
-rw------- 1 news news 0 Apr 4 10:39 mem
lrwx------ 1 news news 64 Apr 4 10:39 root
-r--r--r-- 1 news news 0 Apr 4 10:37 stat
-r--r--r-- 1 news news 0 Apr 4 10:37 statm
-r--r--r-- 1 news news 0 Apr 4 10:39 status
<vulcan> schaefer:/proc/468> su
Password:
bash-2.01# cat maps
08048000-0806f000 r-xp 00000000 08:03 198844
0806f000-08071000 rw-p 00026000 08:03 198844
08071000-08189000 rwxp 00000000 00:00 0
40000000-40006000 r-xp 00000000 08:01 26022
40006000-40007000 rw-p 00005000 08:01 26022
40007000-4000a000 rw-p 00000000 00:00 0
4000a000-4008c000 r-xp 00000000 08:01 26032
4008c000-40092000 rw-p 00081000 08:01 26032
40092000-40418000 rw-p 00000000 00:00 0
40418000-40421000 rw-s 00000000 08:03 198929
40421000-40424000 rw-p 00000000 00:00 0
40430000-40433000 rw-p 0000f000 00:00 0
4043b000-40441000 rw-p 0001a000 00:00 0
4044a000-40453000 rw-p 00029000 00:00 0
bfffa000-c0000000 rwxp ffffb000 00:00 0
bash-2.01# exit
Technical Details
Message-ID:
<7e78j4$p4c$1@vulcan.alphanet.ch>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7e4q20$jfn$1@bw107zhb.bluewin.ch>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f4b73,dbffa40435deddb5 X-Google-Attributes: gidf4b73,public From: Marc SCHAEFER <schaefer@alphanet.ch> Subject: Re: Wieviel Heap alloziert? Date: 1999/04/04 Message-ID: <7e78j4$p4c$1@vulcan.alphanet.ch> X-Deja-AN: 462518933 Content-Transfer-Encoding: 8bit References: <7e4q20$jfn$1@bw107zhb.bluewin.ch> Content-Type: text/plain; charset=ISO-8859-1 Organization: ALPHANET NF -- Not for profit telecom research Mime-Version: 1.0 Newsgroups: ch.comp.os.linux