diff options
Diffstat (limited to 'src/testbed/gnunet-service-testbed_cpustatus.c')
-rw-r--r-- | src/testbed/gnunet-service-testbed_cpustatus.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c index 129088c40..4071c7172 100644 --- a/src/testbed/gnunet-service-testbed_cpustatus.c +++ b/src/testbed/gnunet-service-testbed_cpustatus.c | |||
@@ -318,7 +318,7 @@ updateUsage () | |||
318 | kc = kstat_open (); | 318 | kc = kstat_open (); |
319 | if (kc == NULL) | 319 | if (kc == NULL) |
320 | { | 320 | { |
321 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kstat_close"); | 321 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kstat_close"); |
322 | goto ABORT_KSTAT; | 322 | goto ABORT_KSTAT; |
323 | } | 323 | } |
324 | 324 | ||
@@ -633,7 +633,7 @@ get_nproc () | |||
633 | nproc = 0; | 633 | nproc = 0; |
634 | while (NULL != (ent = readdir (dir))) | 634 | while (NULL != (ent = readdir (dir))) |
635 | { | 635 | { |
636 | if((*ent->d_name > '0') && (*ent->d_name <= '9')) | 636 | if((*ent->d_name > '0') && (*ent->d_name <= '9')) |
637 | nproc++; | 637 | nproc++; |
638 | } | 638 | } |
639 | closedir (dir); | 639 | closedir (dir); |
@@ -669,14 +669,14 @@ sample_load_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
669 | now = GNUNET_TIME_absolute_get (); | 669 | now = GNUNET_TIME_absolute_get (); |
670 | nbs = GNUNET_asprintf (&str, "%llu %d %d %u %u\n", now.abs_value_us / 1000LL / 1000LL, | 670 | nbs = GNUNET_asprintf (&str, "%llu %d %d %u %u\n", now.abs_value_us / 1000LL / 1000LL, |
671 | ld_cpu, ld_disk, mem_usage, nproc); | 671 | ld_cpu, ld_disk, mem_usage, nproc); |
672 | if (0 < nbs) | 672 | if (0 < nbs) |
673 | { | 673 | { |
674 | GNUNET_BIO_write (bw, str, nbs); | 674 | GNUNET_BIO_write (bw, str, nbs); |
675 | } | 675 | } |
676 | else | 676 | else |
677 | GNUNET_break (0); | 677 | GNUNET_break (0); |
678 | GNUNET_free (str); | 678 | GNUNET_free (str); |
679 | 679 | ||
680 | reschedule: | 680 | reschedule: |
681 | sample_load_task_id = | 681 | sample_load_task_id = |
682 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 682 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
@@ -696,7 +696,7 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
696 | char *stats_dir; | 696 | char *stats_dir; |
697 | char *fn; | 697 | char *fn; |
698 | size_t len; | 698 | size_t len; |
699 | 699 | ||
700 | #if MINGW | 700 | #if MINGW |
701 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 701 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
702 | "Load statistics logging now available for windows\n"); | 702 | "Load statistics logging now available for windows\n"); |
@@ -716,7 +716,7 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
716 | GNUNET_free (hostname); | 716 | GNUNET_free (hostname); |
717 | return; | 717 | return; |
718 | } | 718 | } |
719 | fn = NULL; | 719 | fn = NULL; |
720 | (void) GNUNET_asprintf (&fn, "%s/%.*s-%jd.dat", stats_dir, len, | 720 | (void) GNUNET_asprintf (&fn, "%s/%.*s-%jd.dat", stats_dir, len, |
721 | hostname, (intmax_t) getpid()); | 721 | hostname, (intmax_t) getpid()); |
722 | GNUNET_free (stats_dir); | 722 | GNUNET_free (stats_dir); |
@@ -740,7 +740,7 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
740 | initMachCpuStats (); | 740 | initMachCpuStats (); |
741 | #endif | 741 | #endif |
742 | updateUsage (); /* initialize */ | 742 | updateUsage (); /* initialize */ |
743 | 743 | ||
744 | } | 744 | } |
745 | 745 | ||
746 | 746 | ||