+ ovs_mutex_lock(&mutex);
+ while (!enabled) {
+ ovs_mutex_cond_wait(&cond, &mutex);
+ }
+ ovs_mutex_unlock(&mutex);
+
+ stats = xmalloc(sizeof *stats);
+ smap_init(stats);
+ get_cpu_cores(stats);
+ get_load_average(stats);
+ get_memory_stats(stats);
+ get_process_stats(stats);
+ get_filesys_stats(stats);
+
+ ovs_mutex_lock(&mutex);
+ discard_stats();
+ system_stats = stats;
+ latch_set(&latch);
+ ovs_mutex_unlock(&mutex);
+
+ next_refresh = time_msec() + SYSTEM_STATS_INTERVAL;
+ do {
+ poll_timer_wait_until(next_refresh);
+ poll_block();
+ } while (time_msec() < next_refresh);
+ }