summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: decc470)
raw | patch | inline | side by side (parent: decc470)
author | Jérôme Renard <jerome.renard@gmail.com> | |
Sun, 6 Jun 2010 06:50:33 +0000 (08:50 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 7 Jun 2010 12:40:47 +0000 (14:40 +0200) |
src/collectd.conf.in | patch | blob | history | |
src/types.db | patch | blob | history | |
src/varnish.c | patch | blob | history |
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index b8d8b8d7cc701aa3b2103dcc4003856c9344b9a2..2e31ea35c8e001fee1806502e75632247e3abdba 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
# - SHM MTX contention
# - SHM cycles through buffer
# MonitorSHM yes
+#
+# Will monitor:
+# - SMA allocator requests
+# - SMA outstanding allocations
+# - SMA outstanding bytes
+# - SMA bytes allocated
+# - SMA bytes free
+# MonitorSMA yes
#</Plugin>
#<Plugin vmem>
diff --git a/src/types.db b/src/types.db
index 7df495c5c7fd444c8840f83cafb3f2899e2b597b..3444e45acd0d5c601e3a41b25ae9d2509240d0cc 100644 (file)
--- a/src/types.db
+++ b/src/types.db
varnish_fetch value:GAUGE:0:U
varnish_hcb value:GAUGE:0:U
varnish_shm value:GAUGE:0:U
+varnish_sma value:GAUGE:0:U
virt_cpu_total ns:COUNTER:0:256000000000
virt_vcpu ns:COUNTER:0:1000000000
vmpage_action value:COUNTER:0:4294967295
diff --git a/src/varnish.c b/src/varnish.c
index 55afe295399add821f3b5c4f7b0e683b05a35443..d298ab8af1143a61ec4b3105d63fd918af148b2b 100644 (file)
--- a/src/varnish.c
+++ b/src/varnish.c
* sm_nobj outstanding allocations N
* sm_balloc bytes allocated N
* sm_bfree bytes free N
- * sma_nreq SMA allocator requests N
- * sma_nobj SMA outstanding allocations N
- * sma_nbytes SMA outstanding bytes N
- * sma_balloc SMA bytes allocated N
- * sma_bfree SMA bytes free N
+ * sma_nreq SMA allocator requests Y
+ * sma_nobj SMA outstanding allocations Y
+ * sma_nbytes SMA outstanding bytes Y
+ * sma_balloc SMA bytes allocated Y
+ * sma_bfree SMA bytes free Y
* sms_nreq SMS allocator requests N
* sms_nobj SMS outstanding allocations N
* sms_nbytes SMS outstanding bytes N
int monitor_fetch;
int monitor_hcb;
int monitor_shm;
+ int monitor_sma;
};
typedef struct user_config_s user_config_t; /* }}} */
"MonitorBackend",
"MonitorFetch",
"MonitorHCB",
- "MonitorSHM"
+ "MonitorSHM",
+ "MonitorSMA"
};
static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); /* }}} */
SET_MONITOR_FLAG("MonitorFetch" , monitor_fetch , value);
SET_MONITOR_FLAG("MonitorHCB" , monitor_hcb , value);
SET_MONITOR_FLAG("MonitorSHM" , monitor_shm , value);
+ SET_MONITOR_FLAG("MonitorSMA" , monitor_sma , value);
return (0);
} /* }}} */
varnish_submit("varnish_shm", "shm_contention", VSL_stats->shm_cont); /* SHM MTX contention */
varnish_submit("varnish_shm", "shm_cycles" , VSL_stats->shm_cycles); /* SHM cycles through buffer */
}
+
+ if(user_config.monitor_sma == 1)
+ {
+ varnish_submit("varnish_sma", "sma_req" , VSL_stats->sma_nreq); /* SMA allocator requests */
+ varnish_submit("varnish_sma", "sma_nobj" , VSL_stats->sma_nobj); /* SMA outstanding allocations */
+ varnish_submit("varnish_sma", "sma_nbytes", VSL_stats->sma_nbytes); /* SMA outstanding bytes */
+ varnish_submit("varnish_sma", "sma_balloc", VSL_stats->sma_balloc); /* SMA bytes allocated */
+ varnish_submit("varnish_sma", "sma_bfree" , VSL_stats->sma_bfree); /* SMA bytes free */
+ }
} /* }}} */
static int varnish_read(void) /* {{{ */