Job Monitor

The monitor can be used to interactively watch job activity on the server. The monitor displays jobs that are currently running and continues to display recently completed jobs for a few seconds after they finish, for improved legibility. To open the job monitor, just click on the Monitor button on the main toolbar. The monitor window will open, and you will see any jobs that are actively running or recently completed. For a new installation, you will not see much yet, so we will try an exercise to see how the monitor can be used.

Click on the New Job button on the main toolbar and give the new job the name "Sleeper Job". Jump down to the steps grid and click the New Step button just above the grid. First select the [Shell] Sleep module, then update the name to "Sleep for 30 seconds", and finally in the parameters list, the Sleep Seconds parameter should be set to a value of 30. When ready, click Save to complete this step returning to the job definition. You may have noticed we did not create a trigger this time and it is set on None. This is fine as we do not want this job to run automatically. We are only ever going to run this job definition manually. Finish this job definition by clicking the Save button and you should be back to the monitor in the manager application.

With the monitor window still open, find the "Sleeper Job" you just created in the navigation panel and right click on it to get the pop-up context menu. Select the Start option on the menu and you should see the job appear in the Running status in the monitor window.

Note while this job is running that the other fields in the monitor grid show the steps and progress of the job. If the job is progressing through multiple steps, you will be able to see which step the job is currently working on. Since this is a simple one step job, we will focus on the Message column. You should notice that the message column is giving us real-time feedback on what is happening within the specific step, or module, that is currently executing. Modules generally are built to try to provide useful feedback on long running processes via this status message, but this can vary for distinct types of modules. With the sleep module we use in the example in this section, you can see it counting down the time remaining.

If by this time the example sleeper job is still running, allow it to finish and you will notice how when the job completes, the status changes to Finished and the job is still temporarily displayed in the monitor. This should allow you to continue viewing the status of recently completed jobs in the case where your job server may have many small jobs starting and completing rapidly. After about ten seconds, the finished jobs should automatically drop off the view from the monitor.

For a next step, start "Sleeper Job", and while it is still running, click on it in the job monitor window and find the Stop button on the monitor toolbar and click it. You will be asked to confirm if you want to stop the job. Go ahead and stop it and you should notice that this job will be stopped almost immediately, and the status of the job is now changed to Killed. You can use the stop feature to attempt to kill any running job. Just be aware that the server will try to nicely request the job to stop and depending on the step being executed in the job, it should comply and shutdown as nicely as it can. Some modules might not behave as well when being requested to stop while processing, and the outcome of a job that has been killed may result in incomplete data someplace. Thus, be careful when using this feature and when implementing custom modules, and be certain to try to respond to stop requests and leave any data in a known state.

An important consideration when you are using the job monitor is it affects the performance of the manager application. For security purposes, the manager application will normally time out and disconnect from the JobServer when there has been no activity after a prescribed amount of time. If the monitor is left open, then this behavior is affected because the monitor will keep getting updates from the JobServer on its current activity. Therefore, while the monitor is open, the manager application will not time out for the given server. Please keep aware of this and do not leave monitor open on an unattended machine.