penbw − pen backend watcher: monitor & automatically blacklist http-backends of pen
penbw [−fnd] [-V|--version] [-h|--help] [−s sec] [−t sec] PENCTLHOST:PENCTLPORT
penbw is a small addon written in C for pen, a high-availability load balancer for TCP.
penbw, running in the background as daemon, monitors and blacklists (by default http-)backends automatically in case of a failure through the provided pen control port similiar to "penctl host:port server 0 blacklist 300".
pen itself is able to detect if a backend is down and will blacklist it on the fly. But if, for example, the backend is still accepting connections and simply sending back bogus or nothing, pen will not detect that, as pen doesn’t care about application-level protocols.
By contrast, penbw will be effective in such a situation.
All you need is a from the host running penbw reachable control port (opt -C to pen) of pen. Even if the given control port is not available penbw will run/keep running and "wait" for the given control port to be available, so there is no need to restart penbw after pen has been restarted.
penbw connects directly to the control port, so it isn’t even neccessary to have pen(ctl) binarys on the host running penbw. However, running penbw on the host that is running pen is recommended.
If you would start pen like this:
# pen [options to pen] -C 127.0.0.1:1080
start penbw like that:
# penbw 127.0.0.1:1080
That’s it. Logging is going to syslog.
switch to unprivileged user if starting as privileged user username after startup and basic sanity checks
Specifies the time in seconds to wait after each round of checks 
Specifies the timeout for connects/reads/writes to backend servers and to pen 
Specifies the interval for logging timing information gathered during the tests of the backend servers 
Stay in foreground
Don’t actually blacklist backends detected as "failed" - check and report only
Increase debug-level by 1 (repeat -d for more)
−h | --help
print short help/usage and exit
−V | --version
print version and exit
Thomas A.F. Eckhardt <tafe unkelhaeusser net> - penbw is based on pen(ctl) by Ulric Eriksson <ulric siag nu>