1PENCTL(1) General Commands Manual PENCTL(1)
2
3
4
6 penctl
7
8
10 penctl host:port command
11
12
14 penctl lbhost:8888 roundrobin
15
16 Turns off client tracking on the load balancer running on lbhost.
17
18
20 Penctl connects to the optional control socket on a pen load balancer.
21 It reads commands from the command line, performs minimal syntax check‐
22 ing and sends them to pen. Replies, if any, are printed on stdout.
23
24 The program can also be used through the cgi script penctl.cgi, which
25 allows pen to be controlled from any web browser.
26
27
29 host:port
30 Specifies a control port where the load balancer listens for
31 commands.
32
33
35 acl N permit|deny sourceip [mask]
36 Adds an entry to access list N, where N is a number from 0 to 9.
37 The source and mask addresses are in the usual dotted quad nota‐
38 tion. If mask is omitted, it defaults to 255.255.255.255.
39
40 no acl N
41 Deletes all entries from access list N. The resulting access
42 list permits all traffic.
43
44 ascii Communication dumps in ascii format (cf option -a).
45
46 no ascii
47 Communication dumps in hex format.
48
49 blacklist
50 Return current blacklist time in seconds.
51
52 blacklist T
53 Set the blacklist time in seconds.
54
55 block Do not make sockets nonblocking.
56
57 no block
58 Make sockets nonblocking.
59
60 client_acl N
61 Check connecting clients against access list N (default 0).
62
63 clients_max
64 Return max number of clients.
65
66 conn_max
67 Return max number of simultaneous connections.
68
69 control
70 Return address and port where pen listens for control connec‐
71 tions.
72
73 control_acl
74 Check accesses to the control port against access list N
75 (default 0).
76
77 debug Return current debug level.
78
79 debug N
80 Set debug level to N.
81
82 delayed_forward
83 Always wait for the next round of the main loop before forward‐
84 ing data. Normally pen tries to do that immediately.
85
86 no delayed_forward
87 Try to forward data immediately, to avoid the overhead of copy‐
88 ing it to a temporary buffer and waiting for the next main loop
89 round.
90
91 exit Exit. Only available if pen was started with the -X option.
92
93 hash Use a hash on the client IP address for initial server selec‐
94 tion.
95
96 no hash
97 Do not use a hash.
98
99 http Add X-Forwarded-For headers to http requests.
100
101 no http
102 Do not add X-Forwarded-For headers.
103
104 include FILE
105 Read commands from file.
106
107 listen Return local address and port pen listens to for incoming client
108 connections.
109
110 log Show where pen is logging, if anywhere.
111
112 log FILE
113 Log to FILE.
114
115 mode Write a summary of the current mode of operation. The listed
116 modes are block, delayed_forward, hash, roundrobin, stubborn.
117
118 no log Turn off logging.
119
120 pid Return the process id of the running daemon
121
122 prio Use the priority based algorithm.
123
124 no prio
125 Do not use the priority based algorithm.
126
127 recent [N]
128 Shows which clients have connected in the last N seconds
129 (default 300).
130
131 roundrobin
132 Use round-robin server selection without client tracking
133
134 no roundrobin
135
136
137 server N [ acl A | address A | port P | max M | hard H | blacklist T |
138 weight W | prio P ]
139 Change acl, address, port, weight, priority and/or max connec‐
140 tions for server N, or blacklist it for T seconds.
141
142 servers
143 List address, port, weight, priority and max number of simulta‐
144 neous connections for each remote server.
145
146 status Print status information in html format.
147
148 stubborn
149 If the initial server selection is unavailable, close the client
150 connection without trying another
151
152 no stubborn
153
154 timeout
155 Return current connect timeout in seconds.
156
157 timeout N
158 Set connect timeout to N seconds.
159
160 tracking N
161 Set tracking time, i.e. how long clients will be remembered. The
162 default 0 will never expire clients based on time.
163
164 web_stats
165 Return file name of html status reports, if any.
166
167 web_stats FILE
168 Set the name of html status reports.
169
170 no web_stats
171 Do not generate html status reports.
172
173 weight Use weight for server selection.
174
175 no weight
176 Do not use weight for server selection.
177
178 write [FILE]
179 Write the current configuration into a file which can be used to
180 start pen. If FILE is omitted, the configuration is written into
181 pen's original configuration file.
182
183
185 pen(1)
186
187
189 Copyright (C) 2002-2008 Ulric Eriksson, <ulric@siag.nu>.
190
191
192
193 LOCAL PENCTL(1)