IBM i Global

IBM i Global

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

 View Only
  • 1.  SMTP monitor

    Posted Wed December 11, 2024 02:37 PM

    Hi, 

    We've ran into a few situations where a program will get caught in a loop and the error routing will overwhelm our email server. I'm looking for a way to either monitor or stop our smtp client on the IBM i from forwarding out these errors. Has anyone tackled this before? I checked the CHGSTMPA settings and there was one flag "Max outgoing e-mail messages" but it doesn't look like it will prevent these loop situations. 



    ------------------------------
    Michael Cramer
    ------------------------------


  • 2.  RE: SMTP monitor

    Posted Thu December 12, 2024 09:09 AM

    Hi Michael, 

    You bring up an interesting challenge. 

    Cant say exactly what the troubleshooting steps will be , but most of the entries will be logged in a journal. 

    You can find the "view" of sorts with this link : https://www.ibm.com/docs/en/i/7.4?topic=information-mail-server-journal-entries 

    The journal though needs activation with these steps : https://www.ibm.com/docs/en/i/7.3?topic=mail-checking-component-journals

    (a quick RPGLE program could be created to monitor the contents of this journal interpreted and then action based on your requirements)

    Hope this helps. 

    Marius



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



  • 3.  RE: SMTP monitor

    Posted Thu December 12, 2024 07:11 PM

    Dear Michael

    What SW component/product does the work of this monitoring and sending error e-mail?  I know of no IBM i component that does this and assume that it must be a 3rd party SW product. The solution should be taken in that SW product on how many repetitive error messages are sent. 



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



  • 4.  RE: SMTP monitor

    Posted Thu December 12, 2024 07:28 PM
    Edited by Satid S Thu December 12, 2024 08:43 PM

    There is a feature in IBM i that you can use to set a limit to a job's max CPU time consumed (and temp storage allocation) and hold the job when this limit is reached and send a message to QSYSOPR message queue. 

    You first get an idea how much CPU time is consumed by the looping job by displaying the problematic job and look at its consumed CPU time.  Then you set this max CPU time value in the CPUTIME parameter of the class object that this job uses.  When this max limit is reached, the job is held and system message "CPI112D – Job held by the system, CPUTIME limit exceeded" is sent to QSYSOPR and you can monitor for it. The fact that the job is held prevents repetitive messages that you encounter.

    Detailed information on this feature is here:  Managing Jobs Maximum CPU time and MaximumTemporary Storage at https://www.ibm.com/support/pages/managing-jobs-maximum-cpu-time-and-maximumtemporary-storage                         



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