Rob,
Well, this worked, not sure if accurate.
Need to confirm results.
Changed SQL default to output to print for QSYSOPR, which is the user for job HALAX1 which processes the actions.
Changed/added the below actions.
Action type . . . . . . . . COMMAND Type, F4=Prompt
Command . . . . . . . . . . CALL PGM(QPYMON) PARM(*FILE 005 *CPU *ALL 00001 QAITMON QPFRDATA)
Action type . . . . . . . . COMMAND Type, F4=Prompt
Command . . . . . . . . . . RUNSQL REQUEST('SELECT NAME, CPUDLT FROM QPFRDATA/QAITMON ORDER BY CPUDLT DESC')
Action type . . . . . . . . ACTSCH
Action schedule . . . . . . ACTJOB_P5
Command . . . . . . . . . . SNDEMLMSG MSG('&SYSNAME - CPU > 90% for 5 mins - &
ALERT') TO((PAUL)) FROM(*DFT) SPLF((QPQXPRTF HALAX1 *LAST))
NAME CPUDLT
---------- ---------------
TRCTSYSOFF 310
QPADEV007D 38
QPADEV000G 18
QPADEV00GQ 14
QPADEV007C 12
QPADEV005N 8
WRKSYSACT 8
SEADASSVR 8
QPADEV00GN 7
VODDWN_CLN 7
QPADEV00FX 7
QPADEV0006 6
IAAJMON 4
APISTART 4
QPADEV007N 3
ADRCOUNTER 2
QPADEV00H4 2
QPADEV001X 2
QMSF 2
SMIOSTCPGF 2
QPADEV00FP 2
QTSMTPCLTP 2
QPADEV003G 1
RMTMSAFETA 1
QPADEV00GD 1
SEALMSSVR 1
QPADEV0024 1
QPADEV0082 1
QPADEV000S 1
QPADEV0039 1
QPADEV00F0 1
GDIDW 0
PTM_OB1P 0
QPADEV00HC 0
QPADEV001W 0
QPADEV0025 0
QPADEV008L 0
PTMINB_BAC 0
SA_SERVER 0
QPADEV009M 0
PTMSPL_LIV 0
PALMLCM08A 0
PALMLCM07A 0
PTMOUT_BAC 0
PALBOCS14B 0
APPIV01040 0
SPLITTER 0
APPIV01037 0
APPIV01033 0
APPIV01038 0
APPIV01031 0
APPIV01028 0
APPIV01023 0
01/09/17 16:30:08 1
-----Original Message-----
From: Steinmetz, Paul
Sent: Monday, January 09, 2017 3:15 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: CPU monitor >90% for 5 minutes - attach to the alert the jobs and/or tasks causing the issue.
Rob,
1) PRTSYSACT does not exist on my V7R1 LPAR.
2) One problem with WRKSYSACT to an outfile is that it automatically submits the job instead of creating QPFRDATA/QAITMON outfile in the same job.
This, I will not be able to utilize the results within my monitor.
However, I did find this.
When you run WRKSYSACT to an outfile, it submits a job, calling this program.
CALL PGM(QPYMON) PARM(*FILE 005 *CPU *ALL 00060 QAITMON QPFRDATA) taking a snapshot every 5 seconds for 60 intervals (5 minutes).
So instead of calling WRKSYSACT to an outfile, I could call this instead.
CALL PGM(QPYMON) PARM(*FILE 005 *CPU *ALL 00001 QAITMON QPFRDATA) Changing to 1 interval.
The next issue or problem is that when WRKSYSACT runs interactively, the field it sorts on, CPU util, does not exist in the outfile.
Average CPU Utilization
The Average CPU utilization field shows the average CPU utilization
for all the active processors.
I'm still reviewing the fields available from QPFRDATA/QAITMON An SQL by Cpu Time For Job Or Task may give me the result needed.
Any thoughts from the group.
Paul
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Monday, January 09, 2017 1:55 PM
To: Midrange Systems Technical Discussion
Subject: Re: CPU monitor >90% for 5 minutes - attach to the alert the jobs and/or tasks causing the issue.
If using a file is too straightforward you can try the command PRTSYSACT to take the file you created with WRKSYSACT OUTPUT(*FILE) and generate a spool file.
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: Rob Berendt <rob@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 01/09/2017 01:53 PM
Subject: Re: CPU monitor >90% for 5 minutes - attach to the alert
the jobs and/or tasks causing the issue.
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
Oddly enough I failed to see a Work Management Service which fits that bill. Sure Active_Job_Info comes close but it fails to cover system tasks
like SysTmpStg does.
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqudfactivejobinfo.htm
I suggest you submit an RFE for this.
Instead of being fixated on analyzing printer output why don't you just use WRKSYSACT OUTPUT(*FILE) and read that instead?
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.