struct ceph_daemon *d = (struct ceph_daemon *) arg;
int pc_type;
pc_type = atoi(val);
- DEBUG("ceph plugin: ceph_daemon_add_ds_entry(d=%s,key=%s,pc_type=%04x)",
- d->name, key, pc_type);
return ceph_daemon_add_ds_entry(d, key, pc_type);
}
{
double sum, result;
sscanf(val, "%lf", &sum);
- DEBUG("ceph plugin: avgcount:%" PRIu64,vtmp->avgcount);
- DEBUG("ceph plugin: sum:%lf",sum);
if(vtmp->avgcount == 0)
{
if(long_run_latency_avg)
{
result = (sum / vtmp->avgcount);
- DEBUG("ceph plugin: uv->gauge = sumd / avgcounti = :%lf", result);
}
else
{
{
return -ENOMEM;
}
- DEBUG("ceph plugin: uv->gauge = (sumd_now - sumd_last) / "
- "(avgcounti_now - avgcounti_last) = :%lf", result);
}
uv.gauge = result;
case DSET_BYTES:
sscanf(val, "%lf", &tmp_d);
uv.gauge = tmp_d;
- DEBUG("ceph plugin: uv->gauge = %lf",uv.gauge);
break;
case DSET_RATE:
sscanf(val, "%" PRIu64, &tmp_u);
uv.derive = tmp_u;
- DEBUG("ceph plugin: uv->derive = %" PRIu64 "",(uint64_t)uv.derive);
break;
case DSET_TYPE_UNFOUND:
default:
vtmp->vlist.values = &uv;
vtmp->vlist.values_len = 1;
- DEBUG("ceph plugin: dispatching %s\n", ds_name);
vtmp->index = (vtmp->index + 1);
plugin_dispatch_values(&vtmp->vlist);
}
else if(ret == 1)
{
- DEBUG("ceph plugin: did cconn_prepare(name=%s,i=%d,st=%d)",
- io->d->name, i, io->state);
polled_io_array[nfds++] = io_array + i;
}
}
{
/* finished */
ret = 0;
- DEBUG("ceph plugin: cconn_main_loop: no more cconn to manage.");
goto done;
}
gettimeofday(&tv, NULL);
static int ceph_init(void)
{
int ret;
- DEBUG("ceph plugin: ceph_init");
ceph_daemons_print();
ret = cconn_main_loop(ASOK_REQ_VERSION);