本文整理汇总了C++中plugin_register_read函数的典型用法代码示例。如果您正苦于以下问题:C++ plugin_register_read函数的具体用法?C++ plugin_register_read怎么用?C++ plugin_register_read使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plugin_register_read函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: module_register
void module_register (void)
{
plugin_register_config ("basic_aggregator", basic_aggregator_config,
config_keys, config_keys_num);
plugin_register_read ("instances_of_types_update", instances_of_types_tree_update);
plugin_register_read ("basic_aggregator_read_all_aggregators", basic_aggregator_read_all_aggregators);
}
示例2: thermal_init
static int thermal_init (void)
{
int ret = -1;
if (!force_procfs && access (dirname_sysfs, R_OK | X_OK) == 0) {
ret = plugin_register_read ("thermal", thermal_sysfs_read);
} else if (access (dirname_procfs, R_OK | X_OK) == 0) {
ret = plugin_register_read ("thermal", thermal_procfs_read);
}
if (!ret) {
vl_temp_template.values_len = 1;
vl_temp_template.interval = interval_g;
sstrncpy (vl_temp_template.host, hostname_g,
sizeof(vl_temp_template.host));
sstrncpy (vl_temp_template.plugin, "thermal",
sizeof(vl_temp_template.plugin));
sstrncpy (vl_temp_template.type_instance, "temperature",
sizeof(vl_temp_template.type_instance));
vl_state_template = vl_temp_template;
sstrncpy (vl_state_template.type_instance, "cooling_state",
sizeof(vl_state_template.type_instance));
}
return ret;
}
示例3: module_register
void module_register (void)
{
plugin_register_complex_config ("tail", ctail_config);
plugin_register_init ("tail", ctail_init);
plugin_register_read ("tail", ctail_read);
plugin_register_shutdown ("tail", ctail_shutdown);
} /* void module_register */
示例4: module_register
void module_register (void)
{
plugin_register_config ("apcups", apcups_config, config_keys,
config_keys_num);
plugin_register_read ("apcups", apcups_read);
plugin_register_shutdown ("apcups", apcups_shutdown);
} /* void module_register */
示例5: rc_init
static int rc_init (void)
{
if (config_collect_stats)
plugin_register_read ("rrdcached", rc_read);
return (0);
} /* int rc_init */
示例6: module_register
void module_register (void)
{
plugin_register_init ("ipvs", cipvs_init);
plugin_register_read ("ipvs", cipvs_read);
plugin_register_shutdown ("ipvs", cipvs_shutdown);
return;
} /* module_register */
示例7: module_register
void module_register(void)
{
plugin_register_complex_config("ceph", ceph_config);
plugin_register_init("ceph", ceph_init);
plugin_register_read("ceph", ceph_read);
plugin_register_shutdown("ceph", ceph_shutdown);
}
示例8: xencpu_read
static int xencpu_read (void)
{
cdtime_t now = cdtime ();
int rc, nr_cpus;
rc = xc_getcpuinfo(xc_handle, num_cpus, cpu_info, &nr_cpus);
if (rc < 0) {
ERROR ("xencpu: xc_getcpuinfo() Failed: %d %s\n", rc, xc_strerror(xc_handle,errno));
return (-1);
}
int status;
for (int cpu = 0; cpu < nr_cpus; cpu++) {
gauge_t rate = NAN;
value_t value = {.derive = cpu_info[cpu].idletime};
status = value_to_rate (&rate, value, DS_TYPE_DERIVE, now, &cpu_states[cpu]);
if (status == 0) {
submit_value(cpu, 100 - rate/10000000);
}
}
return (0);
} /* static int xencpu_read */
void module_register (void)
{
plugin_register_init ("xencpu", xencpu_init);
plugin_register_read ("xencpu", xencpu_read);
plugin_register_shutdown ("xencpu", xencpu_shutdown);
} /* void module_register */
示例9: module_register
void module_register (void)
{
plugin_register_config ("madwifi", madwifi_config,
config_keys, config_keys_num);
plugin_register_read ("madwifi", madwifi_read);
}
示例10: module_register
void module_register (void)
{
plugin_register_config ("olsrd", olsrd_config,
config_keys, config_keys_num);
plugin_register_read ("olsrd", olsrd_read);
plugin_register_shutdown ("olsrd", olsrd_shutdown);
} /* void module_register */
示例11: module_register
void module_register (void)
{
plugin_register_complex_config ("statsd", statsd_config);
plugin_register_init ("statsd", statsd_init);
plugin_register_read ("statsd", statsd_read);
plugin_register_shutdown ("statsd", statsd_shutdown);
}
示例12: module_register
void module_register (void) /* {{{ */
{
plugin_register_complex_config ("oracle", o_config);
plugin_register_init ("oracle", o_init);
plugin_register_read ("oracle", o_read);
plugin_register_shutdown ("oracle", o_shutdown);
} /* }}} void module_register */
示例13: module_register
void module_register (void)
{
plugin_register_config ("swap", swap_config,
config_keys, config_keys_num);
plugin_register_init ("swap", swap_init);
plugin_register_read ("swap", swap_read);
} /* void module_register */
示例14: module_register
void module_register (void)
{
plugin_register_read (PLUGIN_NAME, docker_read);
plugin_register_init (PLUGIN_NAME, docker_init);
plugin_register_shutdown (PLUGIN_NAME, docker_shutdown);
return;
}
示例15: module_register
void module_register (void)
{
plugin_register_config ("cgroups", cgroups_config,
config_keys, config_keys_num);
plugin_register_init ("cgroups", cgroups_init);
plugin_register_read ("cgroups", cgroups_read);
} /* void module_register */