diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c
index 349e1133..6d2dda4b 100644
--- a/plugins/python/uwsgi_pymodule.c
+++ b/plugins/python/uwsgi_pymodule.c
@@ -1251,6 +1251,10 @@ PyObject *py_uwsgi_send_spool(PyObject * self, PyObject * args, PyObject *kw) {
Py_INCREF(Py_None);
return Py_None;
}
+
+PyObject *py_uwsgi_spooler_pid(PyObject * self, PyObject * args) {
+ return PyInt_FromLong(uwsgi.shared->spooler_pid ? uwsgi.shared->spooler_pid : 0);
+}
#endif
PyObject *py_uwsgi_send_multi_message(PyObject * self, PyObject * args) {
@@ -2262,6 +2266,7 @@ static PyMethodDef uwsgi_spooler_methods[] = {
#endif
{"set_spooler_frequency", py_uwsgi_spooler_freq, METH_VARARGS, ""},
{"spooler_jobs", py_uwsgi_spooler_jobs, METH_VARARGS, ""},
+ {"spooler_pid", py_uwsgi_spooler_pid, METH_VARARGS, ""},
{NULL, NULL},
};
#endif
diff --git a/uwsgicc/templates/index.html b/uwsgicc/templates/index.html
index 4a38c43c..d67b9aa4 100644
--- a/uwsgicc/templates/index.html
+++ b/uwsgicc/templates/index.html
@@ -204,6 +204,9 @@ $(document).ready(function() {
cores: {{ uwsgi.cores }}
masterpid: {{uwsgi.masterpid()}}
cluster: {{uwsgi.cluster()}}
+{% if uwsgi.opt['spooler'] %}
+spooler pid: {{uwsgi.spooler_pid()}}
+{% endif %}