IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
  • 1.  CPU utilisation Monitoring

    Posted Tue August 20, 2024 12:41 PM

    Hi All,

    We are required to monitor CPU utilisation for IBM i V7R5 & V7R4 running on Power 9 and Power 8 servers respectively.

    The CPU % in WRKACTJOB and Overall CPU utilisation in WRKSYSACT both giving diffrent reading? Which one 

    is recommended for monitoring? Also for CPU % in WRKACTJOB, when we used SQL command

    SELECT SUM(ELAPSED_CPU_PERCENTAGE) FROM table(QSYS2.ACTIVE_JOB_INFO())

    The reading seems not tally with the  CPU % in WRKACTJOB. Did we use the corrent command and extract the correct table

    Thanks

    Ooi K K



    ------------------------------
    Kiean Khuan Ooi
    ------------------------------



  • 2.  RE: CPU utilisation Monitoring

    Posted Tue August 20, 2024 10:07 PM

    Dear Kiean Khuan

    CPU % you see in WRKACTJOB or WRKSYSSTS is tricky.  If you keep pressing F5, you will see an "average" value over a period of time you see in Elapse Time field. If the Elapse Time is longer than a few minutes and there has been a lot of workload fluctuation, the "average" CPU % can be misleading.  (F5 is better used to see "accumulation" value such as CPU Time or IO Count or memory faulting, etc.) 

    I generally suggest you press F10 instead because F10 captures "instantaneous" CPU %.    In WRKSTSACT, if I remember correctly, it F10s itself automatically every 10 seconds. So, CPU % is at worse averaged over 10 seconds.

    Wen you SELECT from IBM i service table function, from this explanation  https://www.ibm.com/docs/en/i/7.3?topic=services-active-job-info-table-function, the answer is "The percent of processing unit time attributed to this job during the measurement time interval."         I have no idea what this time interval" means. You can ask this by opening a service request from IBM service web site.

    BTW, what is the end goal you want to achieve?  I ask this because, perhaps, using IBM i Performance Data Investigator (PDI) charts mat be the answer to what you want.  Google with "ibm i pdi" to learn more or ask more questions here.



    ------------------------------
    Satid S
    ------------------------------



  • 3.  RE: CPU utilisation Monitoring

    Posted Thu September 19, 2024 03:06 PM

    Hello Kiean. WRKSYSACT includes CPU related to system tasks whereas WRKACTJOB does not. Also, as you prob know, only one user can be in WRKSYSACT at a time. For the above query you selected, it doesn't look like you are resetting the statistics, resetting the statistics at run time may help. Depending on your exact needs, you can view / monitor CPU in a number of other ways too - using collection services , iDoctor, Navigator for i, or even setup system alerts/system monitoring in collection services...you can also use other 3rd party tools that harvest collection services data. Hope this helps and good luck  ! - Rich



    ------------------------------
    Rich Malloy
    ------------------------------



  • 4.  RE: CPU utilisation Monitoring

    Posted Fri September 20, 2024 02:34 AM

    Hi

    I think it's better to use the SYSTEM_ACTIVITY_INFO table function to retrieve the  total CPU utilization.

    https://www.ibm.com/docs/en/i/7.5?topic=services-system-activity-info-table-function

    And you have some other SYSTEM_* functions and views than can also be useful to you

    Regards



    ------------------------------
    Carlos Martín
    ------------------------------



  • 5.  RE: CPU utilisation Monitoring

    Posted Mon September 23, 2024 04:12 AM

    Hi Kiean, 

    Question rather would need to be :

    1. How frequently do you need to check the CPU  ?

    1.1. Will this be period over time ? or more for direct "spikes" that you are noticing ?

    Different use cases for each, over longer time yields better patterns which you are able to find in PDI , wheras instantaious or shorter (say less than 15 mins usually) intervals is then where the WRKSYSACT / WRKACTJOB comes in. 

    Though I will also mention , what is the purpose for this monitoring ? if its troubleshooting , then those are the two basic commands to zone into which job could be suspect but you might need iDoctor (or other performance toolsets) to delve deeper as to why the CPU is spiking. 

    Lastly, for just system health metrics, simple query can do at snapshot intervals say to a tool like Nagios to see whether your AVG CPU / Memory / Disk increases over time (especially during batch / interactive windows)

    HTH



    ------------------------------
    Marius le Roux
    Owner
    MLR Consulting
    ------------------------------



  • 6.  RE: CPU utilisation Monitoring

    Posted Tue September 24, 2024 08:26 AM

    you may want to loo into Qsys2.System_Activity_Info and the "delay_seconds" parm

    SYSTEM_ACTIVITY_INFO table function - IBM Documentation



    ------------------------------
    Bryan Dietz
    ------------------------------