Chapter 4. Performing Routine LAT Maintenance
Prev |  | Next

## Chapter 4. Performing Routine LAT Maintenance

This chapter contains procedures that are needed to perform routine LAT maintenance on an IRIS node. It explains how to use `slcp`, a 4DLT maintenance utility, to add and remove LAT services and adjust LAT functions during day-to-day operation. The chapter contains these sections:

- “About the slcp Utility”

- “Monitoring LAT”

- “Managing Overall LAT Node Functions”

- “Maintaining the LAT Services File”

- “Managing Group Codes”

- “Maintaining the LAT Database”

- “Deleting LAT Service Queue Entries”

| Note: Most `slcp` options are covered in this chapter, but a few `slcp` options are beyond the chapter's scope. Please see the `slcp` man page for a complete explanation of `slcp` options.

## About the slcp Utility

The `slcp` utility is a group of commands that allow LAT users and administrators to display 4DLT parameters and LAT administrators with superuser privileges to change 4DLT parameters. Any changes you make with `slcp` commands are recorded in the volatile database and take effect immediately. It is not necessary to stop and restart 4DLT to implement your changes.

Some parameters in the volatile database are also contained in the permanent database (see Table 5-1). When you change these parameters with `slcp`, you can incorporate your changes in the permanent database by using a special `slcp` command that overwrites `/usr/etc/lat/latconfig` settings (see “Overwriting the Permanent Database” for details).

### Displaying slcp Options

To display a list of `slcp` command options, enter the `sclp` command with no arguments, as shown in this example:

    # slcp

    <Enter>
    slcp: usage
     -d H|h|c|p|x|q|u[,#]|n[,node]|s[,service]
     -b s,device,service[,”id”][,port][,password][,rating]
     -b c,device,service[,node][,port][,password]
     -b h,device[,service][,node][,port]
     -B device|\* Delete touch device binding (\* delete all)
     -c [cpu_rating][,user_limit] Set cpu rating, user limit
     -f Save LAT configuration to /usr/etc/lat/latconfig
     -m sessions Set maximum LAT sessions (0 no limit, 1-255)
     -n [node][,”id”] Set local node name, description
     -g [a|i,]#[,#...]|[,#-#] Set ACL[a] or IDL[i]groups         (default both)
     -G [a|i,]#[,#...]|[,#-#] Clear ACL[a] or IDL[i] groups (default both)
     -Q sequence|\* Delete queue sequence # (\* delete all)
     -r service,rating Set local service rating
     -t seconds Set service announcement timer (10-180 sec)
     -u service,unit Assign unit (minor #) to service
     -U service,unit Remove unit (minor #) from service
     -X Purge unknown, unreachable nodes, services
     -Z [c][n[,node]] Zero host [c] and/or node [n] counters

### Guidelines for Entering slcp Commands

An `slcp` command consists of the keyword `slcp` and a command switch. The switch is a letter preceded by a hyphen (-). For example, this is the `slcp` command to purge the LAT database of unavailable nodes and services:

    slcp -X

Most `slcp` commands require at least one argument. For example, this `slcp` command to set the maximum number of sessions on a service node requires a maximum sessions argument:

    slcp -m max_sessions

Some `slcp` commands take several arguments. The `slcp` commands with multiple arguments have this syntax:

    slcp -switch argument[,argument][,argument][,argument]

When a command contains more than one argument, separate the arguments with a comma (,); include commas as space holders whenever you omit an argument from the arguments list. Do not include spaces between arguments. For example, this command assigns a service rating to a LAT service:

    slcp -r IRIS2,250

## Monitoring LAT

The `slcp` `-d` command posts information about the local LAT node and information about remote nodes and services in the LAT network. Any LAT user can use `slcp` `-d` to display information; superuser privileges are not required.

The syntax of `slcp` `-d` is shown below:

    slcp -d h c p x q u[,port_number] n[,node_name] s[,service_name]

The arguments to `slcp` `-d` have these meanings:

h |  | Displays information about the local host.
c |  | Displays various counters for events on the local host.
p |  | Displays the contents of bad packets received.
x |  | Displays diagnostic information about the local host.
q |  | Displays information about queued requests.
`u,`port_number |  | Displays information about login processes. If you specify a port number, displays information about the process logged in at that port.
`n,`node_name |  | Displays a list of known nodes and their availability. If you specify a node name, displays information about the node you specified.
`s,`service_name |  | Displays a list of known services. If you specify a service name, displays the provider node and the status and ratings of its services.

## Managing Overall LAT Node Functions

The `slcp` utility offers commands to set parameters that affect the overall operation of the IRIS system as a LAT network node. When you use the `slcp` commands described in this section, the settings you specify are recorded in the volatile database and remain in effect until `latd` is stopped. You can set equivalent parameters in the permanent database using `lati` (see Chapter 5 for instructions).

### Changing the LAT Node Name or Description

By default, the 4DLT installation procedure assigns the IRIX system the host name that appears in the IRIX file `/etc/sys_id`. You can change the default node name for the IRIX system if you wish. However, if your system is a member of multiple networks, it will be easier to maintain the system if it uses the same name on all networks.

| Note: Changing the LAT node name on the IRIS host does not affect its name on other networks.

To change your IRIS system's LAT node name or desciption, use the `slcp` `-n` command:

    # slcp -n new_name[,description]

    <Enter>

The arguments to `slcp -n` have these meanings:

new_name |  | Is the LAT node name that you wish to assign the IRIS host (this name will not be used for the IRIS system on the TCP/IP or DECnet networks if it is also a member of those networks). Use these guidelines when assigning a LAT node name: A node name must be unique on the LAN. Node names can contain a maximum of 16 characters. Valid characters include all alphanumeric characters and the symbols dollar sign ($), period (.), hyphen (-), and underscore (_). Uppercase and lowercase letters are valid, but lower case is converted to upper case for internal operations.
description |  | Is an optional description of the LAT node that helps to identify it. If you include a description in your entry, the description appears in various displays of information about the node, including users' `SHOW HOST` and `SHOW NODES` commands. If you enter a multiple word description, enclose your entry with quotes, as shown in this example:
    slcp -n lily,“engineering node for testing”

### Setting the CPU Rating and LAT User Limits

LAT service nodes use their CPU rating as one factor in calculating dynamic service ratings. The `slcp -c` command lets you assign a fixed CPU rating to an IRIS node to weight its chances of being selected for a service. If you do not assign a CPU rating, a rating is assigned dynamically by 4DLT software.

The `slcp -c` command also lets you set a limit on the total number of LAT users concurrently using the IRIS system. This option allows you to manage the LAT load on the node by restricting user access (also see “Setting a Maximum on LAT Login Sessions”).

To set the CPU rating and user limit on an IRIS system, use the `slcp` `-c` command:

    # slcp -c cpu_rating[,user_limit] <Enter>

Arguments to `slcp -c` have these meanings:

cpu_rating |  | Is the static rating you wish to assign to the CPU. Valid CPU ratings range from 1 to 100: a high rating indicates a high availability to provide services, while a low rating indicates low availability. When assigning a CPU rating, consider the performance and loading of this node relative to other LAT nodes and the level of LAT services you want it to sustain; then, select its CPU rating accordingly.
user_limit |  | Is an optional argument that assigns a limit to the combined number of LAT users who can use the IRIS system simultaneously. The limit includes the local terminal server user and LAT users who are remotely logged into the IRIS system.

### Setting a Maximum on LAT Login Sessions

The 4DLT installation process sets the maximum number of LAT login sessions to zero (0). The zero value means there is no limit to the number of LAT sessions the IRIS system will accept. Use the `slcp` `-m` command to reset the limit to a value in the range of 1 to 255:

    # slcp -m max_sessions

    <Enter>

### Setting the LAT Service Announcement Timer

By default, service nodes multicast service announcements every 60 seconds. To change the multicast interval, use the `slcp -t` command:

# `slcp -t` number_of_seconds `<Enter>`

The argument to the `slcp -t` command has this meaning:

number_of_seconds |  | Is the number of seconds between multicasts. Use an interval in the range of 10 to 180 seconds in your entry.

### Setting a LAT Service Rating

Service ratings provide terminal servers a gauge for selecting a particular service when multiple hosts are offering the service (see “LAT Service Ratings”). You can assign either a dynamic or static service rating to a login service.

Dynamic ratings are calculated by `latd` on the provider node each time it broadcasts the service. Static ratings in the range of 0 to 255 are assigned by the LAT administrator. Assigning a higher rating makes the service more likely to be selected by a terminal server; assigning a lower rating makes the service less likely to be selected.

Use the `slcp -r` command to set a service rating:

    # slcp -r service_name,rating

    <Enter>

The arguments to the `slcp -r` command have these meanings:

service_name |  | Is the name of the service to which the rating is to be assigned.
rating |  | If you want `latd` to assign a rating for this service dynamically when it makes service announcements, set the rating to -1 (negative 1). If you prefer to assign a static service rating, specify a rating in the range of 0 to 255. If you do not assign a service rating, 4DLT uses a default rating of 135.

### Manual Binding to 4DLT Devices

The 4DLT installation process creates 256 IRIX devices specifically for LAT services, `ttyl` and `ttyl1` through `ttyl255`. When a local LAT service is created, a specified LAT device is designated for the service (see “Adding Logins to the latservice File” and “Adding Printers to the latservice File”). When this device is opened, the LAT service is automatically bound to the device for the duration of the session.

You can manually bind a LAT device to a LAT service (for diagnostic purposes, for example) using the `slcp -b` command. The `slcp -b` command takes separate arguments for binding to printer services ( `-h`) and non-printer services ( `-c`).

| Note: When you bind to a device, choose one in the middle of the `ttyl1` to `ttyl255` range (see “How Printing Works” for information on reserved device numbers).

#### Binding to Printer Devices

The `svc_setup` utility automates theLAT printer setup by performing three steps automatically. First, it adds a logical printer to the IRIX `lp` spooling system (local print files are routed to the remote printer by means of this logical printer mechanism). Second, `svc_setup` binds the LAT device to the printer service; and third, `svc_setup` adds the printer service to the `latservice` file. If you choose, you can perform these steps manually to add a LAT printer:

1. Add the logical printer using the `/usr/lib/lputil` utility.

   The `lpuptil` utility requires that you specify the LAT device that will handle output to the remote printer, the printer model (lat_dumb and lat_gpsinterface are valid LAT model names), and the name of the printer as it is known to local users. The following sample entry illustrates the `luptil` command to add a logical printer to the `lp` spooling system. In this example, the LAT device `ttyl190` will be used for a PostScript model printer that is known as laser2:

       # lputil add /dev/ttyl190 lat_gpsinterface laser2

2. Bind the LAT device to the LAT service using the `slcp -b` command with the `-h` argument.

   The `slcp -b` command for binding a device to a printer service has this syntax:

   slcp -b h,device[,service]|[,node,port][,password]

   When you use this command, you must specify either the name of an advertised service or a node name and port number in your entry. For example, the following command binds device `ttyl190` to an advertised printer service named laser2 (in this case, laser2 is also the name by which the printer is known on the local system, but the LAT service name and local printer name can be different); laser2 was previously added to the `lp` spooling system. Notice that no node name, port number, or password is specified in this example:

       slcp -b h,ttyl190,laser2

   The following command binds device ttyl190 to port ttyd_2 on a LAT node named lily. Notice that no service name is specified in this entry:

       slcp -b h,ttyl190,,lily,svr_port_2

3. Add the service to the `latservice` file (see “Adding Printers to the latservice File”).

#### Binding to Non-Printer Devices

The `slcp -b` command for binding a device to a non-printer service has this syntax:

    slcp -b c,device,service[,node][,port][,password]

For example, the following command binds device `ttyl162` to a service named date. No service node or port number is specified in the binding, and the LAT service requires no password:

    # slcp -b c,ttyl162,date

## Maintaining the LAT Services File

The LAT services file, `/usr/etc/lat/latservice`, contains a record of all services that are to be made available on the IRIS system as a part of the 4DLT startup sequence. The `latservice` file can contain two types of records, login records and printer records. Records can be entered in any order in the file. You can add and remove records from `latservice` using the `/usr/etc/lat/svc_setup` utility.

| Note: Whenever you change a login record in `/usr/etc/lat/latservice`, you must stop and restart `latd` (see “Stopping and Restarting 4DLT” for instructions).

### A Sample `latservice` File

The samples below illustrate records in a LAT services file:

    LOGN:Accounting:Login for accounting staff:
    PRNT:ttyl124:Colorcopy:*:*:
    LOGN:Payroll:13:*:big_$$:
    LOGN:Email:-1:Login for electronic mail:

The sample records would establish four services during a 4DLT startup:

`Accounting` |  | A login service named ``Accounting'' that is used by the accounting staff; it has no service rating or password.
`Colorcopy` |  | A remote printer service named ``Colorcopy'' that is associated with the ttyl124 device on the IRIS system.
`Payroll` |  | A login service named payroll, which has a static service rating of `13`, but no description (notice the asterisk); it is password protected with `big_$$`.
`Email` |  | A login service for electronic mail; the service rating (`-1`) will be dynamically derived by `latd` when the service is advertised.

### Adding Logins to the latservice File

To add a login record to the `/usr/etc/lat/latservice` file, use the `svc_setup` -l command. The command has this syntax:

    # svc_setup -lservice_name [-rrating] [-iidentification] [-apassword]

The arguments to `svc_setup -l` have these meanings:

service_name |  | The name of a login service that is to be established on this node as part of the 4DLT startup process.
rating |  | (optional) A service rating designation (see “LAT Service Ratings” and “Setting a LAT Service Rating” for more information). To specify a dynamic rating for this service, set the rating to -1 (negative 1). To assign a static service rating, specify a rating in the range of 0 to 255. When you omit a rating, 4DLT uses a default rating of 135.
identification |  | (optional) A description of the login service that identifies it in various displays, including user's `CONNECT` and `SHOW SERVICES` commands.
password |  | (optional) A password that LAT users will be required to enter when they connect to the login service.

When the`svc_setup -l` command finishes executing, `/usr/etc/lat/latservice` contains a new record for the login service you added (see “A Sample latservice File” for sample login records). The service will be advertised after you stop and restart the LAT daemon (see “Stopping and Restarting 4DLT” for instructions).

### Removing Logins from the latservice File

To remove a login record from the `/usr/etc/lat/latservice` file, use the `svc_setup` -L command. The command has this syntax:

    # svc_setup -L service_name

When the `svc_setup -L` command finishes executing, the record for the login service that you specified is removed from the `latservice` file. However, you must stop and restart the LAT daemon to stop advertising this login service (see “Stopping and Restarting 4DLT” for instructions).

### Adding Printers to the `latservice` File

To add a printer service record to the `/usr/etc/lat/latservice` file, use the `svc_setup` -p command. The command has this syntax:

    # svc_setup -pprinter_name -dttylnum -mmodel -sservice [-nnode] [-tport]

The arguments to `svc_setup -p` have these meanings:

printer_name |  | The name of a LAT printer as it is known to the IRIS system user.
`ttyl`num |  | The name of the IRIX device (a `ttyl` device number, such as `ttyl13`2) to be assigned to this printer. Choose a device number in the middle of the range from 0 to 255, such as tty100 (see “How Printing Works” for details).
model |  | A printer model name. The name that you enter must be recognized by the IRIX `lp` spooling program (see model interface files listed in `/usr/spool/lp/model` for valid model names).
service |  | The service name by which this printer is known to LAT users.
node |  | (optional) The name of the LAT node where the printer is attached.
port |  | (optional) The number of the port on the LAT node that you specified in the node argument.

When the `svc_setup -p` command finishes executing, `/usr/etc/lat/latservice` contains a new record for the printer service you added (see “A Sample latservice File” for sample printer records). The LAT printer service is available immediately to the IRIX system user; you do not need to stop and restart the LAT daemon.

### Removing Printers from the latservice File

To remove a print service record from the `/usr/etc/lat/latservice` file, start the `svc_setup` utility with the -P option. The command has this syntax:

    # svc_setup -Pprinter_name -dttylnum

When the `svc_setup -P` command finishes executing, the record for the print service that you specified is removed from the `latservice` file and the printer is no longer available to the IRIS user; you do not need to stop and restart the LAT daemon to remove the service.

## Managing Group Codes

By default, 4DLT software sets all group codes to zero (0), meaning that all nodes and services are available to all LAT users. Using `slcp` commands, you can set up more restrictive group codes if your network requires them. When you implement group codes, access control lists (ACLs) are included in service announcements that the IRIS system multicasts to LAT terminal servers; and identifier lists (IDLs) are included in connection requests that the IRIS system sends to remote service nodes.

### Assigning Group Codes with slcp

The `slcp -g` command assigns ACL and IDL group codes on an IRIS system. The codes are maintained in the volatile database (they lose their effect when you stop and restart 4DLT). If you assign ACL group codes, incoming service requests will be required to contain a matching group code in order to use the requested service. If you assign IDL group codes, the codes will be forwarded in the IRIS user's request for services and matched with the group codes for the provider node.

The `slcp -g` command has this syntax:

    slcp -g a|i group_code[,group_code]|[start_range-end_range]

The arguments to the `slcp -g` command have these meanings:

a or i |  | An a signals that an ACL assignment will be specified; an i signals that an IDL assignment will be specified.
group_code |  | The number assigned as the code for this group. You can specify an entire list of group codes. Separate individual group codes in the list with a comma.
start_range- |  | The beginning group code in a group code range. Follow the beginning code with a hyphen (-).
end_range |  | The last group code in a group code range.

For example, this command assigns the group codes 7 and 15 to service announcements leaving an IRIS host:

    slcp -g a 7,15

This example assigns a range of group codes, from 8 to 12, to all user requests for service leaving the IRIS system:

    slcp -g i 8,12

### Automatic Group Code Assignments

Although group codes are not part of the permanent database, you can automate the assignment of ACL and IDL information by specifying them in the IRIS system's `/etc/rc2.d/S31lat` file (`slcp` commands are not required). These parameters are read and put into effect each time `latd` is started from a system reboot.

Use this procedure to reset the default group codes from zero (0) to group codes used on your network. The LAT daemon must be running when you do this procedure, and you must do it as the root user of the IRIS system:

1. Open the `/etc/rc2.d/S31lat` file, as shown in this example:

       # vi /etc/rc2.d/S31lat

       <Enter>

2. With `latd` running, add the ACL and IDL codes to `/etc/rc2.d/S31lat`. Your entries should look like the samples below:

       slcp -G a,0

       <Enter>

       slcp -G i,0 <Enter>
       slcp -g a,new_ACL_code

        <Enter>
       slcp -g i,new_IDL_code

        <Enter>

   The first and second lines of this entry clear the old ACL and IDL codes (which are set to zero (0) by default); the third and fourth lines reset the ACL and IDL codes to a new number that you specify.

   You can also specify a range of group codes as ACL or IDL settings, as shown in this sample entry line:

       slcp -g i, 32-37

       <Enter>

3. Stop and restart 4DLT for your changes to take effect (see “Stopping and Restarting 4DLT”).

After you complete this procedure, the IRIS system will send out the ACL codes you specified in its service announcements, and it will include the IDL group codes you specified in its connection requests to other LAT nodes.

## Maintaining the LAT Database

Anytime you use the `slcp` utility, your changes are recorded in the volatile database and remain in effect until the LAT daemon is stopped. Some volatile database parameters have corresponding values in the `/usr/etc/lat/latconfig` file. Using an `slcp` command, you can write these parameters to the `latconfig` file if you wish to do so. `slcp` also offers a command to purge the volatile database of information about unavailable nodes and services.

| Note: See Table 5-1 for a list of `/usr/etc/lat/latconfig` parameters that you can change with `slcp` commands.

### Overwriting the Permanent Database

Some parameters you can change with `slcp` are also parameters in the permanent database, /usr/etc/lat/latconfig. To record changes you make with slcp in the latconfig file, use this command:

    # slcp -f

    <Enter>

When this command completes, any changes you made to settings in the permanent database using `slcp` commands are recorded in `/usr/etc/lat/latconfig`.

### Purging Unavailable Nodes and Services

When the terminal server is unable to establish a connection to a LAT node or service, it marks the node unreachable and the service unknown in the LAT database. Unavailable nodes and services and their status continue to be posted in displays, unless you have specified otherwise (see “Setting Learned Service Parameters”).

By default, 4DLT purges unreachable nodes and unknown services every five hours, removing them from all displays. `slcp` allows you to purge this information on an as-needed basis.

To purge the LAT database, use this command:

    # slcp -X

     <Enter>

If any new information arrives after the database is purged, the new information is entered in the database in the usual manner.

## Deleting LAT Service Queue Entries

4DLT terminal server software maintains a queue of connection requests that operates on a first-in, first-out basis. Incoming requests are assigned a sequence number in the order they are received. The `slcp -Q` command deletes an individual entry or the entire service queue.

| Note: To display the service queue, use the `slcp -d q` command.

Use this command to delete an individual request:

    # slcp -Q sequence_number

    <Enter>

To delete the entire service queue, use this command:

    # slcp -Q *

    <Enter>

Prev | Table of Contents | Next
Chapter 3. 4DLT Setup Procedures |  | Chapter 5. Reconfiguring LAT Operating Parameters