How to code a CL program which runs all time

45 pts.
Tags:
CL code for Max. CPU utilisation
HI, I have a requirement to wirte a CL program which will monitor the CPU% across I-series, If the CPU% exceed the mentioned limit we need to send a alert to all the active users across the VM, so that appropriate user will take action against the looping job. Can we send a separate alert(message)to the user(s) whose job is getting into loop(consuming max. CPU% across I-series) instead of all active users? I need your suggestions or a sample CL code which will fulfill my requirement. thanks Moin.

Software/Hardware used:
AS400/CL400

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    It's not a good idea.   What problem are you actually trying to solve? The system will already do that task for you. Why would you want to write a program to do what is already available on your system?   Do you have a useful definition of "CPU% exceed the mentioned limit"? Every job in the system will be using either 100% or 0% at any given time. How are you expecting to measure CPU%?   Tom
    125,585 pointsBadges:
    report
  • A6
    Hi Tom, First thanks for your response. Actually the problem is I am working on a tool where we can submitt Batch Schedule on I-series. In my case, if the job is going into loop, but the respective user id doesn't know anything about it then it will be a problem for the whole system as looping job will consume more CPU% which inturn delays the others jobs which are lined-up at JOBQ. So my requirement says: in such scenerio we need to alert all the active users by pop-up or send a message for proper action against their jobs(if any looping). As your saying the system already do that task for you, can you elobarate this for me,how it will do in my case? Till now I didn't observe any suchthing in I-series. If I am wrong, please correct me. Thanks Moin  
    45 pointsBadges:
    report
  • TomLiotta
    Till now I didn’t observe any suchthing in I-series.   Drill into Management Central in iSeries Navigator. Under Monitors, right-click Job and select 'New Monitor...'. Define a job monitor that tracks 'CPU Percent Utilization' for a 'Job Numeric Values' metric.   I can't help much with details because the task still isn't defined clearly.   When any job becomes active and uses the CPU, it uses 100% of the CPU until its time is up or it enters a wait state. Then it uses 0% until it goes active again. Your work management configuration should handle a job in an "infinite loop" so that it doesn't interfere much with other jobs in the system.   Trying to create programming that can meaningfully calculate any useful value for "CPU%" is a difficult task. It requires a very clear understanding of how work is processed. You should be able to describe exactly what you want to measure and how you will measure it before starting any programming for it. "CPU%" is not something you can measure; you have to calculate it. Do you have a plan for that?   ...we need to alert all the active users...   Further, why are you alerting "users"? Any job that goes into an "infinite loop" should result in notification to responsible developers, not users. Jobs should not be going into uncontrolled infinite loops, and definitely not more than once. If it happens once, it should be fixed by the developer and never happen again.   If something like that can't be fixed, how can you trust any of the program at all?   Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following