gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r25150 - gnunet/src/sysmon


From: gnunet
Subject: [GNUnet-SVN] r25150 - gnunet/src/sysmon
Date: Wed, 28 Nov 2012 15:33:09 +0100

Author: wachs
Date: 2012-11-28 15:33:09 +0100 (Wed, 28 Nov 2012)
New Revision: 25150

Modified:
   gnunet/src/sysmon/test_glibtop.c
Log:
changes


Modified: gnunet/src/sysmon/test_glibtop.c
===================================================================
--- gnunet/src/sysmon/test_glibtop.c    2012-11-28 14:21:58 UTC (rev 25149)
+++ gnunet/src/sysmon/test_glibtop.c    2012-11-28 14:33:09 UTC (rev 25150)
@@ -30,6 +30,7 @@
 #include <glibtop/proclist.h>
 #include <glibtop/procstate.h>
 #include <glibtop/procargs.h>
+#include <glibtop/procmem.h>
 #include <glib.h>
 
 static int ret;
@@ -40,9 +41,8 @@
     unsigned i;
     glibtop_proclist proc_list;
     glibtop_proc_args proc_args;
+    glibtop_proc_mem proc_mem;
     char *argss;
-    char **argv;
-    int argc;
 
     /* get process list */
     pids = glibtop_get_proclist(&proc_list, which, arg);
@@ -66,8 +66,15 @@
           ret = 1;
           return;
         }
-        printf (" argument string: %s\n", argss);
+        printf ("\targument string: %s\n", argss);
         g_free (argss);
+
+        glibtop_get_proc_mem (&proc_mem, pids[i]);
+        printf ("\t%-50s: %lu\n", "total # of pages of memory", proc_mem.size);
+        printf ("\t%-50s: %lu\n", "number of pages of virtual 
memory",proc_mem.vsize);
+        printf ("\t%-50s: %lu\n", "number of resident set", proc_mem.resident);
+        printf ("\t%-50s: %lu\n", "number of pages of shared (mmap'd) memory", 
proc_mem.share);
+        printf ("\t%-50s: %lu\n", "resident set size", proc_mem.rss);
     }
 
     if (NULL != pids)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]