+static void threads_submit (int running, int connected, int cached)
+{
+ char buf[BUFSIZE];
+ int status;
+
+ status = snprintf (buf, BUFSIZE, "%u:%i:%i:%i", (unsigned int) curtime,
+ running, connected, cached);
+
+ if (status < 0)
+ {
+ syslog (LOG_ERR, "snprintf failed");
+ return;
+ }
+ else if (status >= BUFSIZE)
+ {
+ syslog (LOG_WARNING, "snprintf was truncated");
+ return;
+ }
+
+ plugin_submit ("mysql_threads", "-", buf);
+}
+