commit 36589bd188410b3986518a50d6067297fa965b97
parent 1a966ede935e395b61ae482ff3043bfa92c23c0c
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sat, 4 Apr 2015 14:48:21 -0600
pc_fcgi: keep track of total requests processed
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pc_fcgi b/pc_fcgi
@@ -81,6 +81,7 @@ $SIG{INT} = \&child_sig;
$SIG{TERM} = \&child_sig;
syslog(LOG_INFO, "startup");
+my $requests_total = 0;
while ($request->Accept() >= 0) {
print "Content-Type: text/html\r\n\r\n";
my (undef, $input) = split("=", $ENV{QUERY_STRING});
@@ -99,8 +100,9 @@ while ($request->Accept() >= 0) {
$template->process("search.tt", $vars)
|| print "template: " . $template->error();
+ $requests_total++;
}
-syslog(LOG_INFO, "shutdown");
+syslog(LOG_INFO, "shutdown, $requests_total total requests served");
closelog();
$search_sth = undef;