User Commands PENCTL(1) NAME penctl SYNOPSIS penctl host:port command EXAMPLE penctl lbhost:8888 roundrobin Turns off client tracking on the load balancer running on lbhost. DESCRIPTION _P_e_n_c_t_l connects to the optional control socket on a pen load balancer. It reads commands from the command line, performs minimal syntax checking and sends them to pen. Replies, if any, are printed on stdout. The program can also be used through the cgi script penctl.cgi, which allows pen to be controlled from any web browser. OPTIONS _h_o_s_t:_p_o_r_t Specifies a control port where the load balancer listens for commands. COMMANDS _a_c_l _N _p_e_r_m_i_t|_d_e_n_y _s_o_u_r_c_e_i_p [_m_a_s_k] 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 to 255.255.255.255. _n_o _a_c_l _N Deletes all entries from access list N. The resulting access list permits all traffic. _a_s_c_i_i Communication dumps in ascii format (cf option -a). _n_o _a_s_c_i_i Communication dumps in hex format. _b_l_a_c_k_l_i_s_t Return current blacklist time in seconds. SunOS 5.11 Last change: 25 Mar 2008 1 User Commands PENCTL(1) _b_l_a_c_k_l_i_s_t _T Set the blacklist time in seconds. _b_l_o_c_k Do not make sockets nonblocking. _n_o _b_l_o_c_k Make sockets nonblocking. _c_l_i_e_n_t__a_c_l _N Check connecting clients against access list N (default 0). _c_l_i_e_n_t_s__m_a_x Return max number of clients. _c_o_n_n__m_a_x Return max number of simultaneous connections. _c_o_n_t_r_o_l Return address and port where pen listens for control connections. _c_o_n_t_r_o_l__a_c_l Check accesses to the control port against access list N (default 0). _d_e_b_u_g Return current debug level. _d_e_b_u_g _N Set debug level to N. _d_e_l_a_y_e_d__f_o_r_w_a_r_d Always wait for the next round of the main loop before forwarding data. Normally pen tries to do that immedi- ately. _n_o _d_e_l_a_y_e_d__f_o_r_w_a_r_d Try to forward data immediately, to avoid the overhead of copying it to a temporary buffer and waiting for the next main loop round. _e_x_i_t Exit. Only available if pen was started with the -X option. _h_a_s_h Use a hash on the client IP address for initial server selection. _n_o _h_a_s_h Do not use a hash. SunOS 5.11 Last change: 25 Mar 2008 2 User Commands PENCTL(1) _h_t_t_p Add X-Forwarded-For headers to http requests. _n_o _h_t_t_p Do not add X-Forwarded-For headers. _i_n_c_l_u_d_e _F_I_L_E Read commands from file. _l_i_s_t_e_n Return local address and port pen listens to for incom- ing client connections. _l_o_g Show where pen is logging, if anywhere. _l_o_g _F_I_L_E Log to FILE. _m_o_d_e Write a summary of the current mode of operation. The listed modes are block, delayed_forward, hash, roundro- bin, stubborn. _n_o _l_o_g Turn off logging. _p_i_d Return the process id of the running daemon _r_e_c_e_n_t [_N] Shows which clients have connected in the last N seconds (default 300). _r_o_u_n_d_r_o_b_i_n Use round-robin server selection without client track- ing _n_o _r_o_u_n_d_r_o_b_i_n _l_i_s_t _T | _w_e_i_g_h_t _W ] _s_e_r_v_e_r _N [ _a_c_l _A |_a_d_d_r_e_s_s _A | _p_o_r_t _P | _m_a_x _M | _h_a_r_d _H | _b_l_a_c_k- Change acl, address, port, weight and/or max connec- tions for server N, or blacklist it for T seconds. _s_e_r_v_e_r_s List address, port and max number of simultaneous con- nections for each remote server. _s_t_a_t_u_s Print status information in html format. _s_t_u_b_b_o_r_n If the initial server selection is unavailable, close the client connection without trying another SunOS 5.11 Last change: 25 Mar 2008 3 User Commands PENCTL(1) _n_o _s_t_u_b_b_o_r_n _t_i_m_e_o_u_t Return current connect timeout in seconds. _t_i_m_e_o_u_t _N Set connect timeout to N seconds. _t_r_a_c_k_i_n_g _N Set tracking time, i.e. how long clients will be remem- bered. The default 0 will never expire clients based on time. _w_e_b__s_t_a_t_s Return file name of html status reports, if any. _w_e_b__s_t_a_t_s _F_I_L_E Set the name of html status reports. _n_o _w_e_b__s_t_a_t_s Do not generate html status reports. _w_e_i_g_h_t Use weight for server selection. _n_o _w_e_i_g_h_t Do not use weight for server selection. _w_r_i_t_e [_F_I_L_E] Write the current configuration into a file which can be used to start pen. If FILE is omitted, the confi- guration is written into pen's original configuration file. SEE ALSO pen(1) AUTHOR Copyright (C) 2002-2004 Ulric Eriksson, . ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: SunOS 5.11 Last change: 25 Mar 2008 4 User Commands PENCTL(1) _______________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE| |_________________________________________|____________________________________|_ | Availability | SUNWpen | |_________________________________________|____________________________________|_ | Interface Stability| Uncommitted | |_____________________|__________________| NOTES The Pen project is located at http://siag.nu/pen. Source for Pen is available on http://opensolaris.org. SunOS 5.11 Last change: 25 Mar 2008 5