Customization of Qmon

The qmon(1) graphical user interface can be used to perform all administrative tasks in Grid Engine, as well as providing users with a way to submit and monitor jobs. By default, both administrative and operational features appear together in a single GUI. This HOWTO goes over ways to customize the behavior of qmon so that only certain functions are operable. It also shows how to make the GUI more user-friendly, by increasing button size and modifying field size in the Job Control window.

Contents

  1. Specifying which buttons are active

  2. Changing the size of the main screen buttons

  3. Resizing Job Control fields

  4. Setting administrator defaults

  5. Showing the additional Host folder in Queue Configuration

  6. Troubleshooting Hints


Specifying which buttons are active

In order to restrict the buttons active in the main panel of qmon, a wrapper script must be created that calls the actual binary with a modified environment variable:

#!/bin/ksh
# wrapper script for qmon to change default appearance
export XFILESEARCHPATH=$SGE_ROOT/qmon/Qmon
qmon.real

Rename the qmon binary to qmon.real. Note this must be done individually for all architecture binaries of qmon, e.g., all of $SGE_ROOT/bin/*/qmon

Next, the file $SGE_ROOT/qmon/Qmon must be modified to reflect the changes. Add the end of the file, add the following:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! CHANGES
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!Qmon*JOB_CONTROL.sensitive: False
!Qmon*QUEUE_CONTROL.sensitive: False
!Qmon*SUBMIT_JOB.sensitive: False
Qmon*COMPLEX_CONFIG.sensitive: False
Qmon*HOST_CONFIG.sensitive: False
Qmon*CLUSTER_CONFIG.sensitive: False
Qmon*SCHED_CONFIG.sensitive: False
Qmon*CALENDAR_CONFIG.sensitive: False
Qmon*USER_CONFIG.sensitive: False
Qmon*PE_CONFIG.sensitive: False
Qmon*CKPT_CONFIG.sensitive: False
!Qmon*BROWSER.sensitive: False
Qmon*TICKET_OVERVIEW.sensitive: False
Qmon*PROJECT_CONFIG.sensitive: False
!Qmon*EXIT.sensitive: False
Qmon*MainMenuBar.sensitive: False

This disables the administrative functions and the menu bar (which is another path to administrative functions). If you uncomment (remove the !)

!Qmon*QUEUE_CONTROL.sensitive: False

then users cannot see the Queue Control either. Basically, any button which is not commented out by ! becomes disabled.

Changing the size of the main screen buttons

The default button size on the main screen of qmon is small and the function of the button cannot be seen without hovering the pointer over it to view the ToolTip. You can change the size of these buttons and make them large enough to read the action written on them.

To do this, change the same Qmon file as above from:

!! Qmon*pixmapFilePath: %R/qmon/PIXMAPS/big/%N.xpm:%R/qmon/PIXMAPS/%N.xpm
Qmon*pixmapFilePath: %R/qmon/PIXMAPS/%N.xpm

to

Qmon*pixmapFilePath: %R/qmon/PIXMAPS/big/%N.xpm:%R/qmon/PIXMAPS/%N.xpm
!! Qmon*pixmapFilePath: %R/qmon/PIXMAPS/%N.xpm

Below is a screenshot of the window resulting from both of the above modifications:




Resizing Job Control fields

The Job Control window provides a way to see a summary of pending, running, and finished jobs. The fields which are displayed can be easily changed by pressing the Customize button in that window. However, there is also a way to change the field widths so that the full information for each field can be viewed. A horizontal scroll bar permits viewing of all information in case it doesn't fit on the screen all at once.

To change field widths in any of the three Job Control panes,

  1. move the mouse pointer below any field divider

  2. Click and hold Control-middle-mouse-button and a vertical separator line will appear

  3. drag this separator with the mouse to the desired width, and release

The diagram shows an example after resizing the job name field.




An enhanced possibility to adjust the column sizes permanently for the first 6 columns is to add the following  lines to the user's $HOME/Qmon file:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! job configuration settings
!! Qmon*job_form*columnWidths: nr of characters per column for
!!                                the first 6 cols
!! Qmon*job_form*visibleColumns: nr of visible columns (without scrollbar)
!!                               if the column sizes shall be bigger this can
!!                               be lowered to show only the first n cols and
!!                               the rest can be reached with the horizontal
!!                               scrollbar
!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Qmon*job_form*columnWidths:      12,8,10,10,7,16
Qmon*job_form*visibleColumns:    6

Setting Administrator Defaults

Using a wrapper script and modified Qmon resource file, the changes are global. However, these changes can be overridden for individual users, such as the SGE admin user. To have user-specific settings, do the following:

  1. create a private copy of the Qmon resource in the home directory of the user, which specifies all desired features. For example, have big buttons, and do not disable any of them.

  2. have the user invoke the qmon.real binary (as opposed to the wrapper script)

In this way, the SGE admin user can re-enable the administrative functions in qmon.

Showing the additional Host folder in Queue Configuration

It is possible to display an additional Host folder in the Queue Configuration dialogue beginning with release  6.0u10 and 6.1preview2. This gives you a similar view like the qhost CLI client.
The following lines have to be added to the user's $HOME/Qmon file:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! show the Host tab in Queue Configuration
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Qmon*showHostTab:  TRUE
Qmon*automaticUpdateHostTab: TRUE

For older versions this has no effect.

Troubleshooting qmon

  1. Problems to start qmon

    1. libXltree.so:cannot open shared object
      source the GE environment:
      % source $SGE_ROOT/default/common/settings.csh
      or under sh like shells
      # .  $SGE_ROOT/default/common/settings.sh
    2. Qmon crashes, when I try to click on some of the buttons
      make sure you are using openmotif and not lesstif
      % rpm -qa |grep motif

      on some linux flavors backward compatible libraries need to be installed.
      See Issue 1332
    3. qmon crashes due to a 64bit bug in icon display
      Happens in displays that use 24bit color depth. To work around the crash set the color depth to 16bit or lower. (also applicable to remote displays)
      This bug has been fixed for 6.0u5 and 5.3p7. (See Issue 1541 )
    4. qmon crashes when used with (open)ssh
      In newer openssh versions it is necessary to use the ssh -Y option for trusted X11 forwarding (see openssh & X11 )

  2. Problems with qmon icons appearing in a different application

    See sunsolve patches: 114620, 114603, 114602

  3. Problems to build qmon
    1. undefined symbols:  _XEdit*
      search for libXmu* and check with nm if the missing symbol is contained, add the library to the aimk section of your architecture and rebuild
    2. The Linux courtesy binaries are build against libXm.so.2 (openmotif)
      strings /usr/X11R6/lib/libXm.so.2 | grep  'Motif Version'
      =>  @(#)Motif Version 2.1.30
      You have to install a compatible OpenMotif version as outlined in Issue 1332. A rebuild against libXm.so.3 is possible of coures, a symbolic link from libXm.so.3 to libXm.so.2 is not sufficient.
       
  4. Problems with locale

    1. on some linux flavors the Motif library has a localization bug resulting in the following warning:
      Name: tf
      Class: XmTextField
      Character '\60' not supported in font. Discarded.

      % env LANG=C qmon       solves the problem
    2. Warning: XmtLoadResourceFile: file 'qmon_messages' not found.
      % env | grep LANG
      % env | grep LC_MESSAGES
      check if these variables are set to something else than C or Posix
      % env LANG=C qmon       if you don't need the localized version
      SGE(EE) 5.3 (Solaris, Linux only) contains localization bundles for French, Simplified Chinese, Japanese and Taiwanese. Install the l10n packages then the warning disappears.

  5. Problems with fonts

    The fonts that are used by qmon can be changed with the $HOME/Qmon customization file.
    Copy $SGE_ROOT/qmon/Qmon to your home directory and replace the fonts with the fonts available on your system.
    Another possibility is to run a fontserver on one machine that is referenced in the fontpath of the hosts you use as a display machine. This is often necessary for tools like Xvnc or similar. You can of course also install the missing fonts on these machines and add them to the fontpath of the corresponding Xserver. (man xfs, man xfsinfo)
    Here is an example how to set things up:


    To see which fonts are used or generate a warning, set the XMTDEBUGFONT environment variable. In the following example 
    Warning: Cannot convert string "-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-*" to type FontStruct

    gives the hint that this font cannot be found. You can replace this font with a font that is available and has a similar look and size (xlsfonts, xfontsel) and put it into $HOME/Qmon.
    % setenv XMTDEBUGFONT
    % qmon
    FontListCvt:
    ->-adobe-helvetica-medium-r-*--14-*-*-*-p-*-*-*=R,-adobe-helvetica-bold-r-*--14-*-*-*-p-*-*-*=B,-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-*=BIG,-adobe-helvetica-medium-r-*--12-*-*-*-p-*-*-*=SMALL,-adobe-helvetica-medium-r-*--24-*-*-*-p-*-*-*=HUGE,-adobe-courier-medium-r-*--14-*-*-*-m-*-*-*=LIST,-adobe-courier-bold-r-*--14-*-*-*-m-*-*-*=LISTBOLD,-adobe-courier-medium-r-*--12-*-*-*-m-*-*-*=LISTSMALL,-adobe-helvetica-medium-r-*--10-*-*-*-p-*-*-*=QUEUEICON<-
    ------------------------
    baselist[0]: '-adobe-helvetica-medium-r-*--14-*-*-*-p-*-*-*=R'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-helvetica-medium-r-*--14-*-*-*-p-*-*-* (R)'
    baselist[0]: '-adobe-helvetica-bold-r-*--14-*-*-*-p-*-*-*=B'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-helvetica-bold-r-*--14-*-*-*-p-*-*-* (B)'
    baselist[0]: '-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-*=BIG'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-* (BIG)'
    Warning: Cannot convert string "-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-*" to type FontStruct
    baselist[0]: '-adobe-helvetica-medium-r-*--12-*-*-*-p-*-*-*=SMALL'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-helvetica-medium-r-*--12-*-*-*-p-*-*-* (SMALL)'
    baselist[0]: '-adobe-helvetica-medium-r-*--24-*-*-*-p-*-*-*=HUGE'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-helvetica-medium-r-*--24-*-*-*-p-*-*-* (HUGE)'
    baselist[0]: '-adobe-courier-medium-r-*--14-*-*-*-m-*-*-*=LIST'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-courier-medium-r-*--14-*-*-*-m-*-*-* (LIST)'
    baselist[0]: '-adobe-courier-bold-r-*--14-*-*-*-m-*-*-*=LISTBOLD'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-courier-bold-r-*--14-*-*-*-m-*-*-* (LISTBOLD)'
    baselist[0]: '-adobe-courier-medium-r-*--12-*-*-*-m-*-*-*=LISTSMALL'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-courier-medium-r-*--12-*-*-*-m-*-*-* (LISTSMALL)'
    baselist[0]: '-adobe-helvetica-medium-r-*--10-*-*-*-p-*-*-*=QUEUEICON'
    font_type: 'XmFONT_IS_FONT'
    bs: '-adobe-helvetica-medium-r-*--10-*-*-*-p-*-*-* (QUEUEICON)'
    XmFONT_IS_FONT: R
    XmFONT_IS_FONT: B
    XmFONT_IS_FONT: BIG
    XmFONT_IS_FONT: SMALL
    XmFONT_IS_FONT: HUGE
    XmFONT_IS_FONT: LIST
    XmFONT_IS_FONT: LISTBOLD
    XmFONT_IS_FONT: LISTSMALL
    XmFONT_IS_FONT: QUEUEICON
    XmFONT_IS_FONT: no tag