From 23fecf8f3d2469a3de4f7ffae16224b0d21cc265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 29 Jan 2018 12:17:20 +0100 Subject: cuirass: Log resource usage statistics regularly. * src/cuirass/logging.scm (log-monitoring-stats): New procedure. * bin/cuirass.in (main): Add a fiber that calls it regularly. --- bin/cuirass.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bin') diff --git a/bin/cuirass.in b/bin/cuirass.in index 580c2be..5c11ff0 100644 --- a/bin/cuirass.in +++ b/bin/cuirass.in @@ -142,6 +142,14 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" (run-cuirass-server db #:host host #:port port)))) #:parallel? #t) + (spawn-fiber + (essential-task + 'monitor exit-channel + (lambda () + (while #t + (log-monitoring-stats) + (sleep 600))))) + (primitive-exit (get-message exit-channel)))))) ;; Most of our code is I/O so preemption doesn't matter much (it -- cgit v1.2.3