Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unterschied top <-> statm [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Thu May 07, 2009 8:08 am    Post subject: Unterschied top <-> statm [solved] Reply with quote

Moin zusammen,

ich habe hier mit einem parallelisierten Programm einige Speicherprobleme.

Schau ich mir die Ausgabe von Top an, wird ein Speicherverbrauch eines Threads von >2GB angezeigt.
statm sagt jedoch etwas anderes:
Code:
825391 795875 884 134 0 808647 0

(ist in Kilobyte => etwa 825MB)

Der Swap des Nodes wird jedoch komplett ausgelastet, sodass er nicht mehr erreichbar ist.
Dies sollte bei laecherlichen 825MB nicht passieren, sodass ich der Ausgabe von top eher vertrauen wuede.

Hat jemand von euch ne Ahnung, warum sich die beiden Ausgaben unterscheiden?

Tschoe mit oe
Manuel
_________________
Build your own live cd with catalyst 2.0!


Last edited by manuels on Thu May 07, 2009 8:25 am; edited 1 time in total
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Thu May 07, 2009 8:24 am    Post subject: Reply with quote

Mist, die Angabe ist nicht in kb, sondern in Pages.

So kriegt man die Page Size heraus:
Code:
#include <unistd.h>
#include <stdio.h>

int main() {
  int sz = getpagesize();
  printf("%d\n", sz);
}


Hier ist die 4kb.
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum