Sun Management Center 3.6.1 User's Guide

Appendix A Miscellaneous Sun Management Center Procedures

This appendix describes several procedures that do not readily fit into other sections of this document. Specifically, this appendix includes the following information:

Monitoring Topology Manager and Event Manager

There are five components in the server layer:

With the exception of the server, the other four components are Sun Management Center agents that are loaded with specialized modules.

The default configuration for the Topology manager and the Event manager and all other Sun Management Center agents is defined by the Agent Statistics module. This module includes features that guard against errors that can bring down the host. The default action is for the software to terminate the Topology manager process if predefined thresholds are exceeded. See Agent Statistics Module Version 2.0 for more information about the Agent Statistics module.

ProcedureTo Create a Server Component as a Monitored Object

You might want to monitor the Topology manager, Trap handler, Configuration manager, and Event manager to determine their status. The Configuration manager and the Trap handler are configured so that you do not need to perform any maintenance procedures. In addition, the default configurations of both the Topology manager and the Event manager work for most user environments. However, you can modify the default configurations for specialized environments.

  1. In the main console window, choose Create Object from the Edit menu.

    The Create Object window is displayed. By default, the tab is set to Node. For more information, see To Create a Node.

  2. Choose Sun Management Center Agent - Host from the Monitor Via menu.

  3. Type the name of the server component in the Node Label field.

  4. (Optional) Type a description of the server component.

  5. Type the name of the Sun Management Center server in the Hostname field.

  6. Type the port number for the server component in the Port field.

    Sun Management Center software uses the following default port values:

    • Agent component : port 161

    • Server trap handler: port 162

    • Server event manager: port 163

    • Server topology manager: port 164

    • Server configuration manager: port 165


    Note –

    The server component uses port 2099 by default. However, you cannot change the server component port number here.


  7. Complete this procedure with one of the following actions:

    • Click OK to create the server component object and close this window.

    • Click the Apply button to create the server component object without closing this window.

ProcedureTo Change the Registry Port Number

The Sun Management Center server includes a registry feature that enables value-added products, such as Hardware Diagnostics Suite, to register its existence with the server. By default, the registry feature uses port 5600. If this port is being used by another application, the application will fail. To change the registry port, follow these steps:

  1. Change the ServiceRegistryPort value in the /var/opt/SUNWsymon/cfg/javaserver.properties file.

  2. Change the ServiceRegistryPort value in the /var/opt/SUNWsymon/cfg/javaservice.properties file to match the value you provided in the previous step.

  3. Restart the Sun Management Center server.


    Note –

    When you set up the Sun Management Center server, the installation process prompts you to provide a different port number for the registry service, if the default port is in use.


ProcedureTo Increase the Critical Threshold for the Virtual Size Data Property in the Topology Manager

The Topology manager enables the main console window to present logical objects in a topology view. The Topology manager also provides the ability to create a logical object, such as a group, whose status summarizes the statuses of multiple managed objects.

Managed objects include networks, hosts, hardware components, and software components. The total number of objects and the contents of these objects determine the system resource requirement, for example, Virtual Size, for the Topology manager. This requirement must be less than the defaults set for the Topology manager.

If the Virtual Size of the Topology manager exceeds the default value, then the Topology manager exits with the following error message:


error excessive virtual memory use

To solve this error, increase the default virtual size as described in the following steps.

  1. Evaluate the situation carefully.

  2. Create the Topology manager monitored object.

    See To Create a Server Component as a Monitored Object.

  3. Open the Details window using one of the following methods:

    • Press mouse button 3 on the Topology manager object icon. Choose Details from the pop-up menu in the hierarchy view or the topology view.

    • Double-click the Topology manager icon.

    • Select the Topology manager icon in the main console window, then choose Details from the Tools menu.

  4. In the Browser Details window, double-click the Local Applications icon in the hierarchy (tree) view.

  5. Double-click the Agent Statistics icon in the contents view, or click the expansion icon next to the Agent Statistics icon in the hierarchy view.

    The Agent Statistics folders are displayed.

  6. Double-click the folder icon for the PA Process Statistics.

    The monitored properties are displayed in a property table.

  7. Select the Virtual Size table cell, then open the Attribute Editor through one of the following methods:

    • Press mouse button 3 in the table row, and choose Attribute Editor from the pop-up menu.

    • Click the Attributes button.

  8. Click the Alarms tab button.

    The alarm rows are displayed.

  9. Type the desired value in the Critical Threshold (>) field.

  10. Complete this procedure with one of the following actions:

    • Click OK to create a new Critical Threshold value and close this window.

    • Click the Apply button to create a new Critical Threshold value without closing this window.

ProcedureTo Change the Default Values for Smart Delete in the Event Manager

The Event manager communicates with other server components through SNMP using the default port 163. Similar to the Topology manager, the Event manager is also loaded with the Agent Statistics module. In addition, the Event manager is automatically loaded with a specialized Event Management module. The Event Management module is displayed in the Browser Details window in the Local Applications category.

The Event Management module is responsible for the overall maintenance of the event database. This module's responsibilities include purging deleted events, renaming the trash file, and Smart Delete.

Smart Delete means that Sun Management Center software automatically deletes closed, fixed, and open events from the event database after a set period of time. By default, the closed or fixed events are removed from the database after 7 days and the open events are removed after 30 days. To change these defaults, perform the following steps.

  1. Create the Event manager monitored object.

    See To Create a Server Component as a Monitored Object.

  2. Open the Details window through one of the following methods:

    • Press mouse button 3 on the Event manager icon. Choose Details from the pop-up menu in the hierarchy view or the topology view.

    • Double-click the Event manager icon in the hierarchy view or the topology view.

    • Select the Event manager icon in the main console window, then choose Details from the Tools menu.

  3. In the Browser Details window, double-click the Local Applications icon in the hierarchy (tree) view.

  4. Open the Module Editor through one of the following methods:

    • Press mouse button 3 on the Event Management module. Choose Edit Module from the pop-up menu in the hierarchy view or in the contents view.

    • Select the Event Management module in the Details window, then choose Edit Module from the Module menu.

    The Module Parameters Editor is displayed. For more information, see To Modify Module Parameters.

  5. Type the new time values into the editable fields.

    By default, the closed or fixed events are removed from the database after 7 days. The open events are removed after 30 days.

  6. To turn off Smart Delete, choose Disabled from the Smart Delete Enabled Switch menu.

  7. Click OK to accept the changes that you made and close this window.

Reading Sun Management Center Log Files

The Sun Management Center server and agents write to various log files in the directory /var/opt/SUNWsymon/log.

These files are circular log files. A circular log file does not grow in size after a certain limit. As new messages are logged into the file, the oldest messages are removed.

Use the es-run interface with the ctail and ccat commands to view these log files. The es-run interface sets up the proper environment to run Sun Management Center utilities. The utilities ccat and ctail display only the relevant data, after sorting the data in chronological order. The ccat and ctail commands are similar to the UNIX cat and tail commands, but are intended for use with Sun Management Center circular log files.

Using ccat to Read Sun Management Center Log Files

The ccat command reads the specified log file, sorts the messages in chronologically ascending order, and writes to the standard output. The ccat command takes one argument, which is the full path to the circular log file.

To use the es-run interface with the ccat command, you type:


# /opt/SUNWsymon/sbin/es-run ccat path_to_file/filename 

Using ctail to Read Sun Management Center Log Files

The ctail command reads the circular log file and by default writes the last 15 lines of the file to standard output.

The ctail command takes four arguments:

filename

The filename argument is the full path name to the circular log file. The filename argument is mandatory.

-f

The -f option is used to monitor the growth of the log file. As the log file grows, the messages appended to the file are also written to the standard output. The ctail -f option is similar to the -f option for the UNIX tail command.

-l

The -l option is used to print the absolute line number at the beginning of each message.

-n

The -n NumOfLines option is used to change the number of lines that are displayed. By default, only the last 15 lines are printed.

To use the es-run interface with the ctail command, you type:


# /opt/SUNWsymon/sbin/es-run ctail [-f, -l, -n NumOfLines] path_to_file_filename

Adding Customized Menu Items

Sun Management Center software enables you to customize the Tools menu by adding external, standalone applications that can be launched from the main console window. The application must be written in the Java programming language. Non-Java applications can be accommodated by the ExampleSystemCommand Java wrapper class that executes another program or shell script in a separate process. The application does not require a selected host object. The application has no further interaction with Sun Management Center once the application has been launched.

The name of the application is specified in the console-tools.cfg file. The application name is added to the Tools menu in the main console window below the standard Sun Management Center menu items. The application is launched in a separate window.

The console-tools.cfg file is a plain text file that resides on the Sun Management Center server host. The file may be modified at any time, including while the console is running. However, changes that are introduced by editing the files do not take effect until the es-tool script is executed and the console is restarted. The file consists of a series of lines, each of which describes an application. Blank lines and lines beginning with the pound sign (#) are ignored. Fields within each line are separated by commas (,).

Each application that is implemented as a shell script or as an executable binary is defined by a line with the following format:


menu_label,class [args]

where:

For example, the following file shows entries for three applications to be added to the Tools menu: Example GUI, rlogin, and ftp.

# Format:
# menu_label, class arguments

Example GUI,exampleApp.ExampleGUITool

Rlogin,com.sun.symon.base.client.console.SMSystemCommand 
"/usr/openwin/bin/xterm -e rlogin $host" "start rlogin $host"

exampleApp.ExampleSystemCommand:ftp,exampleApp.ExampleSystemCommand 
"/usr/openwin/bin/xterm -e ftp $host" "start ftp $host"

Caution – Caution –

Each entry must be specified on a single line, even though the text is shown wrapped in the example.


The Java wrapper class SMSystemCommand enables you to execute an arbitrary shell command. This class takes two arguments. The first argument is the shell command to execute.

The second argument is the command to run on a Microsoft Windows client. The following line is an example of this command:

com.sun.symon.base.client.console.SystemCommand "<shell command>" "<windows command>"

In this case, the first argument is ignored. Variable substitution is performed on the arguments if special variable references are present. Two variables are allowed:

ProcedureTo Customize the Tools Menu

  1. Use a standard text editor to add a line to the /var/opt/SUNWsymon/cfg/console-tools.cfg file.

    This line specifies the following items:

    • Name to display on the Tools menu

    • Fully-qualified Java class name for the application

    • Any required class arguments

    See the detailed description in the section introduction for more information.

  2. Place the Java class files for the applications in the /opt/SUNWsymon/apps/classes directory.

  3. Run the es-tool update script on the Sun Management Center server host.


    # /opt/SUNWsymon/sbin/es-tool /var/opt/SUNWsymon/cfg/console-tools.cfg
    
  4. Stop the console by choosing Exit from the File menu on the main console window.

  5. Click the Exit button to exit the application.

  6. Restart the console for the application to be added to the Tools menu.


    # /opt/SUNWsymon/sbin/es-start -c
    

    Note –

    Your site's configuration might also require you to restart the Sun Management Center server.


SNMP MIBs for Sun Management Center Modules

Sun Management Center software publishes the Simple Network Management Protocol Management Information Bases (SNMP MIBs) for the modules. The MIB file is an Abstract Syntax Notation (ASN.1) specification of the data that is modeled, in this case, by the Sun Management Center module. These MIBs can be used as the data definition by third-party SNMP-based management stations, such as HP OpenView and UnicenterTM. Sun Management Center has MIBs for the following modules:

The above MIBs are installed by default, in the /opt/SUNWsymon/util/cfg directory by the Sun Management Center software during installation of the agent layer. In your installation, your base directory might be different.

ProcedureTo Use the Sun Management Center SNMP MIBs in a Third-Party Management Station

  1. Preprocess the MIBs.

    Some SNMP management stations can read the ASN.1 MIBs. Others require the ASN.1 MIBs to be converted to some other format in order to be read. For example, you might need to convert the MIB to a Guidelines for the Description of Managed Objects (GDMO) format or use a MIB compiler to generate another intermediate format.

  2. Load the MIB.

    Load the ASN.1 MIB or a preprocessed format of that MIB into the third-party management station. This step informs the third-party management station about the layout and composition of the data that is modeled by the MIB.

  3. Use the MIB information to talk to the Sun Management Center agent.

    Once the MIB is successfully loaded into the third-party SNMP agent, you can communicate with the Sun Management Center agent to get the data from the MIB. The MIB-II Proxy Monitoring module must be loaded and be enabled in the Sun Management Center agent.

    For example, you can start issuing the SNMP Get commands on some of the variables in the MIB.

    By default, the Sun Management Center modules are enabled for SNMP Get commands by using the SNMPv1 community public and SNMPv2 user name public. However, if the Sun Management Center module has different settings, then you need to use the correct community name and user name to communicate with the Sun Management Center agent.


    Note –

    Because Sun Management Center agents operate with SNMPv2 usec-based security, SNMP Set commands on the agent are involved. Refer to the SNMPv2 usec-related Request For Comments (RFCs) for more information.


Accessing Multiple Instance Modules

SNMPv2 uses the term context for the MIBs that can have multiple instances of the module loaded on the agent. If you use an SNMPv2-based third-party management station to communicate with this type of agent, be sure that you are using the right context information. However, if you are using a SNMPv1-based management station, then add the context information to the SNMP community as follows:


community:context

By adding this context information, you can access data from multiple instances of the same module running on an agent.

When an Agent Exits During Startup

The Sun Management Center agent has the ability to monitor itself and restrict its memory usage. Some predefined limits have been set for the memory usage of the agent process. These limits depend on the following criteria:

On rare occasions, the limit for default memory usage is exceeded during the agent startup and when the agent stops running. If this limit is exceeded, the default limits set for the agent memory size are not enough for your configuration.

To confirm that memory usage is the cause, look in the /var/opt/SUNWsymon/log/agent.log file for one of the following messages:


Excessive Virtual Memory Use
Excessive Physical Memory Use

If you see one of these messages during the agent startup, reconfigure the memory usage limits on the agent host using the following procedure.

ProcedureTo Increase Agent Memory Size

  1. Become superuser on the agent host.


    # su -
    
  2. Copy the file agent-stats-d.def to /var/opt/SUNWsymon.


    # cp /opt/SUNWsymon/modules/cfg/agent-stats-d.def /var/opt/SUNWsymon/cfg/
    
  3. In the /var/opt/SUNWsymon/cfg/agent-stats-d.def file, increase the alarmlimit:error-gt to the desired value as shown in the following code segment.

    The value is in Kbytes.


    procstats = {
            size = {
                statusActions(error-gt)
          = abort
                statusService(abort) 
          = _internal
                statusCommand(abort) 
          = abort "Excessive Virtual Memory Use"
                alarmlimit:error-gt = 70000
                alarmlimit:warning-gt = 60000
                alarmlimit:info-gt =
            }
         .....
         }
  4. Save the file and restart the agent.

Hanging Main Console Window

This section explains how to respond to a hanging console window in certain circumstances. In this case, the main console window hangs when users attempt to start a new console window and to connect to the Sun Management Center server. However, existing console window connections encounter no problems.

The main console window can hang for the following reasons:

The method that you use to resolve a hanging main console window depends on which memory is filled:

Database Backup and Recovery

Your Sun Management Center database sometimes needs to be backed up to prevent loss of data. For example, you should back up your database before you upgrade the hardware or the operating system. You can back up the Sun Management Center database in one of these ways:

Cold Backup

In a cold backup, you shut down the product first and then perform the backup. Before setting up the online backup feature, perform a cold backup as a contingency.

ProcedurePerforming the Cold Backup

  1. Become superuser.


    # /opt/SUNWsymon/sbin/es-backup
    

    Because the script shuts down Sun Management Center, you are prompted to confirm.

  2. Type y and press Enter.

    You are prompted for the full directory path to store the backup data files.

  3. Press Enter to accept the default directory or type a new path.

    The script creates the backup files and then restarts the product.

Online Backup

This procedure guides you through these tasks:

Using online backup has these advantages. You can back up the database up to the current moment without stopping the product. You can disable or enable ARCHIVELOG mode at any time.


Note –

Online backup does not shut down the product.


ProcedurePerforming the Online Backup

  1. (Optional) Perform a cold backup. See Performing the Cold Backup.

  2. Enable ARCHIVELOGMODE.

    1. Become superuser.


      # /opt/SUNWsymon/sbin/es-config -a enable
      

      You are prompted to confirm that you want to enable archiving.

    2. Type y and press Enter.

      Because the script will shut down Sun Management Center, you are prompted to confirm.

    3. Type y and press Enter.

      The script shuts down the product and recommends a cold backup. You are prompted to confirm that you want to set up the database in ARCHIVELOGMODE.

    4. Type y and press Enter.

      You are prompted for the full directory path to store the archive log files.

    5. Type the full path, for example:


      Enter full directory path to store the archive log files: 

      /var/opt/SUNWsymon/archives
      

      The script creates the directory if it does not exist and enables ARCHIVELOGMODE. You are prompted to start the agent and server components.

    6. Type y and press Enter.

  3. Run the online backup.

    1. Type this command:


      # /opt/SUNWsymon/sbin/es-backup -o
      

      You are prompted for the full directory path to store the backup data files.

    2. Press Enter to accept the default or type a different path, for example:


      Enter full directory path to store the backup data files [/var/opt/SUNWsymon/backup]:

      /var/opt/SUNWsymon/mybackup
      

      Note –

      If you accept the default directory and later plan to uninstall the product, your backup files might be deleted. Before uninstalling the product, move the backup files to another location. Alternatively, use a different path for your backup files.


ProcedureDisabling ARCHIVELOGMODE

If you do not want archiving on, you can disable archiving.

    To disable ARCHIVELOGMODE, type this command:


    # /opt/SUNWsymon/sbin/es-config -a disable
    

    Sun Management Center is shut down, the archive log files are removed, and the product is restarted.

ProcedureShutting Down the Product Before Backing Up

    If you want to shut down the product before doing a backup, you have two options:

    • To run the backup interactively, type this command:


      # /opt/SUNWsymon/sbin/es-backup
      
    • To run the backup in silent mode and use default answers to the script's questions, type this command:


      # /opt/SUNWsymon/sbin/es-backup -y
      

      The database files are saved in the directory /var/opt/SUNWsymon/backup.

    If you need to periodically run the es-backup script, you can set a cron program for the script to be run on a routine basis. In this case, use the -y option for the es-backup script so that no interaction is needed.


    Note –

    Both scripts shut down the Sun Management Center processes before starting the restore or backup. These scripts also restart the processes once the recovery or backup has been completed.


ProcedureRecovering the Database

    If your Sun Management Center database has been inadvertently corrupted due to a system failure, run the following interactive script as superuser to restore your database:


    # /opt/SUNWsymon/sbin/es-restore
    

    For example, you might want to follow this process if the system failure is due to a file system problem.