|
Sun Grid Engine Information Center
Accounting and Reporting Console (ARCo)
Index
Starting the Accounting and Reporting Console
The accounting and reporting console is installed separately from the Sun Grid Engine software. For details on the installation process, see Installing ARCo. 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 Enabling Generation of the Reporting File.
How to Start the Accounting and Reporting Console
- From your 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.
- Log in to your UNIX account.
- In the Java Web Console main page, select the Accounting and Reporting application.
 | Tip You can also use a link similar to the following example to go directly to the ARCo application from within your web browser: https://hostname:6789/console/login/Login?redirect_url=%22/reporting/arcomodule/Index%22. |
The Overview page appears. The Query List shows a list of predefined ARCo queries on the selected grid cluster. From the Overview page, you can perform the following tasks:
- To view details about a defined query, click the query Name in the Query List.
- To view the results of any queries that you have run on this cluster, click the Results tab.
- To create a new query, click the New Simple button.
- To create a query by editing the SQL directly, click the New Advanced button.
- To run a defined query, click the circle next to the query name that you want to run, then click the Run button.
- To edit a defined query, click the circle next to the query name that you want to run, then click the Edit button.
- To view information about or run statistics on a different grid cluster, select the cluster from the Cluster menu.
 | Note For detailed information about these tasks, see the online help from within the ARCo console. |
Creating and Modifying Simple Queries
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 as described in Creating and Modifying Advanced Queries.
How to Create a Simple Query
- In the Query List on the ARCo Overview page, click the New Simple button.
The Simple Query screen appears showing common information, such as the query category and description. This information is optional.
- To define the query, click the Simple Query tab.
 | Tip
To define how to display the results of the query, go to the View tab. |
- To choose a database table or view to predefine your query, select from the Table/View list.
- To define the fields on which the query is to run, click the Add button in the Fields section.
- The Function eanbles you to apply either an aggregate function or a numeric operator to the specified field. Supported values are:
| VALUE |
Display the current value of the field |
| SUM |
Accumulate the values of the field |
| COUNT |
Count the number of values of the field |
| MIN |
Get the minimum value of the field |
| MAX |
Get the maximum value of the field |
| AVG |
Get the average value of the field |
 | Note Numeric functions only apply to numeric field values and must be used with a Parameter. |
- The Name is the name of a column in the selected table or view.
- The Parameter is applied when you choose a numeric operator in the Function.
- The Username enables you to provide a more meaningful name to display in the query result.
- Sort enables you to define the sorting order for the field.
- (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 Parameter field contains a value that is used for filtering the values returned by the query.
- Late Binding causes the Parameter value to act as a placeholder. When Late Binding is checked, you are given the opportunity to change the Parameter value when you run the query.
- Active enables or disables the filter.
The following table lists the supported operators.
| Condition |
Symbol |
Description |
Number of Parameters |
Parameter Usage |
| Equal |
= |
Filters the fields that equal the Parameter |
1 |
|
| Not Equal |
<>, != |
Filters the fields that do not equal the Parameter |
1 |
|
| Less Than |
< |
Filters the fields that are less than the Parameter |
1 |
|
| Less Than or Equal |
<=, ≤ |
Filters the fields that are less than or equal to the Parameter |
1 |
|
| Greater Than |
> |
Filters the fields that are greater than the Parameter |
1 |
|
| Greater Than or Equal |
>=, ≥ |
Filters the fields that are greater than or equal to the Parameter |
1 |
|
| Null |
|
Filters the fields that are null |
0 |
|
| Not Null |
|
Filters the fields that are not null |
0 |
|
| Between |
|
Filters the fields that are within the specified interval |
2 |
1 AND 100 |
| In |
|
Filters the fields that ar equal to an element of a specified list |
1 or more |
dep-234, dep-bio, dep-phy |
| Like |
|
Filters the fields that match the specified pattern. |
1 |
% allows to match any string on any length (including zero length)
%bob% will return the only the fields containing the string bob
_ allows to match on a sigle character |
- (Optional) Limit the number of rows to be returned.
Type the number of rows you want to return in the Row Limit textbox. If the result contains more rows, only the specified number are displayed.
- Save or run the query.
- To save the query, click Save or Save As.
- To run the query, click Run.
How to Modify a Simple Query
- 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 the changed query.
- To save the query, click Save or Save As.
- To run the query, click Run.
Creating and Modifying Advanced Queries
 | Note You must have previous experience writing SQL queries to use this feature of the accounting and reporting console. |
How to Create an Advanced Query
- In the Query List on the ARCo Overview page, click the New Advanced button.
The Advanced Query screen appears showing common information, such as the query category and description. This information is optional.
- To define the query, click the Simple Query tab.
 | Tip
To define how to display the results of the query, go to the View tab. |
- Type your SQL query in the field.
- Save or run the query.
- To save the query, click Save or Save As.
- To run the query, click Run.
How to Edit an Advanced 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 the changed query.
- To save the query, click Save or Save As.
- To run the query, click Run.
Latebindings for Advanced Queries
The syntax for the latebindings in advanced queries is:
LATEBINDING { <column>;<operator>;<default value> }
<column> name of the latebinding
<operator> SQL operator (e.g. = < > in .. )
<value> default value (e.g. 'localhost' )
Example – Latebindings
select * from sge_host where LATEBINDING {h_hostname; like; a%}
select * from sge_host where LATEBINDING {h_hostname; in; ('localhost', 'foo.bar')}
Configuring the Query Results View
By default, query results display a database table that contains all the requested information. For Simple and Advanced queries, you can add a pie chart, bar chart, or line diagram to that table. You can also change the view of the database table itself.
How to Configure the Query Results View
- To change the view configuration for a query, click the View tab in either the Simple Query or Advanced Query screen.
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 current view configuration for the selected query displays.
 | Note 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. |
- Choose whether to display additional query details.
In the View Configuration section, you can show or hide the following query details:
- The query description that you entered in the Common tab
- The filter conditions or parameters that you defined in the Simple Query
- The SQL statement that defines the query, either as assembled by the Simple Query or as you typed it in the SQL tab in the Advanced Query.
- To configure the table display, click Add Table.
START HERE ON MONDAY
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.
- To add a pivot table, click Add Pivot.
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.
- To add a graphical view of your data, click Add Graphic.
- Select the diagram type for your graphic.
You can attach the query data to bar, pie, or line 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
You can choose to display Bar and Pie types with a 3D effect. You can choose to draw stacked Bar and Line diagrams with values on the y-axis summarized.
- Select the value to display on the X-axis.
- Decide whether to define the data series based on rows or columns.
- 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.
- Choose specific details as appropriate for your diagram type.
Because graphic displays are somewhat complex to define, you might find it more useful to look at some examples. See Defining Data Series for Diagrams.
- Click Save or Save As to save your View configuration to the query.
- Click Run to run your query.
Examples for Defining Graphical Views
The following two examples show the default view first, followed by the View selections, followed by the graphical result.
Example 1 – Accounting per Department Pie Chart
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, similar to those shown in this figure.

Example 2 – CPU, Input/Output, and Memory Usage Over All Departments Bar Chart
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, similar to the chart shown in this figure.

|