From f162128427e54f18046bf234403f402d7fc5393e Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 27 Feb 2020 08:52:08 +0200 Subject: Process updates asynchronously. Instead of directly modifying the host list, update requests are queued and applied to the list at the start of the next ping cycle. This speed ups updates and avoids their adverse effect on non-destructive get requests. * README: Document changes. * doc/ping903.conf.5: Document the http-backlog-size parameter. * src/ping903.c (http_response_detail): New function. (ept_ip_delete, ept_ip_put, ept_ip_post) (ept_host_stat, ept_ip_stat): Provide meanungful error descriptions. * src/ping903.h: Definitions for the Update and Get error codes. * src/pinger.c: Queue update requests and commit them to the main host list at the beginning of the ping cycle. (update_mutex): New variable. (check_host,update_add) (update_commit): New functions. (hostlist_updated): Remove variable. (get_hostname_stat,get_ipaddr_stat,get_all_host_stat) (get_all_hosts,get_host_matches): Return meaningful error codes. (pinger_host_delete_by_name,pinger_host_add_name) (pinger_hostlist_set): Operate on the update request queue instead of the main host list. Return meaningful error codes. (start_probe): Remove. (p903_scheduler): Commit updates at the beginning of the cycle. Lock the list using sendq_mutex. (p903_saver): Call update_commit. --- doc/ping903.conf.5 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ping903.conf.5 b/doc/ping903.conf.5 index c6bcb69..7c29de9 100644 --- a/doc/ping903.conf.5 +++ b/doc/ping903.conf.5 @@ -13,7 +13,7 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with Ping903. If not, see . -.TH PING903.CONF 5 "February 13, 2020" "PING903.CONF" "File Formats Manual" +.TH PING903.CONF 5 "February 27, 2020" "PING903.CONF" "File Formats Manual" .SH NAME ping903.conf \- configuration file for high-performance ICMP monitoring daemon .SH DESCRIPTION @@ -107,6 +107,13 @@ To summarize, possible arguments are: Default is \fB0.0.0.0:8080\fR. .TP +\fBhttp\-backlog\-size \fIN\fR +Configures the size of the +.BR listen(2) +backlog queue. Default is the platform-dependent value +.BR SOMAXCONN , +(128 on most GNU/Linux systems). +.TP \fBaccess\-log \fIBOOL\fR Enable apache-style HTTPD access logging. Valid \fIBOOL\fR values are: .BR 1 , -- cgit v1.2.1