• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ plugin_dispatch_values函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中plugin_dispatch_values函数的典型用法代码示例。如果您正苦于以下问题:C++ plugin_dispatch_values函数的具体用法?C++ plugin_dispatch_values怎么用?C++ plugin_dispatch_values使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了plugin_dispatch_values函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: mbmon_submit

static void mbmon_submit (const char *type, const char *type_instance,
		double value)
{
	value_t values[1];
	value_list_t vl = VALUE_LIST_INIT;

	values[0].gauge = value;

	vl.values = values;
	vl.values_len = 1;
	vl.time = time (NULL);
	sstrncpy (vl.host, hostname_g, sizeof (vl.host));
	sstrncpy (vl.plugin, "mbmon", sizeof (vl.plugin));
	sstrncpy (vl.type, type, sizeof (vl.type));
	sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));

	plugin_dispatch_values (&vl);
} /* void mbmon_submit */
开发者ID:johnl,项目名称:collectd,代码行数:18,代码来源:mbmon.c


示例2: submit

static void submit (const char *plugin_instance, const char *type,
    const char *type_instance, value_t *values, int values_len)
{
  value_list_t vl = VALUE_LIST_INIT;

  vl.values = values;
  vl.values_len = values_len;

  sstrncpy (vl.host, hostname_g, sizeof (vl.host));
  sstrncpy (vl.plugin, "vmem", sizeof (vl.plugin));
  if (plugin_instance != NULL)
    sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
  sstrncpy (vl.type, type, sizeof (vl.type));
  if (type_instance != NULL)
    sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));

  plugin_dispatch_values (&vl);
} /* void vmem_submit */
开发者ID:icosmin,项目名称:collectd,代码行数:18,代码来源:vmem.c


示例3: cc_submit

static void cc_submit (const web_page_t *wp, const web_match_t *wm, /* {{{ */
    const cu_match_value_t *mv)
{
  value_t values[1];
  value_list_t vl = VALUE_LIST_INIT;

  values[0] = mv->value;

  vl.values = values;
  vl.values_len = 1;
  sstrncpy (vl.host, hostname_g, sizeof (vl.host));
  sstrncpy (vl.plugin, "curl", sizeof (vl.plugin));
  sstrncpy (vl.plugin_instance, wp->instance, sizeof (vl.plugin_instance));
  sstrncpy (vl.type, wm->type, sizeof (vl.type));
  sstrncpy (vl.type_instance, wm->instance, sizeof (vl.type_instance));

  plugin_dispatch_values (&vl);
} /* }}} void cc_submit */
开发者ID:e98cuenc,项目名称:collectd,代码行数:18,代码来源:curl.c


示例4: thermal_submit

static void thermal_submit (const char *plugin_instance, enum dev_type dt,
		value_t value)
{
	value_list_t vl = VALUE_LIST_INIT;

	vl.values = &value;
	vl.values_len = 1;

	sstrncpy (vl.plugin, "thermal", sizeof(vl.plugin));
	if (plugin_instance != NULL)
		sstrncpy (vl.plugin_instance, plugin_instance,
				sizeof (vl.plugin_instance));
	sstrncpy (vl.type,
			(dt == TEMP) ? "temperature" : "gauge",
			sizeof (vl.type));

	plugin_dispatch_values (&vl);
}
开发者ID:Whissi,项目名称:collectd,代码行数:18,代码来源:thermal.c


示例5: submit

static void submit (const char *host, const char *type, /* {{{ */
    gauge_t value)
{
  value_t values[1];
  value_list_t vl = VALUE_LIST_INIT;

  values[0].gauge = value;

  vl.values = values;
  vl.values_len = 1;
  sstrncpy (vl.host, hostname_g, sizeof (vl.host));
  sstrncpy (vl.plugin, "ping", sizeof (vl.plugin));
  sstrncpy (vl.plugin_instance, "", sizeof (vl.plugin_instance));
  sstrncpy (vl.type_instance, host, sizeof (vl.type_instance));
  sstrncpy (vl.type, type, sizeof (vl.type));

  plugin_dispatch_values (&vl);
} /* }}} void ping_submit */
开发者ID:baryluk,项目名称:collectd,代码行数:18,代码来源:ping.c


示例6: pf_submit

static void pf_submit(char const *type, char const *type_instance, uint64_t val,
                      _Bool is_gauge) {
  value_t values[1];
  value_list_t vl = VALUE_LIST_INIT;

  if (is_gauge)
    values[0].gauge = (gauge_t)val;
  else
    values[0].derive = (derive_t)val;

  vl.values = values;
  vl.values_len = 1;
  sstrncpy(vl.plugin, "pf", sizeof(vl.plugin));
  sstrncpy(vl.type, type, sizeof(vl.type));
  sstrncpy(vl.type_instance, type_instance, sizeof(vl.type_instance));

  plugin_dispatch_values(&vl);
} /* void pf_submit */
开发者ID:EMSL-MSC,项目名称:collectd,代码行数:18,代码来源:pf.c


示例7: cpu_submit

static void
cpu_submit (unsigned long long cpu_time,
            virDomainPtr dom, const char *type)
{
    value_t values[1];
    value_list_t vl = VALUE_LIST_INIT;

    init_value_list (&vl, dom);

    values[0].derive = cpu_time;

    vl.values = values;
    vl.values_len = 1;

    sstrncpy (vl.type, type, sizeof (vl.type));

    plugin_dispatch_values (&vl);
}
开发者ID:Chronial,项目名称:collectd,代码行数:18,代码来源:virt.c


示例8: cr_submit_io

static void cr_submit_io (cr_data_t *rd, const char *type, /* {{{ */
    const char *type_instance, derive_t rx, derive_t tx)
{
	value_t values[2];
	value_list_t vl = VALUE_LIST_INIT;

	values[0].derive = rx;
	values[1].derive = tx;

	vl.values = values;
	vl.values_len = STATIC_ARRAY_SIZE (values);
	sstrncpy (vl.host, rd->node, sizeof (vl.host));
	sstrncpy (vl.plugin, "routeros", sizeof (vl.plugin));
	sstrncpy (vl.type, type, sizeof (vl.type));
	sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));

	plugin_dispatch_values (&vl);
} /* }}} void cr_submit_io */
开发者ID:brd,项目名称:collectd,代码行数:18,代码来源:routeros.c


示例9: memory_submit

static void
memory_submit (gauge_t memory, virDomainPtr dom)
{
    value_t values[1];
    value_list_t vl = VALUE_LIST_INIT;

    init_value_list (&vl, dom);

    values[0].gauge = memory;

    vl.values = values;
    vl.values_len = 1;

    sstrncpy (vl.type, "memory", sizeof (vl.type));
    sstrncpy (vl.type_instance, "total", sizeof (vl.type_instance));

    plugin_dispatch_values (&vl);
}
开发者ID:Chronial,项目名称:collectd,代码行数:18,代码来源:virt.c


示例10: submit_derive2

static void submit_derive2 (const char *type, const char *type_inst,
    derive_t value0, derive_t value1, memcached_t *st)
{
  value_t values[2];
  value_list_t vl = VALUE_LIST_INIT;
  memcached_init_vl (&vl, st);

  values[0].derive = value0;
  values[1].derive = value1;

  vl.values = values;
  vl.values_len = 2;
  sstrncpy (vl.type, type, sizeof (vl.type));
  if (type_inst != NULL)
    sstrncpy (vl.type_instance, type_inst, sizeof (vl.type_instance));

  plugin_dispatch_values (&vl);
}
开发者ID:beorn-,项目名称:collectd,代码行数:18,代码来源:memcached.c


示例11: submit_counter

static void submit_counter (const char *type, const char *type_inst,
		counter_t value) /* {{{ */
{
	value_t values[1];
	value_list_t vl = VALUE_LIST_INIT;

	values[0].counter = value;

	vl.values = values;
	vl.values_len = 1;
	sstrncpy (vl.host, hostname_g, sizeof (vl.host));
	sstrncpy (vl.plugin, "memcached", sizeof (vl.plugin));
	sstrncpy (vl.type, type, sizeof (vl.type));
	if (type_inst != NULL)
		sstrncpy (vl.type_instance, type_inst, sizeof (vl.type_instance));

	plugin_dispatch_values (&vl);
} /* void memcached_submit_cmd */
开发者ID:absperf,项目名称:collectd,代码行数:18,代码来源:memcached.c


示例12: tt_submit

static void tt_submit (gauge_t val, const char* type)
{
    value_t values[1];
    value_list_t vl = VALUE_LIST_INIT;

    values[0].gauge = val;

    vl.values = values;
    vl.values_len = STATIC_ARRAY_SIZE (values);

    sstrncpy (vl.host, config_host, sizeof (vl.host));
    sstrncpy (vl.plugin, "tokyotyrant", sizeof (vl.plugin));
    sstrncpy (vl.plugin_instance, config_port,
              sizeof (vl.plugin_instance));
    sstrncpy (vl.type, type, sizeof (vl.type));

    plugin_dispatch_values (&vl);
}
开发者ID:paul,项目名称:collectd,代码行数:18,代码来源:tokyotyrant.c


示例13: conn_submit_port_total

static void conn_submit_port_total (void)
{
  value_t values[1];
  value_list_t vl = VALUE_LIST_INIT;

  conn_prepare_vl (&vl, values);

  sstrncpy (vl.plugin_instance, "all", sizeof (vl.plugin_instance));

  for (int i = 1; i <= TCP_STATE_MAX; i++)
  {
    vl.values[0].gauge = count_total[i];

    sstrncpy (vl.type_instance, tcp_state[i], sizeof (vl.type_instance));

    plugin_dispatch_values (&vl);
  }
}
开发者ID:Whissi,项目名称:collectd,代码行数:18,代码来源:tcpconns.c


示例14: thermal_submit

static void thermal_submit (const char *plugin_instance, enum dev_type dt,
		gauge_t value)
{
	value_list_t vl = (dt == TEMP) ? vl_temp_template : vl_state_template;
	value_t vt;

	vt.gauge = value;

	vl.values = &vt;
	vl.time = time (NULL);
	sstrncpy (vl.plugin, "thermal", sizeof(vl.plugin));
	sstrncpy (vl.plugin_instance, plugin_instance,
			sizeof(vl.plugin_instance));
	sstrncpy (vl.type, (dt == TEMP) ? "temperature" : "gauge",
			sizeof (vl.type));

	plugin_dispatch_values (&vl);
}
开发者ID:johnl,项目名称:collectd,代码行数:18,代码来源:thermal.c


示例15: vcpu_submit

static void
vcpu_submit (derive_t cpu_time,
             virDomainPtr dom, int vcpu_nr, const char *type)
{
    value_t values[1];
    value_list_t vl = VALUE_LIST_INIT;

    init_value_list (&vl, dom);

    values[0].derive = cpu_time;
    vl.values = values;
    vl.values_len = 1;

    sstrncpy (vl.type, type, sizeof (vl.type));
    ssnprintf (vl.type_instance, sizeof (vl.type_instance), "%d", vcpu_nr);

    plugin_dispatch_values (&vl);
}
开发者ID:Chronial,项目名称:collectd,代码行数:18,代码来源:virt.c


示例16: submit

static void submit (int cpu_num, const char *type_instance, counter_t value)
{
	value_t values[1];
	value_list_t vl = VALUE_LIST_INIT;

	values[0].counter = value;

	vl.values = values;
	vl.values_len = 1;
	sstrncpy (vl.host, hostname_g, sizeof (vl.host));
	sstrncpy (vl.plugin, "cpu", sizeof (vl.plugin));
	ssnprintf (vl.plugin_instance, sizeof (vl.plugin_instance),
			"%i", cpu_num);
	sstrncpy (vl.type, "cpu", sizeof (vl.type));
	sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));

	plugin_dispatch_values (&vl);
}
开发者ID:absperf,项目名称:collectd,代码行数:18,代码来源:cpu.c


示例17: nut_submit

static void nut_submit (nut_ups_t *ups, const char *type,
    const char *type_instance, gauge_t value)
{
  value_list_t vl = VALUE_LIST_INIT;

  vl.values = &(value_t) { .gauge = value };
  vl.values_len = 1;
  sstrncpy (vl.host,
      (strcasecmp (ups->hostname, "localhost") == 0)
      ? hostname_g
      : ups->hostname,
      sizeof (vl.host));
  sstrncpy (vl.plugin, "nut", sizeof (vl.plugin));
  sstrncpy (vl.plugin_instance, ups->upsname, sizeof (vl.plugin_instance));
  sstrncpy (vl.type, type, sizeof (vl.type));
  sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));

  plugin_dispatch_values (&vl);
} /* void nut_submit */
开发者ID:Whissi,项目名称:collectd,代码行数:19,代码来源:nut.c


示例18: submit_gauge2

static void submit_gauge2 (const char *type, const char *type_inst,
		gauge_t value0, gauge_t value1) /* {{{ */
{
	value_t values[2];
	value_list_t vl = VALUE_LIST_INIT;

	values[0].gauge = value0;
	values[1].gauge = value1;

	vl.values = values;
	vl.values_len = 2;
	sstrncpy (vl.host, hostname_g, sizeof (vl.host));
	sstrncpy (vl.plugin, "memcached", sizeof (vl.plugin));
	sstrncpy (vl.type, type, sizeof (vl.type));
	if (type_inst != NULL)
		sstrncpy (vl.type_instance, type_inst, sizeof (vl.type_instance));

	plugin_dispatch_values (&vl);
}
开发者ID:amosshapira,项目名称:collectd,代码行数:19,代码来源:memcached.c


示例19: submit

static void submit (const char *dev, const char *type, const char *ti1,
			const char *ti2, value_t *val, int len)
{
	value_list_t vl = VALUE_LIST_INIT;

	vl.values = val;
	vl.values_len = len;
	sstrncpy (vl.host, hostname_g, sizeof (vl.host));
	sstrncpy (vl.plugin, "madwifi", sizeof (vl.plugin));
	sstrncpy (vl.plugin_instance, dev, sizeof (vl.plugin_instance));
	sstrncpy (vl.type, type, sizeof (vl.type));

	if ((ti1 != NULL) && (ti2 != NULL))
		ssnprintf (vl.type_instance, sizeof (vl.type_instance), "%s-%s", ti1, ti2);
	else if ((ti1 != NULL) && (ti2 == NULL))
		sstrncpy (vl.type_instance, ti1, sizeof (vl.type_instance));

	plugin_dispatch_values (&vl);
}
开发者ID:fcagsaway,项目名称:collectd,代码行数:19,代码来源:madwifi.c


示例20: irq_submit

static void irq_submit (const char *irq_name, derive_t value)
{
	value_t values[1];
	value_list_t vl = VALUE_LIST_INIT;

	if (ignorelist_match (ignorelist, irq_name) != 0)
		return;

	values[0].derive = value;

	vl.values = values;
	vl.values_len = 1;
	sstrncpy (vl.host, hostname_g, sizeof (vl.host));
	sstrncpy (vl.plugin, "irq", sizeof (vl.plugin));
	sstrncpy (vl.type, "irq", sizeof (vl.type));
	sstrncpy (vl.type_instance, irq_name, sizeof (vl.type_instance));

	plugin_dispatch_values (&vl);
} /* void irq_submit */
开发者ID:he32,项目名称:collectd,代码行数:19,代码来源:irq.c



注:本文中的plugin_dispatch_values函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ plugin_register函数代码示例发布时间:2022-05-30
下一篇:
C++ plugin函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap