From aabefce3b9010e834c2a8e4ef9ec785f816e4f78 Mon Sep 17 00:00:00 2001 From: Richard Siddall Date: Fri, 21 Mar 2014 09:56:32 -0400 Subject: [PATCH] Added warning about expense of forking/exec to determine system load. Added SEE ALSO links to the postings containing the plugin and an alternate. --- plugins/loadcheck | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/loadcheck b/plugins/loadcheck index 909b722..44e424e 100755 --- a/plugins/loadcheck +++ b/plugins/loadcheck @@ -15,6 +15,8 @@ If this is running on a system that provides /kern/loadavg or Once a load value is determined, it is cached for a period of time. See the cache_time below. +Since fork/exec is expensive in perl you'll want to use cache_time to avoid increasing your load on every connection by checking system load. + =head1 CONFIG max_load @@ -38,6 +40,14 @@ loadcheck cache_time 30 loadcheck max_load 7 uptime /usr/bin/uptime +=head1 SEE ALSO + +Original version: http://www.nntp.perl.org/group/perl.qpsmtpd/2006/01/msg4422.html + +Variant with caching: http://www.nntp.perl.org/group/perl.qpsmtpd/2006/03/msg4710.html + +Steve Kemp's announcement of an alternate load limiter: http://www.nntp.perl.org/group/perl.qpsmtpd/2008/03/msg7814.html + =head1 AUTHOR Written by Peter Eisch .