TOCPREVNEXTINDEX

Lund Performance Solutions


The KNOCKOUT Tool
KNOCKOUT provides a way of keeping inactive sessions from tying up all of your HP3000 terminal and MODEM port resources. It does this by monitoring all of the sessions on the system, and then aborting those which are inactive. KNOCKOUT is also distributed in a compatibility mode form, so both your MPE and MPE/iX machines can use the same mechanism for controlling inactive sessions.

NOTE The criteria by which KNOCKOUT determines inactivity status is specified entirely by you.

Operation

Typically, KNOCKOUT runs as a background process where it monitors all sessions. When a session becomes inactive (idle) for a user-definable amount of time, the KNOCKOUT aborts that session via the MPE abortjob command.

NOTE The MPE abortjob command must be allowed through the MPE allow command for the user running the KNOCKOUT Tool.

In order to tell KNOCKOUT how to determine idleness, you will need to develop a script which describes to KNOCKOUT how you want to manage your system. KNOCKOUT provides a number of options which can be specified in your script that provide for both global and individual criteria for determining idleness.
A KNOCKOUT script is constructed with one or more IDLE commands, EXCLUDE commands, and global options. All of this is typically followed with an END command which defines the end of input. Also the LOOP command can be used to modify the "sample" rate at which KNOCKOUT runs. The sample rate is used to determine how often KNOCKOUT checks sessions for idleness.

Idle Checking Algorithm

When KNOCKOUT fits and idle session, it checks the logical device of the session against the list of EXCLUDEd LDEVs (if any). If the session is in the exclude list, then it is left alone. Otherwise, the next set of steps occurs.
First, the idle sessions job name is checked against the list of users specified in the IDLE commands. If the session matches one of the IDLE command users, and the idle-time is greater than the value specified in the IDLE command, then KNOCKOUT checks to see if this user should be warned first or just aborted. This is determine by either the WARN command or through the WARN option of the IDLE command.
If the idle-session does not match any of the IDLE patterns, then it is checked against the GLOBAL idleness setting. If the idle-session has been idle longer than the GLOBAL setting, then it is either issued a warning or it is aborted.
Review the files KNOCKOUT.DATA.LPSTOOLS and KNOCKOUT.JOB.LPSTOOLS to see how a script and job are put together for KNOCKOUT. Also, see the examples in this section. KNOCKOUT can support up to 40 separate IDLE patterns and up to 1,023 excluded logical devices. An idleness limit of 0 or 32767 means: infinite. Don’t ever abort matching sessions for idleness!
A session is considered "idle" if it has not used any processor time anywhere in its process tree since the last time it was checked. Whenever a change in CPU utilization is noticed, all flags and counters associated with a given session are updated. The implication of the warn-then-abort policy is that a "warned" session must be idle for twice the amount specified by the matching IDLE pattern before it will be aborted.

Capabilities

Program capabilities required include IA, BA, DS, PM and PH. User SM capability is required to run KNOCKOUT. Also, the ABORTJOB command must be ALLOWed for the session or job running KNOCKOUT.

Usage

KNOCKOUT can be run either by the supplied UDC or with a fully-qualified RUN statement.
  • UDC
  • :KNOCKOUT
  • RUN
  • :RUN KNOCKOUT.PUB.LPSTOOLS
    To view a sample job stream, refer to knockout.job.lpstools.

    Command Summary

    The following list provides a summary description of KNOCKOUT commands that you can use to quickly locate the command that suits the task at hand. Detailed information on each command is provided in the next section.

    NOTE Portions of the command codes are printed in uppercase to denote the part of the command that KNOCKOUT requires in order to distinguish one command from another. However, the commands themselves are not case-sensitive.

    Table 10.1 KNOCKOUT commands
    Command Code
    Description
    END
    Quits reading commands
    EXCLUDE
    Excludes logical devices
    Exit
    Terminates KNOCKOUT
    HELP
    Invokes KNOCKOUT help
    IDLE
    Sets the time before killing session
    LOOP
    Controls delay at the top of loop
    REPORT
    Displays the current settings
    SET/REset
    Enables or disables KNOCKOUT options

    Command Definitions

    This section contains a detailed description of each KNOCKOUT command. Syntax is provided for some of the commands.

    END

    If an END command is found, no further commands will be read. An end-of-file is interpreted as an END command.

    EXCLUDE

    This command has the following syntax:
    EXCLUDE LDEVS [ldev [,ldev...]] [console]
    EXCLUDE specifies the ldevs that should not be aborted. If the operator’s console is moved with the MPE ":CONSOLE" command, specifying "EXCLUDE CONSOLE" causes KNOCKOUT to find the system console at the top of each loop.

    NOTE The EXCLUDE ldev is checked before any IDLE rule is applied. This means that if you say "EXCLUDE CONSOLE", you can never have a rule that usefully checks the console.

    Exit

    Exit terminates KNOCKOUT.

    HELP

    HELP invokes KNOCKOUT Help.
    Additional help is available on the following topics:

    OVERVIEW
    Overview of KNOCKOUT
    EXAMPLES
    Examples of KNOCKOUT commands
    WARN, NOWARN
    KNOCKOUT concept of warning idle users
    GLOBAL
    an option of the SET command
    LOGWARN, LOGABORT, NOLOG
    logging options of SET command

    For information about a specific topic or command, enter "HELP" followed by the name of the topic or command. For example:
    HELP IDLE
    or
    HELP LOGWARN

    IDLE

    This command has the following syntax:
    IDLE jobname, user.account = seconds [options...]
    where options are:
    WARN | NOWARN | LDEV = ldev [/ldev] | LDEV = CONSOLE
    Up to 40 IDLE commands may be issued in the KNOCKOUT job.
    Note that jobname, user, and account specifications may be exact or may use the usual MPE wildcard (i.e.: @, or MARY??#).
    If NOWARN is used, then sessions matching this pattern will not be warned before being aborted. If WARN is used, then the session will be warned before being aborted.

    NOTE WARN results in a session getting twice as much idle time as a NOWARN session.

    If neither WARN nor NOWARN are specified, the most recent SET WARN or SET NOWARN value is used for this IDLE pattern. The KNOCKOUT default is SET WARN.
    The LDEV option allows this IDLE rule to be restricted to a specified ldev or range of ldevs. The "LDEV = CONSOLE" means that the console at the time of checking, which differs from saying "LDEV = 20".
    For example:
    IDLE @,FIELD.SUPPORT=10 NOWARN
    IDLE MARY,@.ACCTING=NEVER
    ! above affects sessions logged on with jobname MARY,
    ! any user name, and account name ACCTNG
    IDLE @, @.@ = 60 LDEV = CONSOLE
    ! above logs off the system console after one minute of idleness

    LOOP

    This command controls the number of seconds KNOCKOUT will wait at the top of its loop. Setting this number to a very small value will waste system resources. The LOOP value defaults to 60 seconds if KNOCKOUT is run from batch, and 10 seconds if run interactively.
    On an HP3000/925 with 14 sessions, KNOCKOUT takes about one tenth of a second of CPU time each time it LOOPs. SHOT can be used to watch the CPU usage of KNOCKOUT.


    NOTE Running KNOCKOUT interactively is recommended for testing only.

    REPORT

    This command displays all of the current settings for the current KNOCKOUT process. Report is a handy device for debugging a new KNOCKOUT job. See the examples for an illustration of the layout on this report.

    SET | REset

    The SET/RESET commands are used to specify the following options:

    GLOBAL #
    The GLOBAL option specifies the number of seconds users who do not match any of the IDLE patterns are allowed to be idle before being (optionally) warned and aborted. If SET NOWARN is in effect, then such users will not be warned before being aborted. The initial value of the GLOBAL timeout is zero (0), which disables it.
    LOGAbort (Set by default)
    When KNOCKOUT aborts a user and if LOGABORT is true, then it will send a message to the system operator reporting the knockout. This option can be canceled by using NOLOG.
    LOGWarn (Set by default)
    When KNOCKOUT warns a user and if LOGWARN is true, then it will send a message to the system operator reporting the warning. This option can be canceled by using NOLOG.
    NOLOG
    NOLOG turns off LOGABORT and LOGWARN.
    NOWARN
    Tells KNOCKOUT to not warn a user when they are about to be aborted for idleness.
    NOTE: A "warned" user gets twice the idle limit, but a "nowarned" user gets only the specified idle limit.
    WARN (Set by default)
    WARN causes KNOCKOUT to warn users before they are aborted for idleness.

    TOOLBOX STANDARDS

    The ToolBox collections from Lund Performance Solutions have a uniform user interface. As a result, in addition to the commands specific to each Toolbox tool, most tools allow the commands described in "TOOLBOX STANDARDS".

    KNOCKOUT Examples

    In the three examples that follow, we cover a set of KNOCKOUT commands and briefly discuss their results. The remaining examples illustrate other common applications.
    Figure 10.1 demonstrates that since no SET WARN or SET NOWARN commands were used, and no IDLE commands used the NOWARN keyword, all of the sessions will be warned before being aborted.
    The session JOHN,MANAGER.SYS has an idleness limit of 10 (i.e., he is warned after 10 seconds, then aborted after 10 more) even though the jobname, user.account also matches the second IDLE command!


    Figure 10.1 Script Example
    Figure 10.2 works just like the prior example, but users are not warned. Instead, they are simply aborted. When JOHN,MANAGERS.SYS is idle for 10 seconds, he is aborted. The SET NOWARN is useful at sites where users have learned to respond to the idleness warning by hitting return a few times.


    Figure 10.2 Script Example
    In Figure 10.3, when JOHN,MANAGER.SYS is idle for 10 seconds, he will be aborted without warning. When FAY, MANAGER.SYS is idle for 20 seconds, she will be warned, and then aborted after 20 more idle seconds. MARY,MANAGER.SYS will be aborted without warning after 5 seconds. What about users who match none of the idle patterns? They will be warned after 34 seconds (the GLOBAL value) and aborted after 34 more seconds of idleness.


    Figure 10.3 Script Example
    Figure 10.4 illustrates a KNOCKOUT warning message and log off procedure.


    Figure 10.4 KNOCKOUT Warning Message

    KNOCKOUT Error Messages

    In the error messages that follow, "xxxx" refers to a number that is filled in at runtime by KNOCKOUT.
    Table 10.2 KNOCKOUT Error Messages
    Message
    Cause
    Action
    Bad acctname pattern.
    User entered a pattern for a acctname which KNOCKOUT does not understand.
    Review acctname pattern, it should follow conventions defined by Hewlett-Packard’s JOB command.
    Bad jobname pattern.
    User entered a pattern for a jobname which KNOCKOUT does not understand.
    Review jobname pattern, it should follow conventions defined by Hewlett-Packard’s JOB command.
    Bad username pattern.
    User entered a pattern for a username which KNOCKOUT does not understand.
    Review username pattern, it should follow conventions defined by Hewlett-Packard’s JOB command.
    The maximum number of IDLE patterns "xxxx" has already been defined.
    User has defined more IDLE patterns than KNOCKOUT supports.
    Rethink, consolidate IDLE patterns into fewer IDLE commands.

    Lund Performance Solutions
    www.lund.com
    Voice: (541) 812-7600
    Fax: (541) 81207611
    info@lund.com
    TOCPREVNEXTINDEX