Site/SunNet/Domain Manager Administration Guide
只搜尋這本書
以 PDF 格式下載這本書

Browser

20

This chapter discusses the following topics:
  • Starting the Results Browser
  • Loading files
  • Report Streams
  • Streams Menu
  • Selecting Streams
  • Folders
  • Customizing the Browser
You can examine data stored in the following files:
  • Console Event/Trap log file. This file is normally located at:

    · /var/adm/snm/event.log for Solaris 1.x installations

    · /var/opt/SUNWconn/snm/event.log for Solaris 2.x installations.

  • Console Data Report log entries that have been saved to a disk file. (Refer to "Data Reports" for more information.)
  • Data Report files. You use Save option in the Console Data Report window to create a log file of data reports.
  • Other files that use the data format specified in snm.logfile(5).
Each instance of the Browser can only work with other SunNet Manager tools that have the same user name.

20.1 Starting the Browser

Invoke the Browser from either the Tools menu in the SunNet Manager Console or from a command line. It runs as a separate process from the Console and remains when you quit the Console. To start the Browser from the Console, press MENU on the Tools button and drag and release on the Browser menu option.
To invoke the Browser from the command line, use the following command:

  mgrhost% <tools-path>/bin/snm_br [-b] [<filename1>] [<filename2>] ..  

  • <tools-path> is /usr/snm for Solaris 1.x installations.
  • <tools-path> is /opt/SUNWconn/snm for Solaris 2.x installations.
When you start the Browser from a command line, you can optionally specify files to be automatically loaded into the Results Browser. File names can include wildcards. When invoked without any file names specified, the Results Browser displays the window shown in Figure 20-1.
If the Browser is started from a command line with the -b option, this causes graphs to be plotted on a white background, rather than the default black background, if the Grapher is invoked from the Browser.

圖形

Figure 20-1

20.2 Loading Files

To load a file (which must be in the prescribed format) into the Browser, press MENU on the File button and release MENU on the Load option. A pop-up window appears, prompting you for the name of a file to be loaded. See the example in Figure 20-2, "Load Window."

圖形

Figure 20-2

To load a file, double-click SELECT on the file name or its icon or type in the file name at the Name prompt and then click SELECT on the Load button. You can load multiple files into the Browser, one at a time; however, you cannot specify wildcards in any file name.

Note - Because the Browser keeps open every file it reads, there is a limit to the number of files you can load in a Browser session. This limit is determined by the number of file descriptors allowed by the C-shell to a single process; the default is 64. You can increase this number up to 256 by using the limit command in the C-shell. You can also run multiple Browser sessions at the same time.

20.3 Report Streams

When you load a file into the Browser, the data in the file is automatically organized into report streams, which appear in the scrolling list in the upper pane of the Browser window. See Figure 20-3, "Results Browser Report Streams."

圖形

Figure 20-3

Report streams are logical groupings of reports from agents. Each stream contains the results of a request from a particular requester address at a particular time. The Browser also distinguishes streams by report type (data, event, error, etc.). For example, if a file contains both data reports and error reports resulting from an individual request, the data reports are listed in a separate stream from the error reports.
Each report stream is defined in the following format in the upper portion of the Browser window:

  <system>       <agent>       <group>      <type>        <date>       <number_of_reports>  

where:
<system> is the name (up to 15 characters) of the target system (the host where the managed object resides).
<agent> is the name of the agent.
<group> identifies the attribute group.
<type> identifies the type of report (data, event, trap, error).
<date> is the time stamp of the original request from the manager.
<number_of_reports> indicates the number of reports in the stream.
To view the contents (individual reports) of a particular stream, double-click SELECT on the stream you want to view. Individual agent reports from the selected stream are displayed in the lower portion of the Browser window, as shown in Figure 20-4, "Agent Reports from Selected Stream."

圖形

Figure 20-4

If more than one report exists in the selected stream, a slider bar appears. To view a specific report, type in the report number on the Report line to the left of the slider bar and press Return. You can also view reports by pressing
SELECT on the drag area (the small rectangular area between the ends of the slider bar) and dragging the mouse pointer to the right or the left until the desired report number is reached.
You can clone, delete, or print reports from the selected stream by pressing MENU in the Report window to bring up the Report menu. The Report menu is shown in Figure 20-5, "Report Menu."

圖形

Figure 20-5

Report Menu functions are described as follows:
  • To clone a report, select the Clone option. This causes a copy of the current report to be displayed in a pop-up window so that its contents can be compared with other reports. To make the pop-up window disappear, unpin it by clicking SELECT on the pushpin.
  • To delete a report, select the Delete option.
  • To print a report, press MENU in the Report window and move the pointer to one of the three Print Options:

    · Report--prints the currently displayed report.

    · Stream From Here--prints all reports in the stream, beginning with the currently displayed report.

    · Entire Stream--prints all reports in the stream.

    By default, reports are printed to lpr on Solaris 1.1, or lp if SNM has been installed on a Solaris 2.x machine. You can choose a different printer by using the Tool Properties option of the Browser's Edit menu. Refer to the section on "Customizing the Browser" for more information.

    If the reports to be printed exceed a set number of kilobytes, you are asked to confirm that you want the reports printed before printing commences. By default, this limit is set at 100 kilobytes. You can adjust this limit by using the Tools Properties option of the Browser's Edit menu. Refer to the section on "Customizing the Browser," for more information.

20.4 Streams Menu

To perform operations on one or more streams, invoke the pull-down Streams menu by pressing MENU in the top panel of the Browser window. You receive:

圖形

Figure 20-6

The following briefly describes Streams menu functions.
  • Graph allows you to send selected streams to the Results Grapher. This function is described in detail in the section, "Sending Data to the Results Grapher."
  • Select allows you to select streams based on certain properties. This function is described in detail in the section "Selecting Streams."
  • Copy to copies selected streams to a folder. The use of folders is described later in Section 20.6, "Folders."
  • Delete deletes selected streams.
  • Print prints selected streams to your configured printer.
  • Clear All Choices deselects any selected streams.

20.5 Selecting Streams

The Browser provides mechanisms for selecting streams based on certain user-specified properties. This function can be invoked by pressing MENU in the scrolling list and pulling right on the Select option of the Streams menu. You can select streams By System, By Agent.Group, or By Report Type. When you have made your selections, the names of the report streams in the scrolling list to which the specified properties apply are highlighted. Figure 20-7, "Streams Selection by System" illustrates selection by system.

圖形

Figure 20-7

20.5.1 Sending Data to the Results Grapher

You can have data in a report stream plotted using the Results Grapher. To send data to the Grapher, first select the desired streams. Press MENU in the scrolling list in the upper portion of the Browser window to invoke the Streams menu, pull right on Graph and release on one of the listed attribute names (shown in an alphabetized list). Figure 20-8, "Sending Data to the Grapher" illustrates how this is done:

圖形

Figure 20-8

When you make this selection, the Browser sends a set of attribute and corresponding time values to the Results Grapher for plotting. Only integer, float, counter, gauge, timestamp, and UNIX time data may be plotted. Therefore, only the names of attributes of these data types are included in the menu list.
You can select more than one report stream and have each plotted on the same graph. For example, you can graph comparative data for multiple systems onto a single graph.
You can also graph multiple attributes from one or more selected report streams. To do this, pull right on either the All Attributes or the Choices option. The All Attributes option plots every integer and float attribute listed in the report stream. The Choices option displays a pop-up window with a list from which you can select the attributes to be graphed. Note that the All Attributes option is only available if there is more than one attribute that can be plotted.
If the Browser was started from a command line with the -b option, graphs will be plotted on a white background when the Results Grapher is invoked. Otherwise, if the -b option was not specified, the Results Grapher will display graphs on a black background
After information is sent to the Grapher, you can view the data in a Grapher session. See Chapter 21, "Results Grapher," for information.

20.6 Folders

When you load a file into the Browser, the file is automatically loaded into the default folder Main. A folder is a temporary place to logically group report streams and store them for reference during a Browser session. You can create other folders to hold specified groups of report streams by using the Edit menu.
To create new folders, press MENU on Edit, drag the pointer to New Folder, and then release the MENU button. A folder named "New Folder" is created, which you can rename by typing the desired name on the line where "New Folder" is displayed, and pressing Return. The "Main" folder cannot be renamed.
To load files into a folder, press MENU on File and drag the pointer to the Load option. A pop-up window appears, prompting you for the name of the directory and file name of the file to be loaded. To load the file, click SELECT the Load button. You can load multiple files into a single folder, but duplicate reports are ignored.
You can also copy selected streams into a folder by using the Copy to option in the Streams menu. To do so, first select one or more streams by using the Select option of the Streams menu or by clicking SELECT on the desired stream in the scrolling list. Press MENU in the scrolling list and drag the pointer to Copy to. Continue to pull right to see a list of folder names; release the pointer on the desired folder. Figure 20-9, "Copying Streams to a Folder" illustrates copying streams to a folder.

圖形

Figure 20-9

To empty a folder of all its streams, press MENU on Edit and drag the pointer to Empty Folder.
To delete a folder, press MENU on Edit and drag the pointer to Delete Folder. If you try to delete the Main folder, it will be emptied but not deleted.
As mentioned previously, folders are temporary places to keep related streams together. Once you exit the Browser, the folder names and their contents disappear. You can save the contents of a folder to a file for future access. To do so, press MENU on File and drag the pointer to the Save Folder option. In the pop-up window, specify a path and file name and click the Save button. In a future Browser session, you can load this file to view and manipulate the same set of streams.

Caution - Do not attempt to save the contents of a folder into a file that contains reports that are currently loaded into the Browser, as this will corrupt the file.

Because log files may be extremely large, individual reports are not kept in memory. Instead, pointers to the files are maintained. Therefore, if a file is overwritten while it is open, the file would be destroyed and the pointers to the file would be corrupted.

20.7 Customizing the Browser

You can customize the properties of the Browser by using the Tool Properties option of the Edit menu. Press the mouse MENU button on Edit and drag and release on the Tool Properties option. The Properties window appears, as in Figure 20-10, "Tool Properties Window."

圖形

Figure 20-10

The following fields in the Properties window affect the operation of the Browser. Any changes you make take effect when you press the Apply or Save buttons.
Window Position: Defines the location (in pixels) of where the Browser window is displayed. Default values are 300 and 100 for x and y locations, respectively.
Window Size: Defines the dimensions (in pixels) of the Browser window. Default values are 512 and 640 for x and y dimensions, respectively.
Print Option: Specifies the printer name. lpr is the default printer for Solaris 1.1 installations. lp is the default printer for Solaris 2.x machines.
Verify printing more than (100) KBytes Defines a print output size for printing report streams. For any output that exceeds the specified size, you will be asked to confirm whether you want to print the reports. Either enter in a new value on the line or click SELECT on the up- or down-arrow glyphs to increase or decrease the specified size.
Report Format: Defines the appearance and contents of stream reports in the lower portion of the Browser window. All of the listed choices are selected by default, which causes all report information to be displayed in the report window. Click SELECT on any of the fields to deselect or select a choice. You can also choose to have attribute names displayed left- or right-justified on the screen. By default, attribute names are displayed right-justified.
The four buttons at the bottom of the Properties window operate as described below.
  • Apply applies any changes that have been made to the fields in the Tool Properties window.
  • Save saves window parameter changes to the OpenWindows.Xdefaults file and applies any changes you made to the Report Format and Print Option parameters.
  • Load loads window parameters from the X Resource Manager. You can then click the Apply button to apply these parameters to the Browser window.
  • Reset sets the values in each of the fields to the last applied changes (the last time you clicked the Apply button) or to the values when the Properties window was first displayed.