diff --git a/NEWS.md b/NEWS.md index e496be88..3e39115d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ * Handle SQL API errors by requesting no Varnish cache * Fix X-Cache-Channel for multilayer (by token) responses * Add last_modified field to POST layergroup response (#72) +* Deprecate signal handler for USR1, add handler for USR2 (#71) 1.1.8 ----- diff --git a/app.js b/app.js index 845a3cd6..7b5af0b5 100755 --- a/app.js +++ b/app.js @@ -46,6 +46,11 @@ ws.on('listening', function() { console.log("Windshaft tileserver started on " + global.environment.host + ':' + global.environment.port); }); +// DEPRECATED, use SIGUSR2 process.on('SIGUSR1', function() { ws.dumpCacheStats(); }); + +process.on('SIGUSR2', function() { + ws.dumpCacheStats(); +}); diff --git a/tools/munin/windshaft b/tools/munin/windshaft index 77adcb23..30adaf15 100755 --- a/tools/munin/windshaft +++ b/tools/munin/windshaft @@ -67,7 +67,7 @@ for pid in ${pids}; do log=$(grep "${pid}" "${tmpreport}" | grep -w 1w | awk '{print $9}') if test -e "${log}"; then - kill -USR1 "${pid}" + kill -USR2 "${pid}" cnt=$(tac ${log} | sed -n -e '/ItemKey/p;/^RenderCache/q' | wc -l) if test $cnt -gt $maxcache; then maxcache=$cnt; fi else