Configuring the graphical user interface (GridMonitor GUI)

The PHP scripts providing the web-based GridMonitor GUI are configured using the configuration file /opt/parastation/www/gridmon/config/cluster-psmp.inc.php. This file holds an array in PHP syntax, defining all configurable GridMonitor GUI parameters.

Comments are marked, as usual in PHP, with // (until end of line) or with /* … */.

Configuring basic GridMonitor GUI parameters

The basic configuration section defines information about known collectors and therefore known clusters:

    $Cluster = array (                                                 (1)
      'Cluster1' => array (                                            (2)
        'pscollector' => array(
          'server' => 'localhost',                                     (3)
          'port' => 4000                                               (4)
        ),
        'PhView' => &$PhView_Cluster1,                                 (5)
        …
      ),
    //'Cluster2' => array (                                            (6)
    //  'pscollector' => array(
    //    'server' => 'frontend2',                                     (7)
    //    'port' => 4000                                               (8)
    //   ),
    //  'PhView' => &$PhView_Cluster2,                                 (9)
    //    …
    //),
    );
      

Example 4.24. Basic cluster configuration for the GridMonitor GUI


This defines a list of known Clusters $Cluster (1), having an entry for cluster Cluster1 (2). How to connect to the related collector is defined by pscollector, using the node localhost (3) and TCP port 4000 (4).

Note

Most of the parameter info is read from the collector at startup, utilizing the parameter type subsystem of the collector. Therefore, only parameters local to the PHP scripts have to be defined at this place.

To add a second cluster, e.g. Cluster2 (6), uncomment or copy the appropriate lines and modify the cluster name ('Cluster2') (6) and server name ('frontend2') (7). The TCP port ('4000') (8) will most probably be the same.

Note

the cluster name has to match the configured cluster name in the collector configuration file!

The array PhView (5) defines the physical outline of the cluster, specifying how many racks, how many nodes per rack and how many blades per blade chassis are installed. This may be adjusted to match the actual cluster layout. For more information, refer to the section called “Configuring GridMonitor GUI physical view”.

Configuring GridMonitor GUI physical view

As mentioned in the previous section, the variable PhView (5) within the cluster configuration (see the section called “Configuring the graphical user interface (GridMonitor GUI)”) refers to an array describing the physical outline of the cluster.

    $PhView_Cluster1 = array(
      'Cluster1' => array(                                             (1)
        'row' => 1,
        'uw' => 130,                                                   (2)
        'uh' => 14,                                                    (3)
        'free'       => array('h' => 1, 't' => 'skip'),                (4)
        'blade01'    => array(                                         (5)
          'h' => 6, 't' => 'Blade',                                    (6)
          'n' => array(                                                (7)
            'w' => 10,                                                 (8)
            'skip'      => array('h' => 1, 't' => 'skip'),             (9)
            'bnode-001' => array('h' => 1, 't' => 'Node'),             (10)
            'bnode-002' => array('h' => 1, 't' => 'Node'),
            …
          ),
        ),
        'node-01'   => array('h' => 2, 't' => 'skip'),                 (11)
        'node-02'   => array('h' => 2, 't' => 'skip'),
        …
        'localhost' => array('h' => 2, 't' => 'Node'),                 (12)
        'Switch-1'  => array('h' => 1, 't' => 'Switch'),               (13)
      ),
    );
      

Example 4.25. Configuring the physical cluster view for the GridMonitor GUI


The array variable $PhView_Cluster1 defines a single rack called Cluster1 (1). If more than a single rack is used, the array Cluster1 must be duplicated and more reasonable names like Rack1, Rack2, etc. should be used. These names will also show up in the Rack Details pull-down menu of the left hand navigation area of the physical view page. See also the section called “GridMonitor GUI: Cluster physical view page”.

Each basic entry in the rack is 130 pixel wide (2) and 14 pixel high (3). The entry skip (4) is unused ('skip').

The next entry (5) of type 'blade' represents a blade chassis (holding vertical slots) with a height of 6 units (6). This array (7) defines the slots within the blade chassis. Each slot is 10 pixels wide (8). The first slot (9) is empty ('skip'). The following slots (10) are filled with nodes node-001 to node-002 ('Node').

Unused entries ('skip') of height 2 ('h') are defined in (11). Whereas (12) defines a node entry localhost ('Node') of height 2 ('h'). The last entry (13) defines a switch entry switch-1 ('Switch') of height 1 ('h').

If an entry is marked as type node ('Node') or as switch ('Switch'), the entry name equals the node or switch name. Both types are animated showing their current state using different colors. Entries with type skip ('skip') are drawn, but not animated.

The height of each rack is computed automatically. Empty space may be inserted using entries of type 'skip'. Multiple racks may be defined within the array variable Cluster1.

Note

To minimize typing, the scripts makeracks.sh and makebladeracks.sh are provided, located in /opt/parastation/www/psgridmon/config. These scripts generate a prototype physical configuration for typical server or blade racks by using information on how many nodes are installed, how many nodes per rack are installed, what size these nodes are, etc. The output of these scripts may be saved into a file and modified to suit the current physical layout.

Configuring GridMonitor GUI default values

A number of default values for the GridMonitor GUI can be configured for each cluster independently using the array variable .defaults within the global array $Cluster, located in the file cluster-psmp.inc.php.

    $Cluster = array(
      'Cluster1' => array(
        …
        '.defaults' => array(
            /* default icon state */
            'Match' => 'All',                                          (1)
            /* default time frame */
            'Last'  => 'hour',                                         (2)
            /* default sort order */
            'Sort'  => 'desc',                                         (3)
            /* event groups ignored in cluster overview */
            'IgnoredEvents' => array(                                  (4)
                'default' => true,
                'ok' => true,
            ),
            /* number of icons per line in cluster overview */
            'NbrOfIconsPerRow' => 10,                                  (5)
            /* list of pre-defined rack views, */
            /*   e.g. 'Left' => 'rack0:rack1' */
            'PhView' => array(                                         (6)
            ),
            /* default diagram size */
            'DiagramSize' => 'medium',                                 (7)
            /* list of known PBS queues, */
            /*   e.g. 'large' => 'large' */
            'QueueList' => array(                                      (8)
            ),
        ),
        …

      ),
    );
      

Example 4.26. Configuring default values for GridMonitor GUI


The entry Match (1) defines the default icons state shown when displaying the cluster overview page. Valid entries are none to suppress icons entirely, all to show all icons, idle to show icons for idle nodes only, in use to show icons for nodes in use only, ev.pnd to show icons for nodes having pending events, dead to show icons for unavailable nodes and ev+de to show icons for nodes having pending events and also unavailable nodes.

The parameter Last (2) defines the default time frame for history charts and event lists. Valid entries are 10min, hour, 4hour, 12hour, day, week or month.

The Sort entry (3) indicates whether lists are sorted ascending (asc) or descending (desc) by default.

The array IgnoreEvents (4) lists all events which should not show up in the cluster overview event list.

With the variable NbrOfIconsPerRow (5) the number of icons per line within the cluster overview icon area is defined.

The array PhView (6) defines lists of racks selectable as groups within the Physical view cluster page. Each array entry consists of a label and a colon-separated list of rack names, which are configured in the PhysView section. See the section called “Configuring GridMonitor GUI physical view”, for details.

Note

All particular rack entries configured within the physical view configuration (see the section called “Configuring GridMonitor GUI physical view” are selectable by default and should not be configured within this array.

The variable DiagramSize (7) specifies the default size of diagrams within the Diagram page. Valid entries are small, medium or large.

The array variable QueueList (8) lists all queues of a PBS batch queuing system. See also the section called “Configuring the collector – step by step” for information on how to configure a PBS server.

Configuring cluster pictures within the GridMonitor GUI

The GridMonitor GUI displays small pictures of all configured clusters within the left hand navigation area. To show actual pictures of the systems, copy image files named like the configured clusters to the default installation directory /opt/parastation/www/gridmon/images. The pictures are automatically scaled by the browser, but for best results the picture size should be 180x120 pixels. The pictures may be encoded as GIF using the filename suffix .gif, as JPEG with suffix .jpg or as PNG with suffix .png.

Note

Do not overwrite the default file Cluster.jpg, otherwise the picture will not link to the particular cluster, but to this section of the documentation.