Skip to content

Commit dadafe1

Browse files
committed
refactor: Update sensor module to target module changes
1 parent e255354 commit dadafe1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/sensor.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ usage()
4141
{
4242
fprintf(stderr, "usage: smartwatts-sensor [-v] [-f FREQUENCY] [-p CGROUP_PATH] -n SENSOR_NAME\n"
4343
"\t-c | -s EVENT_GROUP_NAME [-o] -e EVENT_NAME\n"
44-
"\t-r csv | mongodb\n"
45-
"\t CSV: -O OUTPUT_DIR\n"
46-
"\t MongoDB: -U MONGODB_URI -D MONGODB_DATABASE -C MONGODB_COLLECTION\n"
44+
"\t-r STORAGE_MODULE -U STORAGE_URL [-D STORAGE_D] [-C STORAGE_C]\n"
4745
);
4846
}
4947

@@ -93,7 +91,7 @@ sync_cgroups_running_monitored(struct hwinfo *hwinfo, zhashx_t *container_events
9391
for (cgroup_path = zhashx_first(cgroups_running); cgroup_path; cgroup_path = zhashx_next(cgroups_running)) {
9492
cgroup_name = zhashx_cursor(cgroups_running);
9593
if (!zhashx_lookup(container_monitoring_actors, cgroup_name)) {
96-
target = target_create(cgroup_name, cgroup_path);
94+
target = target_create(cgroup_path);
9795
monitor_config = perf_config_create(hwinfo, container_events_groups, target);
9896
perf_monitor = zactor_new(perf_monitoring_actor, monitor_config);
9997
zhashx_insert(container_monitoring_actors, cgroup_name, perf_monitor);
@@ -347,7 +345,7 @@ main (int argc, char **argv)
347345

348346
/* start system monitoring actor only when needed */
349347
if (zhashx_size(system_events_groups)) {
350-
system_target = target_create("system", NULL);
348+
system_target = target_create(NULL);
351349
system_monitor_config = perf_config_create(hwinfo, system_events_groups, system_target);
352350
system_perf_monitor = zactor_new(perf_monitoring_actor, system_monitor_config);
353351
}

0 commit comments

Comments
 (0)