134 lines
8.0 KiB
HTML
134 lines
8.0 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="topic" />
|
|
<meta name="DC.Title" content="Scenario: Job monitor with Advanced Job Scheduler notification" />
|
|
<meta name="abstract" content="See an example job monitor that sends an e-mail to an operator when the threshold limit of a job is exceeded." />
|
|
<meta name="description" content="See an example job monitor that sends an e-mail to an operator when the threshold limit of a job is exceeded." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahxmonexample.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzahxmonajsjobexample" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Scenario: Job monitor with Advanced Job Scheduler notification</title>
|
|
</head>
|
|
<body id="rzahxmonajsjobexample"><a name="rzahxmonajsjobexample"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Scenario: Job monitor with Advanced Job Scheduler notification</h1>
|
|
<div><p>See an example job monitor that sends an e-mail to an operator
|
|
when the threshold limit of a job is exceeded.</p>
|
|
<div class="section" id="rzahxmonajsjobexample__situation"><a name="rzahxmonajsjobexample__situation"><!-- --></a><h4 class="sectionscenariobar">Situation</h4><p>You
|
|
are currently running an application on your <span class="keyword">iSeries™</span> server,
|
|
and you want to be notified if the CPU utilization reaches the specified threshold.</p>
|
|
<p>If
|
|
the Advanced Job Scheduler is installed on the endpoint system, you can use
|
|
the Send Distribution using JS (SNDDSTJS) command to notify someone by e-mail
|
|
when the threshold is exceeded. For instance, you could specify that the notification
|
|
escalate to the next person if the intended recipient does not respond by
|
|
stopping the message. You could create on-call schedules and send the notification
|
|
to only those people that are on-call. You can also send the notification
|
|
to multiple e-mail addresses.</p>
|
|
<p><strong>Job monitor configuration example</strong></p>
|
|
<p>This
|
|
example uses the SNDDSTJS command to send a message to a recipient named OPERATOR,
|
|
which is a user-defined list of e-mail addresses. You can also specify an
|
|
e-mail address instead of a recipient or both. To set up a job monitor that
|
|
accomplishes this goal, complete the following steps:</p>
|
|
<div class="note"><span class="notetitle">Note:</span> By using the
|
|
code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
|
|
<ol><li>In <span class="keyword">iSeries Navigator</span>, expand <span class="menucascade"><span class="uicontrol">Management Central</span> > <span class="uicontrol">Monitors</span></span>,
|
|
right-click <span class="uicontrol">Job monitor</span>, and select <span class="uicontrol">New
|
|
Monitor..</span>.</li>
|
|
<li>On the <span class="uicontrol">General</span> page, enter the following values: <ol type="a"><li>Specify a name and description for this monitor.</li>
|
|
<li>On the <span class="uicontrol">Jobs to monitor</span> tab, enter the following
|
|
values: <ol type="i"><li>For the <span class="uicontrol">Job name</span>, specify the name of the job you
|
|
want to watch for (for example, MKWIDGET).</li>
|
|
<li>Click <span class="uicontrol">Add</span>.</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
<li>Click the <span class="uicontrol">Metrics</span> tab, and enter the following
|
|
information: <ol type="a"><li>In the <span class="uicontrol">Available metrics</span> list, expand <span class="uicontrol">Summary
|
|
Numeric Values</span>, select <span class="uicontrol">CPU Percent Utilization</span>,
|
|
and click <span class="uicontrol">Add</span>.</li>
|
|
<li>On the <span class="uicontrol">Threshold 1</span> tab for the metrics settings,
|
|
enter the following values: <ol type="i"><li>Select <span class="uicontrol">Enable trigger</span>.</li>
|
|
<li>For the threshold trigger value, specify <span class="uicontrol">>= 30</span> (greater
|
|
than or equal to 30 percent busy).</li>
|
|
<li>For <span class="uicontrol">Duration</span>, specify <span class="uicontrol">1</span> interval.</li>
|
|
<li>For the <span class="uicontrol"><span class="keyword">i5/OS™</span> trigger
|
|
command</span>, specify the following: <pre>SNDDSTJS RCP(OPERATOR) SUBJECT('Job monitor trigger') MSG('Job
|
|
&JOBNAME is still running!')</pre>
|
|
</li>
|
|
<li>Click <span class="uicontrol">Enable reset</span>.</li>
|
|
<li>For the threshold reset value, specify <span class="uicontrol">< 20</span> (less
|
|
than 20 percent busy).</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</li>
|
|
<li>Click the <span class="uicontrol">Collection Interval</span> tab, and select <span class="uicontrol">15
|
|
seconds</span>. This will override the Collection Services setting.</li>
|
|
<li>Click the <span class="uicontrol">Actions</span> tab, and select <span class="uicontrol">Log
|
|
event</span> in both the <span class="uicontrol">Trigger</span> and <span class="uicontrol">Reset</span> columns.</li>
|
|
<li>Click the <span class="uicontrol">Servers and groups</span> tab, and select the
|
|
servers and groups you want to monitor for this job.</li>
|
|
<li>Click <span class="uicontrol">OK</span> to save the new monitor.</li>
|
|
<li>From the list of job monitors, right-click the new monitor and select <span class="uicontrol">Start</span>.</li>
|
|
</ol>
|
|
<p><strong>Message monitor configuration example</strong></p>
|
|
<p>If you use a message
|
|
monitor, you can send the message text to the recipient. Here is an example
|
|
of a CL program that retrieves the message text and sends an e-mail to all
|
|
on-call recipients with the SNDDSTJS command.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> By using the code examples,
|
|
you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
|
|
<pre>PGM PARM(&MSGKEY &TOMSGQ &TOLIB)
|
|
|
|
DCL &MSGKEY *CHAR 4
|
|
DCL &TOMSGQ *CHAR 10
|
|
DCL &TOLIB *CHAR 10
|
|
|
|
DCL &MSGTXT *CHAR 132
|
|
|
|
RCVMSG MSGQ(&TOLIB/&TOMSGQ) MSGKEY(&MSGKEY)
|
|
RMV(*NO) MSG(&MSGTXT)
|
|
MONMSG CPF0000 EXEC(RETURN)
|
|
|
|
SNDDSTJS RCP(*ONCALL) SUBJECT('Message queue trigger')
|
|
MSG(&MSGTXT)
|
|
MONMSG MSGID(CPF0000 IJS0000)
|
|
|
|
ENDPGM</pre>
|
|
<p>This is the command that would call the CL program:</p>
|
|
<pre>CALL SNDMAIL PARM('&MSGKEY' '&TOMSG' '&TOLIB')</pre>
|
|
<p><strong>Results</strong></p>
|
|
<p>The monitor checks the QINTER subsystem
|
|
every 15 seconds, and if the job MKWIDGET is consuming more than 30 percent
|
|
of the CPU, the monitor sends an e-mail to the operator. The monitor resets
|
|
when the job uses less than 20% CPU capacity.</p>
|
|
<p>See Work with notification
|
|
for more information on the Advanced Job Scheduler notification function.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahxmonexample.htm" title="Provides scenarios that show how you can use some of the different types of monitors to look at specific aspects of your system's performance.">Scenarios: iSeries Navigator monitors</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |