Sun Management Center 3.5 System Reliability Manager User's Guide

Script Repository Module

The Script Repository module enables you to view the scripts available on the agent machine to be run by the Script Launcher module. The Script Repository module also lists the languages supported by the Script Launcher module.

The Script Information group includes two tables:

The security for Script Repository module is implemented as follows:

To Access the Script Repository Module
  1. Load the module.

    For more information on loading and unloading modules, see the Sun Management Center 3.5 User's Guide. The Script Repository module is available under Local Applications in the Navigator window.

  2. In the Browser window, double-click Local Applications.

    The category expands.

  3. Under Local Applications, double-click Script Repository.

    The category expands.

  4. Double-click the Script Information folder to view the Language Table and the Script Table.

Language Table

The first table in the Script Information group is the Language Table. It lists all the scripting languages supported on the agent. Each table entry has the following attributes:

There are no commands available for this table. You cannot specify a new language or remove a language. The number of entries is fixed and is defined by the implementation of the module and the languages it supports.

You can modify the Language Source by typing new information in the cell.

Alarms

System Reliability Manager generates an information (INFO) alarm if the language cannot be found at the specified location.

Script Table

The Script Table lists all scripts known to the Script Launcher on the agent. Each entry in the table has the attributes listed in the following table.

Table 5–1 Script Table Values

Attribute 

Description 

Script Owner 

The user on the agent who owns this script. 

Script Name 

The script name. 

Description 

A description of the purpose of the script. 

Admin Status 

The following statuses are possible: 

  • Enabled indicates that the owner allows the script to be used by others.

  • Disabled indicates that the owner does not allow the script to be used by anyone else.

Operation Status 

The following statuses are possible: 

  • Enabled indicates that the script is available and can be started by a launch table entry.

  • Disabled indicates that the script cannot be used.

  • NoSuchScript indicates that the script does not exist at the specified location.

  • WrongLanguage indicates that the language is not known.

Language 

The language in which the script is written. This value needs to be one of the languages listed in the Language Table. 

Script Source 

File name of the script. 

Default Argument 

The default argument for this script. 

Script Users 

The users who are permitted to use this script. 

Groups 

The UNIX groups that are permitted to use this script. 

The fields you can modify through the browser are Admin Status, Script Users, and Groups. The Admin Status is the area where you enter the desired status of your script. For example, the Admin Status can be enabled or disabled. While this choice reflects your desired status, only the Operation Status reflects the actual status once the module determines that all criteria have been met and are ready.

Script Table Alarms

ScriptInfo.dat File

The ScriptInfo.dat contains information about the scripts that are available to be run. The addition of a new script to the ScriptInfo.dat file enables the module to recognize the script. All the scripts that belong to a user must be listed in this file.

To Add a New Script
  1. Write a new script.

    The format of the ScriptInfo.dat file follows the standard configuration file format.

    slice:attribute=value
    
  2. Copy the new script to the ScriptInfo.dat file.

    The ScriptInfo.dat file is located in a directory identified by your user name, as in this example:

    /var/opt/SUNWsymon/SysMgmtPack/script-launcher/scripts/username/ScriptInfo.dat

    If this file already contains information about a script, add your script below the current information.

    The following example of the ScriptInfo.dat file contains two scripts.

    Script1:Owner = Scott
    Script1:Name = MyHello
    Script1:Desc = Says Hello
    Script1:Language = Java1.2
    Script1:Source = Hello.class
    Script1:AdminStat = 1
    Script1:OperStat = 1
    Script1:Users = Noble
    Script1:Group = Staff
    Script2:Owner = Denise
    Script2:Name = MyFile
    Script2:Desc = Says Hello
    Script2:Language = Java1.2
    Script2:Source = Hello.class
    Script2:AdminStat = 1
    Script2:OperStat = 1
    Script2:Users = Noble
    Script2:Group = Staff