This chapter covers the following topics:
The accounting and reporting console is installed separately from the N1 Grid Engine 6.1 software. For details on the installation process, see Chapter 8, Installing the Accounting and Reporting Console, in Sun N1 Grid Engine 6.1 Installation Guide. In addition, you must enable your grid engine system to collect reporting information. For details about how to enable the collection of reporting data, see Report Statistics (ARCo) in Sun N1 Grid Engine 6.1 Administration Guide.
Start a web browser.
Type the URL to connect to the Sun Java Web Console.
In the following example, hostname is the host on which the accounting and reporting software has been installed.
https://hostname:6789 |
Log in to your UNIX account.
Select the N1 Grid Engine 6 ARCo application.
You are redirected to an Overview page that shows you a list of predefined ARCo queries.
The direct link to the ARCo application is https://hostname:6789/console/login/Login?redirect_url=%22/reporting/arcomodule/Index%22)
If you press the tab labeled Result List, you see any stored Query Results. Clicking on Query List brings you back to the Query List overview.
The query defines the data set that you want to retrieve. You can create simple queries for which the system formulates the SQL query string. If you know SQL and you want to write the query yourself, you can create advanced queries.
Go to Query List and press the New Simple button.
The following screen appears with three tabs showing common information, such as the query category and description. This information is optional. To define the query, go to the Simple Query tab. To define the configuration how to display the results of the query, go to the View tab.
Click the Simple Query tab to access the Query definition page. The page provides the following features:
A Table/View dropdown menu you use to choose a database table or view to predefine your query
The Field List where all the fields are listed as a row
A Filter List for defining filter conditions for your query
The Row Limit field to restrict the number of result entries for your query
The single steps how to construct a simple query are outlined as follows.
Select a table from the table list.
Define the fields that you want to see.
The Field Function describes the functionality used for the field. The following list shows the supported values of Field Function.
Use the current value of the field
Accumulate the values of the field
Count the number of values of the field
Get the minimum value of the field
Get the maximum value of the field
Get the average value of the field
The Field Name is a field in the selected table.
The User Defined Name allows the results to display a more meaningful name.
Sort allows to define the sorting order for every field if needed.
(Optional) Define Filters.
You must specify at least one field before you can define filters.
AND/OR is needed for any filter except the first. This setting provides the logical connection to the previous filter condition.
The Field Name is the name of the field to be filtered. If a field has a user-defined name, that name is shown in the selection list. Otherwise, a generated name is shown.
The Condition field specifies the operators that are used to filter the values from the database. The following table lists the supported operators.
Filter |
Symbol |
Description |
Number of Requirements |
---|---|---|---|
Equal |
= |
The value must equal the Requirement |
1 |
Not Equal |
<>, != |
The value must not equal the Requirement |
1 |
Less Than |
< |
The value must be less than the Requirement |
1 |
Less Than or Equal |
<=, ≤ |
The value must be less than or equal to the Requirement |
1 |
Greater Than |
> |
The value must be greater than the Requirement |
1 |
Greater Than or Equal |
>=, ≥ |
The value must be greater than or equal to the Requirement |
1 |
Null |
The value must be null |
0 |
|
Not Null |
The value must not be null |
0 |
|
Between |
The value must be in a specified interval |
2 |
|
In |
The value must be equal to an element of a specified list |
1 or more |
|
Like |
The value must contain the given Requirement |
1 |
The Requirement field contains a value that is used for filtering the values returned by the query. The following list contains some examples of things that might go into the Requirement field.
For a between condition
For a like condition
For a like condition
For a like condition
For an in condition
(Optional) Limit the number of data sets.
To limit the number of data sets, select the Limit Query To First option. Then type the number of data sets you want returned.
Click Save to save the query.
The following figure displays the Save this Query As screen. Type a name for the query in the Query Name field, and then click Ok.
After you save your query, you return to a modified version of the Simple Query screen.
To change the view configuration for a query, click the View tab.
To create a view for a saved query:
Choose the query from the Query List on the Overview page.
Click the Edit button.
Click the View tab.
The queries current view configuration displays.
Declare how you want to view the results of your query.
You can add three different sections to the view configuration, decide if additional information about the query is shown, and in which order it is shown.
Use the links at the top of the page to move to the corresponding section. The possible sections are Database Table, Pivot Table and Graphic. The View Configuration section is always visible and enables you to display the query description that has been entered on the common tab, the filter conditions from the filter list, and the resulting SQL statement of the query definition or the content of the SQL tab for advanced queries.
Selecting Add Database, Add Pivot, or Add Graphic adds the corresponding section.
For some queries, only a subset of the possible view selections are meaningful. For example, if you have only two columns to select from, pivot makes no sense.
For the Database Table add and choose the columns that you need to display under Name and adjust their Type and Format. The order in which the columns are added will be the order in which the columns are presented. The selections that you make for this report do not affect the filters applied to the data.
For the Pivot Table, add the pivot column, row, and data entries. Then choose the column Name, Type, and Format. To shift an entry to a different pivot type, select it under Pivot Type.
For the Graphic section, you can attach the query data to different chart diagram types. The following chart types are available from the Diagram Type menu:
Bar Chart
Bar Chart (3D)
Bar Chart Stacked
Bar Chart Stacked (3d)
Pie Chart, Pie Chart 3D
Line Chart
Line Chart Stacked Line
Three different diagram types are available:
Bar
Pie
Line
Bar and Pie types can be display with a 3D effect. Bar and Line diagrams can be drawn as stacked diagrams with values on the y-axis summarized.
Click Save or Save As to save your View configuration to the query.
Click Run to run your query.
Two ways to define the data series for a diagram are:
Series from columns: All column values are added to a series. The name of the series is the column header
Series from rows: All column values define the series. The names of the series is defined by the values of the label column. The values of the series are defined by the value column.
The query “Accounting per Department” results in a table with the columns: time, department, and cpu.
To display the result in a pie chart, select the following configuration:
The result will be multiple pie charts
A query summarizes CPU, IO, and Mem usage over all departments:
To display the results in a bar chart, select the following configuration
The results will be a bar chart with three bars for each department:
Select a query from the list on the Query List screen
Click Edit.
The selected Simple Query screen displays.
Make changes to the Simple Query screen by navigating through the tabs and making your changes as you would when creating a simple query .
Save or run your changed query.
You must have previous experience writing SQL queries to use this feature of the accounting and reporting console.
Click New Advanced Query on the Query List screen.
Type your SQL query in the field.
Save or run your query.
Select a query from the list on the Query List screen
Click Edit.
A completed version of the Advanced Query screen displays.
Make changes to the SQL query.
Save or run your changed query.
The syntax for the latebindings in advanced queries is:
LATEBINDING{ <column>;<operator>;<default value> } <column> name if the latebinding <operator> a SQL operator (e.g. = < > in .. ) <value> default value (e.g. 'localhost' )
select hostname from sge_host where LATEBINDING{hostname, like, 'a%'} select hostname from sge_host where LATEBINDING{hostname, in, ('localhost', 'foo.bar')}