aboutsummaryrefslogtreecommitdiff
path: root/src/sysmon
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-01-15 14:11:56 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-01-15 14:11:56 +0000
commit1bb5c27a75fa1d9b0eed32a3ea7cb1a453d6fc16 (patch)
tree7547b80760a7cb6f5e8ca651ae61964896cf0d1a /src/sysmon
parentfb5f3d7c6bfc4a7844ac64d4ab5921d4a6998fed (diff)
downloadgnunet-1bb5c27a75fa1d9b0eed32a3ea7cb1a453d6fc16.tar.gz
gnunet-1bb5c27a75fa1d9b0eed32a3ea7cb1a453d6fc16.zip
changes
Diffstat (limited to 'src/sysmon')
-rw-r--r--src/sysmon/gnunet-service-sysmon.c42
-rw-r--r--src/sysmon/sysmon.conf.in2
2 files changed, 22 insertions, 22 deletions
diff --git a/src/sysmon/gnunet-service-sysmon.c b/src/sysmon/gnunet-service-sysmon.c
index eb5dee830..b5fc46ac8 100644
--- a/src/sysmon/gnunet-service-sysmon.c
+++ b/src/sysmon/gnunet-service-sysmon.c
@@ -377,22 +377,22 @@ exec_gtop_proc_mon (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
377 { 377 {
378 /* get memory info */ 378 /* get memory info */
379 glibtop_get_proc_mem (&proc_mem, pids[i]); 379 glibtop_get_proc_mem (&proc_mem, pids[i]);
380 printf ("%s : %s process information\n", 380 fprintf (stderr, "%s : %s process information\n",
381 GNUNET_STRINGS_absolute_time_to_string(GNUNET_TIME_absolute_get()), 381 GNUNET_STRINGS_absolute_time_to_string(GNUNET_TIME_absolute_get()),
382 sp->srv); 382 sp->srv);
383 printf ("\t%s memory information:\n", sp->binary); 383 fprintf (stderr, "\t%s memory information:\n", sp->binary);
384 printf ("\t%-50s: %llu\n", "total # of pages of memory", (long long unsigned int) proc_mem.size); 384 fprintf (stderr, "\t%-50s: %llu\n", "total # of pages of memory", (long long unsigned int) proc_mem.size);
385 printf ("\t%-50s: %llu\n", "number of pages of virtual memory", (long long unsigned int) proc_mem.vsize); 385 fprintf (stderr, "\t%-50s: %llu\n", "number of pages of virtual memory", (long long unsigned int) proc_mem.vsize);
386 printf ("\t%-50s: %llu\n", "number of resident set", (long long unsigned int) proc_mem.resident); 386 fprintf (stderr, "\t%-50s: %llu\n", "number of resident set", (long long unsigned int) proc_mem.resident);
387 printf ("\t%-50s: %llu\n", "number of pages of shared (mmap'd) memory", (long long unsigned int) proc_mem.share); 387 fprintf (stderr, "\t%-50s: %llu\n", "number of pages of shared (mmap'd) memory", (long long unsigned int) proc_mem.share);
388 printf ("\t%-50s: %llu\n", "resident set size", (long long unsigned int) proc_mem.rss); 388 fprintf (stderr, "\t%-50s: %llu\n", "resident set size", (long long unsigned int) proc_mem.rss);
389 389
390 /* get time info */ 390 /* get time info */
391 glibtop_get_proc_time (&proc_time, pids[i]); 391 glibtop_get_proc_time (&proc_time, pids[i]);
392 printf ("\t%s time information:\n", sp->binary); 392 fprintf (stderr, "\t%s time information:\n", sp->binary);
393 printf ("\t%-50s: %llu\n", "real time accumulated by process", (long long unsigned int) proc_time.rtime); 393 fprintf (stderr, "\t%-50s: %llu\n", "real time accumulated by process", (long long unsigned int) proc_time.rtime);
394 printf ("\t%-50s: %llu\n", "user-mode CPU time accumulated by process", (long long unsigned int) proc_time.utime); 394 fprintf (stderr, "\t%-50s: %llu\n", "user-mode CPU time accumulated by process", (long long unsigned int) proc_time.utime);
395 printf ("\t%-50s: %llu\n", "kernel-mode CPU time accumulated by process", (long long unsigned int) proc_time.stime); 395 fprintf (stderr, "\t%-50s: %llu\n", "kernel-mode CPU time accumulated by process", (long long unsigned int) proc_time.stime);
396 } 396 }
397 g_free (argss); 397 g_free (argss);
398 } 398 }
@@ -416,28 +416,28 @@ exec_gtop_net_mon (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
416 416
417 tmp = glibtop_get_netlist (&netlist); 417 tmp = glibtop_get_netlist (&netlist);
418 418
419 printf ("%s : Network information: %u devices\n", 419 fprintf (stderr, "%s : Network information: %u devices\n",
420 GNUNET_STRINGS_absolute_time_to_string(GNUNET_TIME_absolute_get()), 420 GNUNET_STRINGS_absolute_time_to_string(GNUNET_TIME_absolute_get()),
421 netlist.number); 421 netlist.number);
422 for (i = 0; i < netlist.number; ++i) 422 for (i = 0; i < netlist.number; ++i)
423 { 423 {
424 printf ("Device %i: %s\n", i, tmp[i]); 424 fprintf (stderr, "Device %i: %s\n", i, tmp[i]);
425 glibtop_get_netload (&netload, tmp[i]); 425 glibtop_get_netload (&netload, tmp[i]);
426 address = (uint8_t *) &netload.address; 426 address = (uint8_t *) &netload.address;
427 netmask = (uint8_t *) &netload.subnet; 427 netmask = (uint8_t *) &netload.subnet;
428 inet_ntop (AF_INET6, netload.address6, address6_string, INET6_ADDRSTRLEN); 428 inet_ntop (AF_INET6, netload.address6, address6_string, INET6_ADDRSTRLEN);
429 inet_ntop (AF_INET6, netload.prefix6, prefix6_string, INET6_ADDRSTRLEN); 429 inet_ntop (AF_INET6, netload.prefix6, prefix6_string, INET6_ADDRSTRLEN);
430 printf ("\t%-50s: %u.%u.%u.%u\n", "IPv4 subnet", netmask[0], netmask[1], netmask[2],netmask[3]); 430 fprintf (stderr, "\t%-50s: %u.%u.%u.%u\n", "IPv4 subnet", netmask[0], netmask[1], netmask[2],netmask[3]);
431 printf ("\t%-50s: %u.%u.%u.%u\n", "IPv4 address", address[0], address[1], address[2],address[3]); 431 fprintf (stderr, "\t%-50s: %u.%u.%u.%u\n", "IPv4 address", address[0], address[1], address[2],address[3]);
432 printf ("\t%-50s: %s\n", "IPv6 prefix", prefix6_string); 432 fprintf (stderr, "\t%-50s: %s\n", "IPv6 prefix", prefix6_string);
433 printf ("\t%-50s: %s\n", "IPv6 address", address6_string); 433 fprintf (stderr, "\t%-50s: %s\n", "IPv6 address", address6_string);
434 434
435 435
436 printf ("\t%-50s: %llu\n", "bytes in", (long long unsigned int) netload.bytes_in); 436 fprintf (stderr, "\t%-50s: %llu\n", "bytes in", (long long unsigned int) netload.bytes_in);
437 printf ("\t%-50s: %llu\n", "bytes out", (long long unsigned int) netload.bytes_out); 437 fprintf (stderr, "\t%-50s: %llu\n", "bytes out", (long long unsigned int) netload.bytes_out);
438 printf ("\t%-50s: %llu\n", "bytes total", (long long unsigned int) netload.bytes_total); 438 fprintf (stderr, "\t%-50s: %llu\n", "bytes total", (long long unsigned int) netload.bytes_total);
439 } 439 }
440 printf ("\n"); 440 fprintf (stderr, "\n");
441} 441}
442#endif 442#endif
443 443
diff --git a/src/sysmon/sysmon.conf.in b/src/sysmon/sysmon.conf.in
index be103ddaf..1e502d107 100644
--- a/src/sysmon/sysmon.conf.in
+++ b/src/sysmon/sysmon.conf.in
@@ -6,6 +6,6 @@ HOME = $SERVICEHOME
6BINARY = gnunet_service_sysmon 6BINARY = gnunet_service_sysmon
7#CFGFILE = sysmon-properties.conf 7#CFGFILE = sysmon-properties.conf
8UNIXPATH = /tmp/gnunet-service-sysmon.sock 8UNIXPATH = /tmp/gnunet-service-sysmon.sock
9MONITOR_SERVICES = transport core fs dht 9MONITOR_SERVICES = transport core topology hostlist dht nse mesh fs gns
10MONITOR_SERVICES_INTERVAL = 60 s 10MONITOR_SERVICES_INTERVAL = 60 s
11MONITOR_NETWORK_INTERVAL = 60 s \ No newline at end of file 11MONITOR_NETWORK_INTERVAL = 60 s \ No newline at end of file