Automation Center Documentation

Setting Up a Virtual Resource

From OpsWise Documentation Wiki

image:pdficon_small.gif Open as PDF

In this exercise, we will set up an imaginary resource and three imaginary tasks. In our scenario, two of our tasks are resource-intensive and they run on the same machine. Therefore, if one is already running when the other is launched, we want the second task to wait until the first is finished before running. However, our third task is not so resource-intensive so we will allow this one to run at the same time as either of the other two.

To simplify the exercise, we will use Sleep tasks.

  1. Select Resources > Virtual and click New.
  2. Call the Virtual Resource Sofa and change the Resource Limit to 5 and Submit.
  3. Set up the Sleep tasks as follows:
    1. Add the following Sleep task:
      • Task Name=BigGuy1
      • Sleep Time=60
    2. Save the task and click the Task Virtual Resources tab.
    3. Click Edit.
    4. Select Sofa.
    5. Sofa is added to the list with a default resource amount of 1. Click on the 1 to open the record.
    6. image:tut change resource amount.jpg

    7. Change the Amount to 4, which means that this task will consume most of the resource.
    8. Repeat the above steps for another Sleep task called BigGuy2 with a sleep time of 30 seconds. Give BigGuy2 a resource amount of 4 as well.
    9. Add a third Sleep task called LittleGuy with a sleep time of 20, assign it to the Sofa resource and leave the resource amount at 1.
  4. Display the Sofa Virtual Resource and click the Task Virtual Resources tab. All tasks assigned to this virtual resource are listed, along with the resource amount that each one uses.
  5. image:tut sofa and tasks

  6. We want all three of our tasks to launch at once, so use a simple time trigger to launch all three in a minute or two.
  7. Hint: Don't forget to enable the trigger.

  8. When the three tasks are launched, only one of the Big Guys can actually run, along with Little Guy. When the first Big Guy finishes, there is room for the second to run. Display the Activity screen and note that the second Big Guy task is waiting in Resource Wait status.
  9. image:tut throttling.jpg

  10. On the Virtual Resource Sofa, click the Currently In Use By tab and observe which tasks are running on this virtual resource. Note that this display does not automatically refresh.
  11. image:tut currently in use by.jpg


image:sb15-1.gif


Return to First Look menu.

For additional information, see:

Personal tools