PENCTL(1)
π penctl(1) β the control a running pen load balancer era π
okay bestie, gather round, because this is the General Commands Manual page for penctl, and it is lowkey the remote control for your pen load balancer. yes, the whole thing. no cap.
β¨ SYNOPSIS β¨
penctl host:port|/path/to/socket command
πΈ EXAMPLE πΈ
penctl lbhost:8888 roundrobin
Turns off client tracking on the load balancer running on lbhost. (yes, that's what roundrobin does here. it's giving "turning things off by asking for them", we love a plot twist π
)
penctl /var/run/pen/tmp/ctrl status
Prints status information in html format. iconic behaviour, honestly.
π¦ DESCRIPTION π¦
So. penctl connects to the optional control socket on a pen load balancer. That's the whole vibe. It reads commands from the command line, does a lil minimal syntax checking (she's not your mom, she's not validating everything), and sends them off to pen. Replies, if there are any, get printed on stdout. periodt.
The program can also be used through the cgi script penctl.cgi, which allows pen to be controlled from any web browser. browser-based load balancer control, main character energy fr fr π
β¨ OPTIONS β¨
host:portβ specifies a control port where the load balancer listens for commands. that's it, that's the option, she's a one-option icon π
π COMMANDS π
okay this is the big one. every single command, no skipping, bestie. buckle up π«Ά
abort_on_errorβ Callabort()when a fatal error is encountered. This will create a core file which allows further troubleshooting. Disabled by default.no abort_on_errorβ Exit normally on fatal error with an error code which indicates failure.acl N permit|deny sourceip4 [mask]β Adds an entry to access list N, where N is a number from 0 to 9. The source and mask addresses are in the usual dotted quad notation. If mask is omitted, it defaults to255.255.255.255.acl N permit|deny sourceip6[/length]β If the source address contains the character':', the address is interpreted as IPv6. Unlike IPv4 access entries, a length is used to indicate the mask. If length is omitted, it defaults to128.acl N permit|deny country NNβ If the source address is the special word"country", a two-letter country code can be used to restrict access to the load balancer. For this to work, pen must be built with geoip support. πno acl Nβ Deletes all entries from access list N. The resulting access list permits all traffic. (everyone's invited now, party's open π)asciiβ Communication dumps in ascii format (cf option-a).no asciiβ Communication dumps in hex format.blacklistβ Return current blacklist time in seconds.blacklist Tβ Set the blacklist time in seconds.blockβ Do not make sockets nonblocking. This is obsolete as of0.26.0and does nothing. (she's retired, let her rest π)no blockβ Make sockets nonblocking.client_acl Nβ Check connecting clients against access list N (default0).clients_max [N]β With argument, increase the maximum number of known clients. Returns max number of clients.close Nβ Close connection Nconnection Nβ Display some basic information about connection N.conn_max [N]β With argument, increase the max number of simultaneous connections. Returns max number.controlβ Return address and port where pen listens for control connections.control_acl Nβ Check accesses to the control port against access list N (default0).debugβ Return current debug level.debug Nβ Set debug level to N.delayed_forwardβ Always wait for the next round of the main loop before forwarding data. Normally pen tries to do that immediately. This is obsolete as of0.26.0and does nothing.no delayed_forwardβ Try to forward data immediately, to avoid the overhead of copying it to a temporary buffer and waiting for the next main loop round.dsr_if IFβ Use IF as the interface for Direct Server Return.dummyβ Act as a dummy web server with very limited functionality but high performance. Only useful for testing. Disabled by default.no dummyβ Do not act as a dummy web server.epollβ Use epoll for event management (Linux). This is the default on Linux.exitβ Exit. Only available if pen was started with the-Xoption.hashβ Use a hash on the client IP address for initial server selection.no hashβ Do not use a hash.httpβ AddX-Forwarded-Forheaders to http requests.no httpβ Do not addX-Forwarded-Forheaders.idle_timeout Nβ Close connections that have been inactive for N seconds. Default0= never close.idlers [N]β Create N reliable idle connections to the backend servers. Without argument, display the current/requested number of reliable idlers.include FILEβ Read commands from file.kqueueβ Use kqueue for event management (FreeBSD, NetBSD, OpenBSD). This is the default on the systems that have it.listenβ Return local address and port pen listens to for incoming client connections.listen [address:]:portβ Close the listening socket and reopen using specified address (optional) and port.logβ Show where pen is logging, if anywhere.log FILEβ Log to FILE.modeβ Write a summary of the current mode of operation. The listed modes areblock,delayed_forward,hash,roundrobin,stubborn.no logβ Turn off logging.pending_max Nβ Max allowed number of pending nonblocking connections. Default100, minimum1.pidβ Return the process id of the running daemon.pollβ Use poll for event management.prioβ Use the priority based algorithm.no prioβ Do not use the priority based algorithm.recent [N]β Shows which clients have connected in the last N seconds (default300).roundrobinβ Use round-robin server selection without client trackingno roundrobinselectβ Use select for event management.server N [ acl A | address A | port P | max M | hard H | blacklist T | weight W | prio P ]β Change acl, address, port, weight, priority and/or max connections for server N, or blacklist it for T seconds.serversβ List address, port, weight, priority and max number of simultaneous connections for each remote server.socket Nβ Show to which connection socket N belongs.source IPβ Set the local address to IP for upstream connections, i.e. where Pen connects to backend servers.ssl_ciphers CIPHERSβ Choose list of available SSL ciphers, specified in the format described inhttps://www.openssl.org/docs/apps/ciphers.html.ssl_client_renegotiation_interval Sβ Allowing the client to request renegotiation is a potential denial of service vector. This command specifies the minimum number of seconds the client has to wait between requests for renegotiation requests. Default3600= effectively disabled.ssl_ocsp_response FILENAMEβ Specifies the location of a file containing a pre-fetched OCSP response. The file must be refreshed regularly by a cron job or similar and thessl_ocsp_responsecommand repeated to make Pen re-read the file..ssl_option OPTIONβ Manipulate SSL options. The available options areno_sslv2,no_sslv3,no_tlsv1,no_tlsv1.1,no_tlsv1.2,cipher_server_preference. Use the command multiple times to specify multiple options.ssl_sni_path PATHβ This command enables the Server Name Indication TLS extension by specifying a directory wheredomain.key,domain.crtanddomain.cafiles can be found.statusβ Print status information in html format.stubbornβ If the initial server selection is unavailable, close the client connection without trying anotherno stubborntarpit_acl [N]β Used in DSR mode. If N is an existing access list, Pen will reply to ARP requests for IP addresses that match the access list, and reply withSYN+ACKto TCP SYN requests to these addresses. The result is that someone trying to scan a network will be slowed down by a large number of false positives. (trap them, bestie πΈοΈ)tcp_fastclose up|down|both|offβ Close both sockets to upstream and downstream if one of them closes theirs. Default =off.tcp_nodelayβ SetTCP_NODELAYon sockets, effectively turning off the Nagle algorithm.no tcp_nodelayβ Do not setTCP_NODELAYon sockets. This is the default.timeoutβ Return current connect timeout in seconds.timeout Nβ Set connect timeout to N seconds.tracking Nβ Set tracking time, i.e. how long clients will be remembered. The default0will never expire clients based on time.transparentβ On compatible platforms, use the client's address as source address in the connection to the backend server.no transparentβ Use Pen's address as source address in the connection to the backend server.web_statsβ Return file name of html status reports, if any.web_stats FILEβ Set the name of html status reports.no web_statsβ Do not generate html status reports.weightβ Use weight for server selection.no weightβ Do not use weight for server selection.write [FILE]β Write the current configuration into a file which can be used to start pen. If FILE is omitted, the configuration is written into pen's original configuration file.
bestie note: some of these are marked obsolete (block,delayed_forward) and some have defaults that will absolutely surprise you. read before you yeet π
π SEE ALSO π
π AUTHOR π
Copyright (C) 2002-2015 Ulric Eriksson, <ulric@siag.nu>.
okay so that's the whole page, and yes you read all of it, we're so proud π₯Ή this was the LOCAL section of the manual, for PENCTL(1) β go forth and control your load balancer, you absolute icon π¦β¨π
π¦ where this page comes from
- debian bookworm: pen 0.34.1-2+b1
- debian trixie: pen 0.34.1-3
- ubuntu jammy: pen 0.34.1-2build1
- ubuntu noble: pen 0.34.1-2build3
- ubuntu questing: pen 0.34.1-3
- ubuntu resolute: pen 0.34.1-3build1
- ubuntu stonking: pen 0.34.1-4build1 Β· GPL-2.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms