Chapter 6. WebtoB Administration

Table of Contents

6.1. wsadmin Console Management Program
6.1.1. Environment Configuration
6.1.2. Active State Information
6.1.3. Suspend and Resume Server Processes
6.1.4. Queue Purge
6.1.5. Dynamic Configuration Change
6.1.6. Client Disconnection
6.1.7. Other
6.2. wsmon Console Monitoring Program
6.3. Commands
6.3.1. wscfl
6.3.2. wsuncfl
6.3.3. wsgst
6.3.4. wsracd
6.3.5. wsmkppd

WebtoB provides management functions such as status monitoring and system control. For example, system environment configuration can be accessed and modified dynamically without restarting the system. It also provides service-specific statistical data such as the total number of processed requests, average processing time, number of requests in the queue, etc.

WebtoB provides the aforementioned functions through the console management program wsadmin and the web program WebAdmin. This chapter describes the programs and commands provided for WebtoB administration.

6.1. wsadmin Console Management Program

wsadmin provides a text-based management environment. wsadmin waits in the command prompt and executes a command that has been entered.

wsadmin is executed as follows.

$ wsadmin

After wsadmin has been executed, the following message is displayed at the prompt to show that wsadmin is running.

--- Welcome to WebtoB Admin (Type "quit" to leave) --- 
$$1 webtob (wsadm) [2016-02-03T15:07:52]:

To display help for wsadmin, use the 'help<command>' command.

$$2 webtob (wsadm) [2016-02-03T15:08:07]: help st 
Summary: stat, st: thread(process) and service state statistics
Usage: stat (st) -v [servername] | -j [jsvservername] | -p [sprname] |
                 -s [servicename] | -rpg [rpgname] | -rp [rproxyname] |
                 -h [hthno] | -t | - T 
                 -v [servername1,servername2,..] : status for each Server
                 -j [jsvservername1, jsvservername2,..] : status for each JSV Server(Jengine)
                 -p [sprname1,sprname2,..] : status for each Server Process
                 -s [servicename1,servicename2,..] : status for each Service
                 -rpg [rpgname1,rpgname2,..] : status for each ReverseProxyGroup
                 -rp [rproxyname1,rproxyname2,..] : status for each ReverseProxy
                 -h [hthno] : statistics of each HTH
                 -t : statistics of each HTH threads
                 -T : statistics of HTH threads group

To terminate wsadmin, use the quit (q) command.

$$3 webtob (wsadm) [2016-02-03T15:10:16]: quit

The following are commands provided by wsadmin.

CommandAbbreviationDescription
cacherefresh(cr)Deletes responses stored in the HTTP response cache.
cachelistOutputs the response information stored in the HTTP response cache.
cliinfo(ci)Checks the connected web browser.
clilisten(cl)Controls the Listen Port of the WebtoB client.
config(cfg)Displays the environment configuration.
discon(ds)Forcibly disconnects active clients.
history(hist)Displays the last 50 commands issued.
help(h)Displays Help.
llChanges the log level dynamically.
logend(loge)Stops logging.
logstart(logs)Starts logging.
patchinfo Displays post-release patch information.
qpurge(qp)Deletes queued requests.
quit(q)Terminates wsadmin.
rebootsvr(rbs)Reboots the server program.
repeat(r)Repeats a command.
resume(rs)Resumes a suspended server process.
set Modifies the current environment value dynamically.
stat(st)Displays statistical data of processes, threads, and services.
suspend(sp)Suspends running server processes.
svrinfo(si)Displays server information.
webtobinfo(wi)Displays WebtoB system information.
wsboot(boot)Starts WebtoB. Same as wsboot.
wsdown(down)Terminates WebtoB. Same as wsdown.
! Repeats the last command.

6.1.1. Environment Configuration

6.1.1.1. webtobinfo (wi)

Displays WebtoB system environment settings including the system version, expiration date, and allowed maximum number of users.

  • Usage

    > wi
  • Example

    $$1 webtob (wsadm) [2016-02-03T15:12:27]: wi
    
    License: CLOUD Enterprise edition
    Version=WebtoB 5.0 SP 0 Fix #0 Linux-K2.6_x86 FD16384 B41 epoll 2016/02/03
    
             maxuser = UNLIMITED, 
             node_count = 1, 
             svgrpcount = 0, 
             svr_count = 0, svc_alloc_count = 512
    
    WebtoB All Node Info: node_count = 1: 
    --------------------------------------------------------------------------
      no   name     nodeport  racport  shmkey  shmsize0 shmsize1 shmsize2 hth 
    --------------------------------------------------------------------------
       0   webtob     7777     3333    196608    200360  1978068     1748   1

6.1.1.2. config (cfg)

Displays the currently running WebtoB's environment settings including the Domain, Node, Server Group, Server, and Service sections with their default values.

  • Usage

    > config [-d][-n][-vh VHOST name][-g SVRGROUP name][-v SERVER name]
           [-s SERVICE name][-dir DIRECTORY name][-u URI name][-a ALIAS name]
           [-l LOGGING name][-e EXT name][-ssl SSL name][-pssl PROXY_SSL name]
           [-tcpgw TCPGW name][-rproxy REVERSE_PROXY name]
           [-rpg REVERSE_PROXY_GROUP name][-ll LOGLEVEL name][-headers HEADERS name]
           [-access ACCESS name][-pc PRECEDING_COMMAND name]
           [-t HTH_THREAD name]
    OptionDescription
    [-d]DOMAIN section.
    [-n]NODE section.
    [-vh VHOST name]VHOST section or the settings of the specified VHOST.
    [-g SVRGROUP name]SVRGROUP section or the settings of the specified SVRGROUP.
    [-v SERVER name]SERVER section or the settings of the specified SERVER.
    [-s SERVICE name]SERVICE section or the settings of the specified SERVICE.
    [-dir DIRECTORY name]DIRECTORY section or the settings of the specified DIRECTORY.
    [-u URI name]URI section or the settings of the specified URI.
    [-a ALIAS name]ALIAS section or the settings of the specified ALIAS.
    [-l LOGGING name]LOGGING section or the settings of the specified LOGGING.
    [-e EXT name]EXT section or the settings of the specified EXT.
    [-ssl SSL name]SSL section or the settings of the specified SSL.
    [-pssl PROXY_SSL name]PROXY_SSL section or the settings of the specified PROXY_SSL.
    [-tcpgw TCPGW name]TCPGW section or the settings of the specified TCPGW.
    [-rproxy REVERSE_PROXY name]REVERSE_PROXY section or the settings of the specified REVERSE_PROXY.
    [-rpgREVERSE_PROXY_GROUP name]REVERSE_PROXY_GROUP section or the settings of the specified REVERSE_PROXY_GROUP.
    [-ll LOGLEVEL name]LOGLEVEL section or the settings of the specified LOGLEVEL.
    [-headers HEADERS name]HEADERS section or the settings of the specified HEADERS.
    [-access HEADERS name]ACCESS section or the settings of the specified ACCESS.
    [-pc PRECEDING_COMMAND name]PRECEDING_COMMAND section or the settings of the specified PRECEDING_COMMAND.
    [-t HTH_THREAD name]HTH_THREAD section or the settings of the specified HTH_THREAD.
  • Example

    The following is an example of using the -n option to display the NODE section settings. For more information on the NODE configuration items, refer to "3.3.1. Configuration Items" .

    $$9 webtob (wsadm) [2016-02-03T15:14:46]: cfg -n
        NODE(0): Name = webtob,
             HostName = "webtob",
             DocRoot = "/root/webtob_docroot/",
             SvrRoot = "/root/wb-5000-clean/",
             Method = "GET, POST, HEAD, OPTIONS",
             ShmKey = 54000,
             Hth = 1,
             HthQTimeout(hqt) = 0,
             NodePort = 7777,
             Port = "8080",
             JsvPort = 9999,
             ...
             Logging = "log1",
             ErrorLog = "log2",
             SysLog = "syslog",
             ...
             CheckURL = Y,
             CheckURLTo = "euc-kr",
             CheckURLFrom = "utf-8",
             SSIMaxDepth = 16

6.1.1.3. history (hist)

Displays the command history.

  • Usage

    > history
  • Example

    $$5 webtob (wsadm) [2016-02-03T15:14:47]: history
            5: history
            4: ci -s 
            3: ci 
            2: ci -s
            1: ci

6.1.1.4. !

Re-executes the last executed command. Use the '!n' option to repeat a specific executed command where 'n' specifies the nth last executed command.

  • Usage

    > !
  • Example

    $$6 webtob (wsadm) [2016-02-03T15:14:49]: !4 ci -s
           Clients  Unique IPs  Dropped
           -------  ----------  -------
    HTH 0        0           0        0
      All        0           0        0

6.1.2. Active State Information

6.1.2.1. cliinfo (ci)

Displays the environment settings, such as the current status, IP address, number of processed requests, of the currently connected client (usually a web browser).

  • Usage

    > ci [-s][-S][-vh Virtual Host name][-h HTH number]

    OptionDescription
    [-s]Displays basic statistics of all connected clients.
    [-S]Displays information about each connected client.
    [-vh Virtual Host name]Displays information about the clients connected to a specified Virtual Host.
    [-h HTH number]Displays information about the clients connected to a specified HTH.
  • Example

    • When used without options

      The following is an example of using the ci command without any options. Each row represents a client.

      $$1 webtob (wsadm) [2016-02-03T15:14:56]: ci
      
      HTH   0:   RDY
      ------------------------------------------------------------------------------------
       no   status count idle    local_ipaddr:port    remote_ipaddr:port  spri   user ssl
      ------------------------------------------------------------------------------------
          0    RDY     0    2    172.16.1.107:8080     172.16.1.100:1951    -1         N
          0    RUN     4    0    172.16.1.107:8080     172.16.1.202:60572   24         N 
          1    QED     1    0    172.16.1.107:8080     172.16.1.202:60600   -1         N
          2    RUN     4    0    172.16.1.107:8080     172.16.1.202:60575   26         N
          3    RUN     0    0    172.16.1.107:8080     172.16.1.202:60601   28         N
          4    RUN     4    0    172.16.1.107:8080     172.16.1.202:60577   22         N
          5    RUN     0    0    172.16.1.107:8080     172.16.1.202:60594   23         N
          6    QED     1    0    172.16.1.107:8080     172.16.1.202:60598   -1         N
          7    RUN     0    0    172.16.1.107:8080     172.16.1.202:60596   25         N
          8    QED     1    0    172.16.1.107:8080     172.16.1.202:60597   -1         N
          9    QED     2    0    172.16.1.107:8080     172.16.1.202:60595   -1         N
         10    RUN     4    0    172.16.1.107:8080     172.16.1.202:60584   21         N
         11    QED     2    0    172.16.1.107:8080     172.16.1.202:60592   -1         N
         12    RUN     3    0    172.16.1.107:8080     172.16.1.202:60587   29         N
         13    RUN     4    0    172.16.1.107:8080     172.16.1.202:60588   30         N
         14    QED     1    0    172.16.1.107:8080     172.16.1.202:60599   -1         N
         15    RUN     1    0    172.16.1.107:8080     172.16.1.202:60593   27         N
      -------------------------------------------------------------------------------
       HTH     RDY   QED   RUN   ETC total
         0       0     6    10     0    16
      -------------------------------------------------------------------------------
      
      -------------------------------------------------------------------------------
       HTH     RDY   QED   RUN   ETC total
      -------------------------------------------------------------------------------
         0       0     6    10     0    16
      -------------------------------------------------------------------------------
       Total     0     6    10     0    16
      -------------------------------------------------------------------------------

      The following describes each output item.

      ItemDescription
      status

      Client state within the server.

      • RDY: Receiving a request from the client.

      • RUN: A client request is being processed on the server.

      • QED: Received a client request and identified the server to forward the request to. However, the request is waiting in the server queue because the server is busy processing other requests.

      countNumber of requests sent by the client.
      idleClient idle time with no data exchanges.

      local_ipaddr:port,

      remote_ipaddr:port

      Server and client IP:PORT info.
      spriSever and client IP address.
      user

      Client type when the client is not an HTTP client.

      • tcpgw-c: TCP gateway client.

      • tpcgw-s: TCP gateway server.

      • conn-c: Client that is processing requests via CONNECT method.

      • conn-s: Server that is processing requests via CONNECT method.

      • rproxy-s: Server connected to Reverse Proxy.

      • rproxy-ws-c: Client that is using WebSocket on the Reverse Proxy server.

      • rproxy-ws-s: Server that is using WebSocket on the Reverse Proxy server.

      • internal-c: Client that is using internal redirect, etc.

      sslSpecifies whether the client is using an SSL connection.
    • Using the -s option

      The -s option outputs the total number of clients, distinct number of IP addresses, and the number of clients that have been disconnected without being registered in HTH.

      $$1 webtob (wsadm) [2016-02-03T15:15:23]: ci -s
             Clients  Unique IPs  Dropped
             -------  ----------  -------
      HTH 0       16           0        0
        All       16           0        0

6.1.2.2. svrinfo (si)

Displays active server information.

  • Usage

    > si [server name 1,server name 2,..]
    OptionDescription
    [server name 1,server name 2,.. ]Displays information of all servers or the specified servers.
  • Example

    The following is the command output.

    $$1 webtob (wsadm) [2016-02-03T15:17:20]: si
    
    ------------------------------------------------------------------------------------------
     hth   svrname (svri)   status      reqs     count cqcnt    aqcnt qpcnt emcnt rscnt rbcnt
    ------------------------------------------------------------------------------------------
       0  MyGroup    (  1)   RDY          12        12     0        0     0     0     0     0
       0  cgi        (  2)   RDY           0         0     0        0     0     0     0     0
       0  php        (  3)   RDY         352       352     0        0     0     0     0     0

    The following describes each output item.

    ItemDescription
    svrnameServer name specified in the SERVER section.
    (svri)Internal server index.
    status

    Client state within the server.

    • RDY: Request can be processed. There are server processes connected to WebtoB.

    • NRDY: Request cannot be processed. There are no Server processes connected to WebtoB.

    • BLK: Server is suspended by administrator command. Request cannot be processed.

    reqsNumber of requests sent to the server.
    countNumber of processed requests.
    cqcntNumber of requests in the queue.
    aqcntCumulative number of queued requests. (Cumulative cqcnt value)
    qpcntNumber of queued requests that have been removed from the queue due to request timeout, qp command, etc.
    emcntNumber of times the cqcnt has exceeded the MaxQCount.
    rscntNumber of server restarts due to abnormal termination.
    rbcntNumber of reboots due to the server execution of the rbs command.

6.1.2.3. stat (st)

Displays statistics on the running processes and services of the currently running server.

Dynamic information including the current server process state, names of running services, number of processed services, service states, number of queued requests, etc. are displayed.

  • Usage

    > st [-v server name 1,server name 2,..][-j JSV server name 1,JSV server name 2,..]
         [-p server process name 1,server process name 2,..]
         [-rpg Reverse Proxy Group name 1,Reverse Proxy Group name 2,..]
         [-rproxy Reverse Proxy name 1,Reverse Proxy name 2,..]
         [-tcpgw TCPGW name 1,TCPGW name 2,..]
         [-s Service name 1,Service name 2,..][-h HTH number]
         [-T][-t]
    OptionDescription
    [-v server name 1, server name 2,..]Displays the states of servers. (Same as svrinfo)
    [-j JSVserver name 1, JSVserver name 2,..]Displays JSV server stats.
    [-p server process name 1, server process name 2,..]Displays states of each server process.
    [-rpg Reverse Proxy Group name, Reverse Proxy Group name,..]Displays Reverse Proxy Group stats.
    [-rp Reverse Proxy name, Reverse Proxy name,..]Displays states of each Reverse Proxy connections.
    [-tcpgw TCPGW name 1, TCPGW name 2,..]Displays states of each TCPGW connections.
    [-s Service name, Service name,..]Displays service states.
    [-h HTH number]Displays internal stats of HTH processes.
    [-T ]Displays internal stats on each thread type within HTH processes.
    [-t ]Displays internal stats on each thread within HTH processes.
  • Example

    • Using the -p option

      The following is an example of using the -p option to display server process information.

      $$1 webtob (wsadm) [2016-02-03T15:43:22]: st -p
      
      HTH 0(23786): RDY
       --------------------------------------------------------------------------------------------- 
       svr_name   svgname     spr_no(pid)  status      reqs     count    avg(rt)  clid svc v contime
       --------------------------------------------------------------------------------------------- 
       php        phpg        220(  23789)   RDY         0         0   0.0000( 0)   -1   - 0   14187
       ...
       MyGroup1   jsvg        120(      0)   RDY         0         0   0.0000( 0)   -1   - 1   14160
                    0 jengineid(ZG9tYWluMS9hZG1pblNlcnZlcg==)(domain1/adminServer)
       MyGroup1   jsvg        121(      1)   RDY         0         0   0.0000( 0)   -1   - 1   14153
                    0 jengineid(ZG9tYWluMS9hZG1pblNlcnZlcg==)(domain1/adminServer)
       ...

      The following describes each output item.

      ItemDescription
      svr_nameServer name specified in the SERVER section.
      svgnameServer group name specified in the SVRGROUP section.
      spr_noInternally assigned number by WebtoB.
      pidProcess ID. (For JSV server, this refers to the ID received from the worker thread of each connection)
      status

      Current status.

      • RDY: Requests can be processed. There are server processes connected to WebtoB.

      • NRDY: Requests cannot be processed. There are no server processes connected to WebtoB.

      • RUN: The process is currently processing a request.

      • BRUN: The process, while in the process of sending a response, is temporarily awaiting for the flow control.

      reqsNumber of requests sent to the server.
      countNumber of processed requests.
      avgAverage processing time (sec).
      (rt)Time elapsed while processing the current request.
      clidClient ID of the current request.
      svcService name of the EXT or URI section of the request.
      vWJP (WebtoB-JEUS Protocol) version information if connected to JEUS. For internal server process, set it to 0.
      contimeTime elapsed since connecting to HTH.
    • Outputting stats at regular intervals

      A command can be executed at regular intervals for monitoring and debugging purposes.

      The following is an example of executing ‘st –s’ 30 times at 5 sec intervals.

      $$10 webtob (wsadm(wsmon)) [2009/10/22:12:37:56]: r -i 5 -k 30 st -s 

      The following is an example of executing ‘st –p’ for 30 sec at 5 sec intervals.

      $$10 webtob (wsadm(wsmon)) [2009/10/22:12:37:56]: r -i 5 -f 30 st -p
    • Using the -tcpgw option

      The following is an example of using the -tcpgw option to output TCPGW information.

      $$4 webtob (wsadm) [2018-07-19T12:08:08]: st -tcpgw
      
         ---------------------------------------------------------------------
          hth  (tcpgwi)tcpgwname    count   avg   cons   remote_ipaddr:port
         ---------------------------------------------------------------------
           0    ( 0/ 0)tcpgw1         2    15.7293  0   127.0.0.1:8088
           0    ( 1/ 0)tcpgw2         0    0.0000   0   192.168.0.1:18088
           0    ( 1/ 1)tcpgw2         0    0.0000   0   192.168.0.1:28088
           0    ( 1/ 2)tcpgw2         0    0.0000   0   192.168.0.1:38088
           0    ( 1/ 3)tcpgw2         0    0.0000   0   192.168.0.1:48088
           0    ( 1/ 4)tcpgw2         0    0.0000   0   192.168.0.1:58088
       ...

      The following describes each output item.

      ItemDescription
      hthhth number.
      tpcgwnameTCPGW name.
      countNumber of processed TCP connections.
      avgAverage TCP connection duration.
      consNumber of active connections.
      remote_ipaddr:portServer IP address and port number.
    • Using the -T option

      The following is an example of using the -T option to display the thread stats.

      $$1 webtob (wsadm) [2016-02-03T15:45:17]: st -T
      
      HTH 0: RDY
         ------------------------------------------------------------------------
         no  thread_type   status   threads        atasks        ptasks    qtasks
         ------------------------------------------------------------------------
          0   ACCESSLOG      RDY          1            18            18         0
          1   WORKER         RDY         12           401           401         0
          2   SENDFILE       RDY          4             6             6         0
       ...

      The following describes each output item.

      ItemDescription
      thread_typeThread type.
      status

      Current status.

      • RDY: Waiting to process a new task.

      • NRDY: Cannot process any tasks.

      threadsThread count for the thread_type.
      atasksTotal number of tasks.
      ptasksTotal number of processed tasks.
      qtasksNumber of currently queued tasks.
    • Using the -t option

      The following is an example of using the -t option to display the thread stats.

      $$1 webtob (wsadm) [2016-02-03T15:44:57]: st -t
      
      HTH 0: RDY
         ------------------------------------------------------------------------
         no  thread_id     status   elapsed        atasks        ptasks    qtasks
         ------------------------------------------------------------------------
          0   ACCESSLOG      RDY          4            18            18         0
          1   WORKER001      RDY         31            34            34         0
          2   WORKER002      RDY         31            34            34         0
          3   WORKER003      RDY         31            34            34         0
          4   WORKER004      RDY         31            34            34         0
          5   WORKER005      RDY         31            34            34         0
          6   WORKER006      RDY         31            33            33         0
          7   WORKER007      RDY         31            33            33         0
          8   WORKER008      RDY         31            33            33         0
          9   WORKER009      RDY         31            33            33         0
         10   WORKER010      RDY         31            33            33         0
         11   WORKER011      RDY         31            33            33         0
         12   WORKER012      RDY         31            33            33         0
         13   SENDFILE001    RDY          4             2             2         0
         14   SENDFILE002    RDY          4             1             1         0
         15   SENDFILE003    RDY          4             1             1         0
         16   SENDFILE004    RDY          4             2             2         0
       ...

      The following describes each output item.

      ItemDescription
      thread_idThread ID.
      status

      Current status.

      • RDY: Waiting to process a new task.

      • NRDY: Cannot process any tasks.

      • RUN: Currently processing a task.

      elapsedTime elapsed since the start or end of processing a task.
      atasksTotal number of tasks.
      ptasksTotal number of processed tasks.
      qtasksNumber of currently queued tasks.

6.1.3. Suspend and Resume Server Processes

6.1.3.1. suspend (sp)

Suspends currently running server process's activities. When a server process is suspended, it finishes its current task and then enters an idle state. Services in queue are left untouched and new service requests are pooled into the queue.

If service is interrupted due to a server application error, the server process must be suspended. Suspending a server process is useful when it is impossible to process a request due to an unknown error and additional work is required.

  • Usage

    > suspend [-v server name]
    OptionDescription
    [-v server name]Suspends the specified server.
  • Example

    The following is an example of suspending a PHP server. Check the server status with st-v to check that the status has been changed to BLK.

    $$1 webtob (wsadm) [2016-02-03T15:56:57]: suspend -v php
    Server(php) is supended
    $$2 webtob (wsadm) [2016-02-03T15:57:07]: st -v
    
    ------------------------------------------------------------------------------------------
     hth   svrname (svri)   status      reqs     count cqcnt    aqcnt qpcnt emcnt rscnt rbcnt
    ------------------------------------------------------------------------------------------
       ...
       0  php        (  3)   BLK         539       539     0      403     0     0     0     0
       ...

6.1.3.2. resume (rs)

Resumes a suspended server process. A resumed server process starts processing services in the queue and goes into the RDY state.

  • Usage

    > resume [-v server name]
    OptionDescription
    [-v server name]Resumes the specified server ready to processing requests.
  • Example

    The following is an example of resuming a suspended PHP server. Use the command st-v to check that the status has been changed to RDY.

    $$3 webtob (wsadm) [2016-02-03T15:57:27]: st -v resume -v php
    Server(php) is resumed
    $$4 webtob (wsadm) [2016-02-03T15:57:37]: st -v
    ------------------------------------------------------------------------------------------
     hth   svrname (svri)   status      reqs     count cqcnt    aqcnt qpcnt emcnt rscnt rbcnt
    ------------------------------------------------------------------------------------------
       ...
       0  php        (  3)   RDY         539       539     0      403     0     0     0     0
       ...

6.1.4. Queue Purge

6.1.4.1. qpurge (qp)

A large number of requests can fill server queues, cause delays, and create difficulties with servicing queued requests. The queue purge command can clear these queues to keep the system robust. This feature is useful for banks or public offices where hundreds of thousands of requests are processed each day. Deleted applications can be processed again at the client's request. WebtoB manages separate queues for each server process. The administrator tool can clear queues individually to remove bottlenecks in the system. Per-application processing is possible, helping other applications to process effectively.

A service that is deleted by qpurge sends an error as follows:

503 Service Temporarily Unavailable.

  • Usage

    > qpurge [-v server name]
    OptionDescription
    [-v server name]Deletes the requests in the specified server queue.
  • Example

    The following is an example of deleting requests in a PHP server queue. Purged_count displays number of requests deleted.

    $$11 webtob (wsadm) [2016-02-03T15:58:52]: qpurge -v php
    q for svr php is purged: purged_count = 6

6.1.5. Dynamic Configuration Change

6.1.5.1. set

This command can dynamically modify values in the configuration file. Not every variable can be modified dynamically so check the list of available variables using the cfg command in wsadmin.

  • Usage

    > set [-n NODE name][-vh VHOST name][-g SVRGROUP name][-v SERVER name][-s SERVICE name]
    OptionDescription
    [-n NODE name]Configures the NODE section.
    [-vh VHOST name]Configures the specified VHOST section.
    [-g SVRGROUP name]Configures the specified server group.
    [-v SERVER name]Configures the specified server.
    [-s SERVICE name]Configures the specified service.
  • Example

    The following is an example of checking the MaxQCount value by using cfg -v php and changing its value by using the set command. After executing the set command, the MaxQCount value is changed to 100.

    $$10 webtob (wsadm) [2016-02-03T16:01:32]: cfg -v php
        SERVER(3): Name = php,
             SvgName = phpg,
             MinProc = 10,
             MaxProc = 10,
             MaxQCount(mq) = 0,
             ...
    $$11 webtob (wsadm) [2016-02-03T16:01:42]: set -v php mq 100
    new value (100) is set for section = SERVER, name = php, fld = mq
    $$12 webtob (wsadm) [2016-02-03T16:01:52]: cfg -v php
        SERVER(3): Name = php,
             SvgName = phpg,
             MinProc = 10,
             MaxProc = 10,
             MaxQCount(mq) = 100,
             ...

6.1.6. Client Disconnection

6.1.6.1. discon (ds)

A client connection that is currently connected or idle can be forcibly disconnected. First use the ci command to obtain client information and then use the discon command.

  • Usage

    > discon [-h HTH number] -a | -i idle time | -c Client ID [-f]
    OptionDescription
    [-h HTH number]Disconnects clients that are connected to a specified HTH.
    -aDisconnects all clients that are connected to HTHs.
    -i idle timeDisconnects clients that exceed the specified amount of time (unit: second).
    -c Client IDDisconnects specified clients (client ID displayed by ci).
    [-f]Disconnects a connection immediately.
  • Example

    The following is an example of checking a client ID by using the ci command and then disconnecting the client 15 forcibly by using discon command.

    $$16 webtob (wsadm) [2016-02-03T16:02:42]: ci
    HTH   0:   RDY
    --------------------------------------------------------------------------------
     no   status count idle    local_ipaddr:port    remote_ipaddr:port  spri   user
    --------------------------------------------------------------------------------
       15    RDY     0    2    172.16.1.107:8080     172.16.1.202:36505   -1
       ... 
    
    $$17 webtob (wsadm) [2016-02-03T16:02:55]:  discon -c 15
    client (hth0: 15) is disconnected

6.1.7. Other

6.1.7.1. cachelist

Displays the response data stored in the current WebtoB HTTP response cache. Due to the large data, the results are stored in a separate file.

  • Usage

    > cachelist
  • Example

    The following is an example of the response to the request "/index.html" stored in cache. The rest of the request path is used only for internal server debugging.

    $$1 webtob (wsadm) [2016-02-03T16:02:15]:  cachelist
    Cache contents files are created in /root/wb-5000-clean/log/cachelist/. Please check the directory.
    
    Sample output file:
    0 webtob:8080/index.html 5 0 2016/02/03:14:59:45 10 0 327043 5 2016/02/03:15:48:56 (1253083736)
    Total cached response=1
    Total content length=5

6.1.7.2. cacherefresh (cr)

Deletes the response data from the WebtoB HTTP response cache.

  • Usage

    > cacherefresh {-a | -h | -i | -j | -r | -u URL}

    OptionDescription
    [-a]Deletes all cached responses.
    [-h]Only deletes cached HTML and similar texts when the SVRTYPE is HTML.
    [-i]Only deletes cached images when the SVRTYPE is HTML.
    [-j]Only deletes cached responses when the SVRTYPE is JSV.
    [-r]Only deletes cached responses when the SVRTYPE is Reverse Proxy.
    [-u URL]Only deletes responses that match the specified URL using the fnmatch method.
  • Example

    The following is an example of deleting all responses from the cache.

    $$1 webtob (wsadm) [2016-02-03T16:04:57]:  cacherefresh -a

    The following is an example of only deleting responses of "test.domain.com/test.html".

    $$2 webtob (wsadm) [2016-02-03T16:05:07]:  cacherefresh -u test.domain.com/test.html

6.1.7.3. clilisten (cl)

Removes or creates the listen ports that are used by WebtoB to receive client connections.

  • Usage

    > clilisten {on | off}
    OptionDescription
    onCreates listen ports.
    offRemoves listen ports. Once removed, a new client cannot access WebtoB. Clients that are already connected to HTH will be disconnected after processing current requests.
  • Example

    The following is an example of removing listen ports.

    $$18 webtob (wsadm) [2016-02-03T16:05:17]: clilisten off
    client listen blocked

    The following is the result of checking listen ports from a Linux console. It is assumed the listen port is 8080.

    [root@webtob ~]# netstat -ant
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State      
    tcp        0      0 0.0.0.0:9090                0.0.0.0:*                   LISTEN
    tcp        0      0 0.0.0.0:681                 0.0.0.0:*                   LISTEN
    tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
    tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN
    tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
    ...

    The following is the result after executing clilisten off. It shows that listen port 8080 has been removed.

    [root@webtob ~]# netstat -ant 
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State      
    tcp        0      0 0.0.0.0:9090                0.0.0.0:*                   LISTEN
    tcp        0      0 0.0.0.0:681                 0.0.0.0:*                   LISTEN
    tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
    tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
    ...

6.1.7.4. logstart (logs), logend (loge)

Records executed commands and outputs to log files. A log file is created in the current directory.

From the log data, peak service time, unnecessary server process, and queueing status can be checked to analyze the overall system. The logstart command starts logging and the logend command stops logging.

  • Usage

    > logstart (logs)
    > logend (loge)
  • Example

    The result of the st -p command is saved in the following log.txt file.

    $$1 webtob (wsadm) [2016-02-03T16:05:55]: logstart log.txt
    logging start ok
    $$2 webtob (wsadm) [2016-02-03T16:05:59]: st -p
    ...
    $$3 webtob (wsadm) [2016-02-03T16:06:05]: logend
    logging end ok
    $$4 webtob (wsadm) [2016-02-03T16:06:25]: 

6.1.7.5. ll

The LOGLEVEL configuration can be changed dynamically. Refer to "3.24.1. Configuration Items" for more information on logger names, levels, and options.

  • Usage

    > ll [Logger name][-l level | -o option]
    OptionDescription
    [Logger name]Configures the logger supported by WebtoB.
    [-l level]Changes the log level to the specified level.
    [-o option]Changes the logger option to the specified option.
  • Example

    The following command changes logger ".hth" level to DEBUG. The changed value can be checked by using cfg -ll.

    $$6 webtob (wsadm) [2016-02-03T16:06:35]: ll .hth -l DEBUG
    Log level is successfully updated. logger=.hth, level=DEBUG, options=

6.1.7.6. patchinfo

Displays post release patch information.

  • Usage

    > patchinfo
  • Example

    The following is an example of executing patchinfo from a released WebtoB version.

    $$1 webtob (wsadm) [2016-02-03T16:07:35]: patchinfo
    
    ----------
    Released (2015/01/29) : 5.0.0.0-B41.0.0 
    ----------

6.1.7.7. rebootsvr (rbs)

Replace an active server process with a new process.

Set WEBTOB_BKAPPDIR to the environment variable, copy new program files to a temporary directory, and then replace the server process using the following command.

  • Usage

    > rebootsvr new_file old_file
    OptionDescription
    new_fileNew file (object file).
    old_fileCurrent file (object file).

6.1.7.8. repeat (r)

Monitors the current information at regular intervals.

  • Usage

    > repeat [-i second] [-k count| -f second] command

    OptionDescription
    [-i second]Interval (unit: second) to repeat the command.
    [-k count]Repeats a command the specified number of times.
    [-f second]Repeats for the specified time (unit: second).
    commandCommand to repeat.
  • Example

    The following is an example of repeating the command 'st –s' 30 times every 5 seconds.

    $$9 webtob (wsadm) [2016-02-03T16:08:02]: r -i 5 -k 30 st -p

6.2. wsmon Console Monitoring Program

wsmon provides a text-based monitoring environment where it executes commands entered at the prompt.

Start the wsmon program as follows:

$ wsmon

The following prompt displays when wsmon starts.

--- Welcome to WebtoB Mon (Type "quit" to leave) ---
$$1 webtob (wsmon) [2016-02-03T16:08:22]:

Use the 'help <command name>' to display help about a specific command.

$$5 webtob (wsmon) [2016-02-03T16:08:29]: help ci
Summary: cliinfo, ci: show client properties
Usage: cliinfo (ci) [-s | -S] [-vh vhostname] [-h hthno]
            -s : summury of the client info
            -S : detail summury of the client info
            -vh vhostname : specify VHOST
            -h hthno : specify a HTH number to view

Use the quit (q) command to terminate wsmon.

$$1 webtob (wsmon) [2016-02-03T16:08:42]: quit

The following are the wsmon commands. Refer to each command section for details.

CommandAbbreviationDescription
cachelistOutputs the responses in HTTP response cache.
cliinfo(ci)Outputs the web browser information.
config(cfg)Outputs environment configuration settings.
history(hist)Outputs the last 50 executed commands.
help(h)Outputs help.
logend(loge)Stops logging.
logstart(logs)Starts logging.
repeat(r)Repeats a command.
stat(st)Outputs stats on process and service states.
svrinfo(si)Outputs server information.
webtobinfo(wi)Outputs WebtoB system information.
patchinfo Outputs post release patch information.
quit(q)Terminates wsmon.
! Repeats the last command.

Note

Since wsmon commands are similar to those of wsadmin console management program except in the output results, refer to "6.1. wsadmin Console Management Program" for descriptions of each command.

6.3. Commands

The following are commands provided by WebtoB.

OptionDescription
wscflCompiles the text WebtoB environment file and creates wsconfig (binary WebtoB environment file).
wsuncflInversely converts the compiled wsconfig (binary WebtoB environment file) to a text environment file.
wsgstRefers to the binary WebtoB environment file and creates a service table.
wsracdSupports WebAdmin.
wsmkppdCreates the file that stores the password to use for the PassPhraseDialog item.
wsboot

Executes all or part of the WebtoB system.

wsdown

Terminates all or part of the WebtoB system.

6.3.1. wscfl

wscfl compiles the text type WebtoB environment file and creates wsconfig (binary WebtoB environment file). wscfl can be used on an operating system that WebtoB system is installed on.

If an error occurs while compiling the input file, the binary WebtoB environment file is not created and compilation stops. The WebtoB environment file made by this command is used in wsboot, and wsdown.

  • Usage

    wscfl -i text WebtoB environment file name [-o binary WebtoB environment file name][ -b ][ -v ]
    OptionDescription
    -i text WebtoB environment file name

    Compiles the target environment file. Used to specify a text based WebtoB environment file name. It is a required option.

    A path can be specified. If the specified environment file is not found, an error message is displayed.

    [ -o binary WebtoB environment file name ]

    Used to specify the binary WebtoB environment file name.

    Specifying a path is optional. If a path is not specified, the file is created in the current wscfl working directory.

    If omitted, the file name is set to "wsconfig" by default.

    [ -b ]Backs up the WebtoB environment file.
    [ -v ]Checks the WebtoB version.
  • Example

    • Using [-i] option

      The following is an example of creating the binary environment file, wsconfig, in the current directory by compiling http.m, a text type WebtoB environment file.

      $ wscfl -i http.m

      The following is an example of creating the binary environment file, wsconfig2, in the current directory by compiling http.m.

      $wscfl -i http.m -o wsconfig2
    • Using [-v] option

      The following is an example of checking the WebtoB version.

      $wscfl -v

6.3.2. wsuncfl

wsuncfl inversely converts the compiled wsconfig (binary WebtoB environment file) into a readable text, environment file. wsuncfl can be used on the operating system where WebtoB is installed.

When the original environment file is missing and only the binary file exists, the original environment file can be restored using wsuncfl.

  • Usage

    $ wsuncfl [-i binary WebtoB environment file name] [-o text WebtoB environment file name] [ -v ] 
    OptionDescription
    [ -i binary WebtoB environment file name ]

    Binary environment input file to decompile. Specifying a path is optional. If the specified file is not found, an error message is displayed.

    If omitted, the file name is set to "wsconfig".

    [ -o text WebtoB environment file name ]

    Decompiled Text WebtoB environment file name.

    Required. Specifying a path is optional. If a path is not specified, the file is created in the current wscfl working directory.

    [ -v ]Checks the WebtoB version.
  • Example

    The following is an example of decompiling a binary environment file (wsconfig) into a text environment file (sample_r.m) in the current directory.

    $ wsuncfl –o sample_r.m

6.3.3. wsgst

wsgst refers to the binary WebtoB environment file and creates a service table. wsgst can be used on the operating system where WebtoB is installed.

wsgst refers to the SERVER and SERVICE sections in the binary WebtoB environment file made by the wscfl command. wsgst also creates a service table for each server. The table is a list of services provided by the server process. The table is compiled when the server program is being compiled. The table is used to find service locations while the server process computes.

"<server name>_svctab.c", the output of the wsgst command, is created in the directory 'svct' under the directory specified by WEBTOBDIR. The server name is specified in the SERVER section. The contents of each file is the service name provided by the server specified in the SERVICE section.

The services specified in the WebtoB environment file must also be specified in the service table of the server. I.e., if the server name, the service name, or the service's SVRNAME is changed in the SERVER or SERVICE section of the WebtoB environment file, the server program must be recompiled with the service table.

  • Usage

    $ wsgst [ -f binary WebtoB environment file name ]
    OptionDescription
    [ -f binary WebtoB environment file name ]

    Used to specify the binary WebtoB environment file that is referred to.

    The result of the wscfl command is referred to by wsboot and wsdown.

    Specifying a path is optional. If the option is omitted, the output file is named "wsconfig" by default.

  • Example

    The following is an example of creating a service table by referring to wsconfig that is located in the config directory under the directory specified by WEBTOBDIR.

    $ wsgst

    The following is an example of creating service tables by servers by referring to the wsconfig2 environment file in the /user1/park/WebtoB/bin directory.

    $ wsgst -f /user1/park/webtob/config/wsconfig2

    For example, if an environment file is registered (shown in the following), a service table named webaps_svctab.c is created in the /user1/park/webtob/svct directory.

    ...
    *SERVER
    webaps         SVGNAME=webapsg
    
    *SERVICE
    svc1           SVRNAME=webaps
    svc2           SVRNAME=webaps
                           ...

6.3.4. wsracd

wsracd must be started before starting WebAdmin or SysMaster. wsracd can be used on an OS with WebtoB system installed (WebAdmin support is planned for future releases).

  • Usage

    $ wsracd [ -k ] [ -f binary WebtoB environment file name ] [ -a ] [ -d ]
    OptionDescription
    [ -k ]

    Option to not use the binary WebtoB environment file. If set, the default port is used instead.

    If the WEBTOB_RAC_PORT is set, its value is used as the port (wsracd usually uses this option).

    [ -f binary WebtoB environment file name ]Executes with the port set in the user specified binary WebtoB environment file.
    [ -a ]

    Executes in the anonymous (no authentication) mode.

    If omitted, authentication is required to connect to wsracd using an OS account. To use the OS account, ${WEBTOBDIR}/bin/wsracd must be changed to the root account and the sticky bit must be set.

    [ -d ]Execute in the debug mode.
  • Example

    The following is an example of executing wsracd with the binary WebtoB environment file. If no option is specified, ${WEBTOBDIR}/config/wsconfig is used by default. If wsconfig file does not exist, an error message is displayed.

    $ wsracd -a

    The following is an example of using the options specified with wsboot to execute wsracd.

    $ wsracd –k 

    The following is an example of using the specified binary file '/user1/park/webtob/config/wsconfig2'to execute wsracd.

    $ wsracd –f /user1/park/webtob/config/wsconfig2 

6.3.5. wsmkppd

wsmkppd is used to set the PassPhraseDialog item of the SSL(PROXY_SSL) section.

WebtoB prompts for the password at startup if an encrypted private key is set in the SSL(PROXY_SSL) section. To avoid having to enter the password at startup, set the PassPhraseDialog item. wsmkppd creates a passphrase file that stores the passphrase to apply to the PassPhraseDialog. For information about using the PassPhraseDialog, refer to "3.17. SSL Section" and "3.18. PROXY_SSL Section".

  • Usage

    $ wsmkppd [ -p passwd ] ppd_filename sslname
    OptionDescription
    [ -p passwd ]Password for the encrypted private key.
    ppd_filenameName of the file that stores the wsmkppd execution results, which will be applied to the PassPhraseDialog item.
    sslnameName set in SSL(PROXY_SSL).
  • Example

    wsmkppd prompts for the password if it is not supplied using the -p option.

    The following is an example of calling wsmkppd without any options.

    $ wsmkppd
    Usage: wsmkppd [-p passwd] ppd_filename sslname
             -p passwd: password of private key. 
             ppd_filename: output file for PassPhraseDialog. 
             sslname: name of SSL(PROXY_SSL) section.

    The following is an example of executing wsmkppd with the ppd_filename and sslname options.

    $ wsmkppd ssl.ppd ssl1
    New password: (Enter password)
    Confirm: (Re-enter password)
    Adding Password for ssl1
    
    $ls -al ssl.ppd
    -rw-------  1 webtob webtob 19 Feb 19 10:33 ssl.ppd

    The following is an example of executing wsmkppd with the -p option and 'mypasswd'. If ppd_filename already exists, the specified password is added to the existing file.

    $ wsmkppd -p mypasswd ssl.ppd ssl2
    Adding Password for ssl2
    
    $ls -al ssl.ppd
    -rw-------  1 webtob webtob 42 Feb 19 10:42 ssl.ppd

    The following is an example of the result file created by executing wsmkppd.

    $ cat ssl.ppd
    ssl1:gJDP+OmN+wI=:
    ssl2:8eG+iZjNiu5k:

    The following is an example of an SSL section settings.

    *SSL
    ssl1          CertificateFile = "/webtob/ssl/newcert.pem",
                  CertificateKeyFile = "/webtob/ssl/newcert.pem",
                  PassPhraseDialog = "file:/webtob/ssl/ssl.ppd"