frcactrl Command

Purpose

Controls and configures FRCA.

Syntax

frcactrl { load | unload }frcactrl open Ip_Address Port [ Virtual_Host ] Server_Name Virtual_Root Log_Filefrcactrl close Ip_Address Port [ Virtual_Host ]frcactrl loadfile Ip_Address Port [ Virtual_Host ] Document_Root File ...frcactrl stats [ reset ] [ Interval ]frcactrl logging Ip_Address Port [Virtual_Host ] { on | off } [ Format ] [ CPU_Id ] frcactrl { start | stop } Ip_Address Port [ Virtual_Host ] frcactrl revaltimeout Ip_Address Port [ Virtual_Host ] [ Seconds ] frcactrl pctonintr [ Percentage ]frcactrl set { option=value }frcactrl getfrcactrl default [ option ]

Description

The frcactrl command controls and configures the FRCA kernel extension. The kernel extension must be loaded before starting any Web servers that want to use FRCA.

Subcommands

load
Loads the FRCA kernel extension if not loaded.
unload
Unloads the FRCA kernel extension if loaded.
open Ip_Address Port [ Virtual_Host ] Server_Name Virtual_Root Log_File
Opens and configures an FRCA instance under the name Server_Name for IP address Ip_Address on port Port. The Virtual_Root parameter specifies the directory where the Web data starts. The requests will be logged in the file specified by Log_File. This filename must be fully qualified.
Note: FRCA only supports one log file. When running more than one Web server on a system with FRCA, all requests will be logged to the same file.
close Ip_Address Port [ Virtual_Host ]
Closes the FRCA instance associated with the specified IP address and port.
loadfile Ip_Address Port [ Virtual_Host ] Document_Root File ...
Loads the specified file(s) into the FRCA / Network Buffer Cache. The IP and Port number at which the FRCA instance has been opened earlier must be specified here along with the document root and the file(s) to be loaded.
stats [ reset ] [ Interval ]
Displays FRCA statistics. The optional reset subcommand clears (zeros) the statistics. You can display the statistics at a regular interval by specifying the duration of the interval in seconds with the Interval parameter.
logging Ip_Address Port [ Virtual_Host ] { on | off } [ Format ] [ CPU_Id ]
Turns logging of request served by an FRCA instance bound to the specified Ip_Address and Port on or off. The format can be one of CLF, V-CLF, or ECLF (Common Log Format, Virtual Host & CLF, Extended CLF). The FRCA logging thread can also be bound to a particular CPU by specifying the optional CPU_Id parameter on multiprocessor machines.
start Ip_Address Port [ Virtual_Host ]
Enables the kernel get engine to serve requests sent to the specified IP and port.
stop Ip_Address Port [ Virtual_Host ]
Disables the kernel get engine for the specified IP and port.
revaltimeout Ip_Address Port [ Virtual_Host ] [ Seconds ]
Changes the revalidation timeout value for an FRCA instance at the specified address and port. The timeout value must be specified in seconds.
pctonintr [ Percentage ]
Controls the percentage of CPU time that can be spent in interrupt context. If this value is too low then FRCA will send requests up to Web server more often since it always executes in interrupt context. Any value >= 100 will result in FRCA serving every request that is cached in the FRCA cache.
set {option=value}
Sets the specified FRCA option to the value. The only option currently available is frca_hashsz which sets the number of slots in the FRCA hash table to the specified value. The default value of frca_hashsz is 12841. If changed, the value used must be prime as this results in a more even distribution of hash table entries.
get
Displays all FRCA options available along with their current values. Only one option called frca_hashsz currently exists.
default [option]
Sets the value of all options to their default values when used without specifying an option name. If an option name is specified it sets only the value of the specified option to its default.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. The following are examples of using the open subcommand:
    frcactrl open 9.1.1.1 80 ici imgcache01 /htdocs /logs/frca.log bin
    frcactrl open 9.1.1.2 80 ici imgcache02 /htdocs /logs/frca.log bin
    In the above examples "ici" is the virtual host name which could be used to access one of the mirrors imgcache01 or imgcache02. The IP address may be 0.0.0.0 if the Web server is not bound to a specific IP address.
  2. To close the FRCA instance associated with IP address 9.1.1.1 and port 80, type:
    frcactrl close 9.1.1.1 80
  3. To load the content of files /a/b/c/d and /a/b/c/e with URLs /d and /e, type:
    frcactrl loadfile /a/b/c /a/b/c/d e
  4. To display the FRCA statistics, type:
    frcactrl stats
    
    This will cause the FRCA statistics to be displayed. They will look similar to this:
           Total    Deferred       Cache       Cache    Resource
        Requests    Requests        Hits      Misses      Errors
     -----------------------------------------------------------
      1024065396         227  1024065168           1           0
  5. This examples shows how to use the start subcommand for virtual host "ici":
    frcactrl start 9.1.1.1 80 ici
    Note: The virtual host parameter is optional.
  6. To disable the kernel get engine for port 80 on IP address 9.1.1.1 on virtual host "ici", type:
    frcactrl stop 9.1.1.1 80 ici
  7. The following example sets the revalidation timeout value for the FRCA instance at port 80 of IP address 9.1.1.1 to 100 seconds:
    frcactrl revaltimeout 9.1.1.1 80 100
  8. To allow the CPU to spend 98 percent of its time in interrupt context, type:
    frcactrl pctonintr 98
  9. To set the value of the frca_hashsz option to 24499, type:
    frcactrl set frca_hashsz=24499
  10. To set the value of frca_hashsz to its default, type:
    frcactrl default frca_hashsz

Files

/usr/bin/frcactrl