Site/SunNet/Domain Manager Administration Guide
只搜寻这本书
以 PDF 格式下载本书

Results Grapher

21

This chapter discusses the following topics:
  • Starting the Results Grapher
  • Results Grapher window
  • Graph Properties window
  • Displaying graphs
  • Merging graphs
The Results Grapher is a graphing utility that you can use to visualize attribute values returned from Data requests or stored data sent from the Results Browser.
In a Data request, you can choose to have reported attribute values sent to the Results Grapher for display. (This is described in Chapter 15, "Requests Management.") From the Results Browser, you can send data to the Results Grapher by selecting a report stream and pulling down a menu to graph selected attribute values from the report stream. (This is described in Chapter 20, "Browser.")
Each instance of the Grapher can only work with other SNM tools that have the same user name.

21.0.1 Starting the Results Grapher

The Grapher can be invoked from either the Tools menu in the SunNet Manager Console or from a command line. Either way, the Results Grapher runs as a separate process from the SunNet Manager Console and remains running when you quit the Console. To start the Grapher from the Console, press MENU on the Tools button and drag and release on the Grapher menu option (see Figure 21-1).

图形

Figure 21-1

You can also invoke the Grapher from the command line by entering.

  mgrhost% <tools-path>/snm_gr [-b]  

where <tools-path> is:
  • /usr/snm/bin for Solaris 1.x installations
  • /opt/SUNWconn/snm/bin for Solaris 2.x installations.
If the -b option is not specified in the command line, graphs will be plotted on a black background. If the -b option is specified, graphs will be plotted on a white background. When you invoke the Grapher from the Tools menu, graphs are by default plotted on a black background.
To cause graphs to be displayed on a white background when you invoke the Grapher from the Tools menu, you must add the -b option to the snm_gr elementCommand instance in the elements.schema file. (Refer to Chapter 18, "Management Database," for more information about modifying the elements.schema file.)
To cause graphs to be displayed on a white background when you invoke the Grapher from the Results Browser, start the Browser with the -b command-line option.
When the Grapher is invoked, the Results Grapher window appears. When you send data to the Grapher from the Browser, a graph window appears. The following describes these windows.

Note - When the Grapher starts, it writes its temporary RPC program number to /tmp/snm_gr.rpcid.<user> (<user> is either the name of the user or the value of the environment variable SNM_USER). Other applications, such as the Console, the Browser, or snm_cmd, use this file to send data to the Grapher.

21.1 Results Grapher Window

If you previously sent data to the Grapher, the names of the graphs appear in the scrolling list; if not, the list is empty. The Results Grapher window contains a scrolling list and four buttons, as shown in Figure 21-2.

图形

Figure 21-2

The scrolling list contains the name of graphs that you have created. Click SELECT to select one or more of the graph names in the scrolling list. By using one of the four buttons in the window, you can perform the following operations on one or more selected graphs:
  • View displays the selected graph in a Graph pop-up window.
  • Properties displays the selected graph properties in a Graph Properties pop-up window.
  • Remove deletes the selected graph, along with its properties.
  • Merge merges the selected graphs into a single pop-up Graph window. This button is only active if there are two or more selected graphs.

21.2 Graph Properties Window

The Graph Properties window, as shown in Figure 21-3, contains parameters for the display of each graph.

图形

Figure 21-3

The following describes the Properties parameters:
Name: Specifies the name of the graph that will appear in the scrolling list in the Results Grapher window, and as the label on the Graph pop-up window. By default, this field contains the host name, followed by the attribute selected to be graphed. If you are graphing data from multiple systems (for example, you select multiple Browser report streams to be plotted on the same graph), the name would contain multiple host names instead of a single name.
Frame Color: Specifies the color of the frame of the graph. By default, this value is Cyan on color monitors. To change the frame color, press MENU over the Frame Color abbreviated menu button and release the pointer on the desired color in the palette. Note that on monochrome monitors, this parameter and any other fields that specify color choices are dimmed.
Base Color: Specifies the color of the base of the graph. By default, this value is Dark Orchid on color monitors. To change the base color, press MENU over the Base Color abbreviated menu button and release the pointer on the desired color in the palette.
Data Scale: Specifies whether the data sets (vertical axis) are plotted using Absolute or Relative values. This is useful only if more than one data set is to be plotted. If Absolute is chosen, the maximum and minimum values of the graph assume the greatest and least values among all the data sets. If Relative is chosen, the maximum and minimum values of the graph vary according to the maximum and minimum values of each data set. Absolute data scale should be used when displaying multiple data sets whose data values are of the same units--for example, CPU percentage for multiple systems. Relative data scale should be used when displaying multiple data sets whose data values are of different units--for example, CPU percentage, interrupts, and collisions for a single system. By default, Absolute is selected.
Time Scale: Specifies whether the time stamps of the data sets are plotted in Absolute or Relative scale. If Absolute is chosen, the start and end times of the graph equal the earliest and latest times, respectively, of the data sets. If Relative is chosen, the start and end times of the graph vary according to each data set. Absolute time scale is useful when displaying data sets from reports whose time spans overlap--for example, yesterday's CPU percentage for three different systems. Data from a very short time period that is graphed with
data from a different time (for example, 30-second time slices taken six months apart) can appear almost invisible when graphed in Absolute scale. Relative time scale is useful in comparing data sets whose time stamps differ greatly--for example, CPU percentages for a single system on three different days. With Relative time scale, the time stamps at the bottom of the graph display only the relative time from the first data value. By default, Absolute is selected.
Order: Specifies the order in which the data sets are drawn if there is more than one data set in the graph. If Normal is chosen, the graph in the foreground corresponds to the first data set in the list of the Properties window. If Reverse is chosen, the graphs are drawn in reverse order, that is, the graph in the foreground corresponds to the last data set in the list of the Properties window. By default, Normal is selected.
Fill:
Specifies the style in which the graph is to be drawn. If On is chosen, each graph is drawn in a solid fashion with the base of the graph extending up to the apex. If Off is chosen, each graph is drawn in a ribbonlike or line fashion. Setting Fill to Off allows you to view graphs that might otherwise be hidden by the graph in the foreground. By default, On is selected.
Draw: Specifies whether the graph is drawn in a two-dimensional (2-D) or three-dimensional (3-D) manner. By default, 3-D is selected.
Data Sets A scrolling list containing all the data sets plotted in the graph. Each item in the list has a color glyph and the host name and attribute graphed. The color glyph corresponds to the color (or line-style for monochrome monitors) used to draw the graph and may be used as a legend for the graph. This list is an exclusive list; only one item may be selected at any time.
The following four properties affect only the selected item in the Data Sets scrolling list:
Data Set: Controls the visibility of the selected data set's graph. Show makes the data set's graph visible, while Hide makes the data set's graph invisible. By default, Show is selected.
Plot Value: Specifies the data sets to be plotted in one of three modes: Absolute, which plots the values of the data sets as is; Cumulative, which sums up each successive data value and plots them; and Delta, which takes the difference between each pair of data value and plots them. By default, Absolute is selected.
Line Color: Sets the line color of the graph. The Grapher automatically selects an initial color based on the number of data sets plotted.
Line Style: Sets the line-style of the graph. This option is only active when using a monochrome monitor. One of four line-styles may be chosen: Solid, Dotted, Dashed, Dot-Dashed. By default, Solid is chosen.
To establish or change the attributes of the graph, click the Apply button. To get back the original settings of the properties just after the last Apply, click the Reset button.

Note - Changes to the default values of the Graph Properties fields cannot be saved from one Grapher session to another. When you exit a Results Grapher session, all changes you have made to the default values of the Graph Properties fields are lost.

21.3 Displaying Graphs

To display a graph, select it from the scrolling list in the Results Grapher window and click SELECT on the View button. A pop-up window appears as shown in Figure 21-4.

图形

Figure 21-4

By default, graphs are plotted on a black background. To change the background to white, see the explanation on invoking the Results Grapher at the beginning of Section 21.0.1, "Starting the Results Grapher.".
If Data Scale is set to Absolute, labels appear on the left vertical axis indicating the scales of the data sets. No labels are displayed if Data Scale is set to Relative. The start and end times of the graph are displayed at the bottom two corners of the graph; the start time is displayed at the bottom left corner and the end time is displayed at the bottom right corner.
If Time Scale is set to Absolute, the exact start and end times are displayed. If Time Scale is set to Relative, the start time is labeled 00:00:00 (<hours>:<minutes>:<seconds>) and the end time is the time elapsed since start time (<hours>:<minutes>:<seconds>).
You can zoom into a graph to get finer readings. Press SELECT at a point in the graph, then drag the mouse to another point in the graph; this must be done along the X- (time) axis. Two boundary lines mark the points that you have selected. At the same time, two time labels appear in the middle at the bottom of the graph. The time label on the left displays the start boundary time, and the label on the right displays the end boundary time. You can use this feature to inspect the times of particular points on the graph.
To replot the graph, press MENU and move the pointer to the "Replot graph with new times" option. The graph is then replotted based on the boundary times between the two points you selected. You can zoom repeatedly to get successively finer readings. To replot the original graph, press MENU and move the pointer to the "Show entire graph" option.
You can change the viewing angles of the graph in the three-dimensional view. Press MENU and move the pointer to Controls. A pop-up window containing two slider controls appears, as shown in Figure 21-5.

图形

Figure 21-5

The Elevation slider controls the rotation of the graph on the vertical plane. The Rotation slider controls the rotation of the graph on the horizontal plane. You can interactively control the viewing angles of the graph by shifting the values of the sliders.

21.4 Merging Graphs

You can superimpose graphs on one another. Select the graphs to be merged from the scrolling list in the Results Grapher window, then click SELECT on the Merge button. A pop-up window appears with the selected graphs plotted together.
After graphs are merged, common parameters such as Data Scale or Time Scale take on default settings. For example, if one of the graphs being merged has Time Scale set to Relative, its Time Scale is reset to the default value of Absolute. Data set-specific parameters, such as Plot Value, retain their individual settings. Data sets are always displayed; a new line color may be assigned if there are two or more data sets using the same line color.