Task monitoring for DIANE (dashboard)

You may easily monitor your tasks here: http://dianemon.cern.ch/diane

One of the new functions of DIANE Dashboard (available since version 2.1) is the possibility to add user-defined labels to tasks. This is handy for easier tracking what each task is doing.

Technically there are two new attributes of the TaskInfo object:

  • application_label is a string which provides summary information
  • application_details is a list of (key,value) pairs where key is a string and value is an int, float or string

By default, the application label is shown as an additional column in the task table. Application details are displayed (expanded mini tab) when clicked on a task.

What information may be stored?

Application label may be used to store a descriptive summary information about the task, while the details may be used to store values which may be processed in a programmatic way or displayed in the charts.

Here is an example of Geant4 regression testing tasks:

application_label = "Test: e-,7500GeV,4.0T"

application_details = []
application_details.append(('Particle', 'e-'))
application_details.append(('Energy [GeV]', 7500))
application_details.append(('B field [T]', 4.0))

Simple example: adding monitoring attributes in the runfile

Smaller projects might want to specify the tasks directly in the runfile. This is for example done in the DIANE tutorial application, the hello.run. In that case, the application label and the task labels are specified directly there (note the last three lines):

# tell DIANE that we are just running executables
# the ExecutableApplication module is a standard DIANE test application

from diane_test_applications import ExecutableApplication as application

# the run function is called when the master is started
# input.data stands for run parameters
def run ( input, config ) :
    d = input.data.task_defaults # this is just a convenience shortcut

    # all tasks will share the default parameters (unless set otherwise in individual task)
    d.input_files = ['hello']
    d.output_files = ['message.out']
    d.executable = 'hello'

    # here are tasks differing by arguments to the executable
    for i in range( 20 ):
        t = input.data.newTask()
        t.args = [str( i )]
        t.application_label = "hello %d"%i
        t.application_details.append(('Number',i))
        t.application_details.append(('Value',i+1))

Adding monitoring attributes in application manager

For larger projects, a specialized application manager is not uncommon. This specialized application manager should be a subclass of the SimpleApplicationManager.

Typically in appmgr.initialize() method tasks are created using appmgr._task(). Both the application label and the task labels may be added at this point:

self._task(application_label="label", application_details = [("k",v),...])

-- JakubMoscicki - 05-Oct-2010

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2010-11-26 - JakubMoscicki
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ArdaGrid All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback