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.
(On Solaris 10) Dynamic Tracing (DTrace) allows the user to observe the behavior of user programs and operating system. DTrace allows the user to explore a system, to understand how it works, track down performance problems across layers of software, or locate the cause of aberrant behavior. D programming language is provided with Solaris 10 to write programs that can help in debugging a system.
For details on DTrace, see Solaris Dynamic Tracing Guide.
The Script Repository module contains commonly used DScripts for Solaris 10. You can run these scripts from the Script Launcher module.
The Script Information group includes two tables:
The Language Table, which lists the supported languages. Currently, Java, shell script, and DScript (on Solaris 10) are included.
The Script Table, which enables you to view available scripts on the agent
The security for Script Repository module is implemented as follows:
Only the root user can place scripts in the following directory:
/var/opt/SUNWsymon/SysMgmtPack/script-launcher/scripts
Each script specifies the users and groups who are allowed to execute the script. These users and groups are specified as entries within Users and Groups in the script configuration file. Additionally, these fields can be modified from any console through the Scripts Table. Only esadm users are allowed to modify these fields.
root cannot be in the Script Users field of the Script Table.
Load the module.
For more information on loading and unloading modules, see the Sun Management Center 3.6 User’s Guide. The Script Repository module is available under Local Applications in the Navigator window.
In the Browser window, double-click Local Applications.
The category expands.
Under Local Applications, double-click Script Repository.
The category expands.
Double-click the Script Information folder to view the Language Table and the Script 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:
Language Name. (For example, Java)
Language Source. (For example, /usr/java)
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.
System Reliability Manager generates an information (INFO) alarm if the language cannot be found at the specified location.
The Script Table lists all scripts known to the Script Launcher on the agent.
(On Solaris 10) Some pre-defined DScripts are added to the Script Table.
Each entry in the table has the attributes listed in the following table.
Table 5–1 Script Table Values
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.
An info alarm is issued if the script is not in a supported language.
An info alarm is issued if the script is not accessible.
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.
The ScriptInfo.dat contains information about the scripts that are written in shell script, Java, and DScript (Solaris 10).
Write a new script.
The format of the ScriptInfo.dat file follows the standard configuration file format.
slice:attribute=value
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 = Java 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 = Java Script2:Source = Hello.class Script2:AdminStat = 1 Script2:OperStat = 1 Script2:Users = Noble Script2:Group = Staff