-static void commands_write (char *host, char *inst, char *val)
-{
- char buf[BUFSIZE];
-
- if (snprintf (buf, BUFSIZE, commands_file, inst) >= BUFSIZE)
- return;
-
- rrd_update_file (host, buf, val, commands_ds_def, commands_ds_num);
-}
-
-static void handler_write (char *host, char *inst, char *val)
-{
- char buf[BUFSIZE];
-
- if (snprintf (buf, BUFSIZE, handler_file, inst) >= BUFSIZE)
- return;
-
- rrd_update_file (host, buf, val, handler_ds_def, handler_ds_num);
-}
-
-static void qcache_write (char *host, char *inst, char *val)
-{
- rrd_update_file (host, qcache_file, val,
- qcache_ds_def, qcache_ds_num);
-}
-
-static void threads_write (char *host, char *inst, char *val)
-{
- rrd_update_file (host, threads_file, val,
- threads_ds_def, threads_ds_num);
-}
-
-static void traffic_write (char *host, char *inst, char *val)
-{
- rrd_update_file (host, traffic_file, val,
- traffic_ds_def, traffic_ds_num);
-}
-
-#if MYSQL_HAVE_READ
-static void commands_submit (char *inst, unsigned long long value)
-{
- char buf[BUFSIZE];
- int status;
-
- status = snprintf (buf, BUFSIZE, "%u:%llu", (unsigned int) curtime, value);
-
- if (status < 0)
- {
- syslog (LOG_ERR, "snprintf failed");
- return;
- }
- else if (status >= BUFSIZE)
- {
- syslog (LOG_WARNING, "snprintf was truncated");
- return;
- }
-
- plugin_submit ("mysql_commands", inst, buf);
-}
-
-static void handler_submit (char *inst, unsigned long long value)