Operating System - OpenVMS
1748181 Members
4110 Online
108759 Solutions
New Discussion юеВ

Re: DCL to detect runaway processes

 
SOLVED
Go to solution
Niall Godwin
Advisor

DCL to detect runaway processes

I'm looking for a way to detect and report runaway processes (i.e. a process in constant COM state) using DCL.

Thank you.
8 REPLIES 8
Duncan Morris
Honored Contributor

Re: DCL to detect runaway processes

Hi Niall,

you can use the attached command procedure as a starter template.

It optionally kills/reports the CPU hogs. You should customise it for your own environment!

Regards,

Duncan
Duncan Morris
Honored Contributor
Solution

Re: DCL to detect runaway processes

Niall,

the last attachment was nor properly formatted.

Hopefully this one is!

Duncan
Jeffrey Goodwin
Frequent Advisor

Re: DCL to detect runaway processes

Duncan,

I think you're missing a procedure:

MONITOR_CPU_CHECK_CAPTURE.COM

-Jeff
Jon Pinkley
Honored Contributor

Re: DCL to detect runaway processes

Niall,

Are you interested in all processes in COM state, or just ones that are running and competing with interactive users (i.e. ones that are getting CPU time)? The point being that a process being in COM state doesn't necessarily mean it is consuming a lot of resources, in fact, if it is being starved of CPU, that's the state it will be in most of the time.

You may also be more interested in interactive jobs than batch jobs.
it depends
Paul Jerrom
Valued Contributor

Re: DCL to detect runaway processes

Howdy,
I created a similar command file some time ago, but I found that defining a runaway was the most important thing. For example, you want to detect COM states - but on a multiprocessor you might also be looking for CUR states, or even COMO. Also, you might want your target process to be using over a certain threshold of CPU - but what if there are multiple runaways? Probably , your target process will not be clocking any IOs (otherwise it won't be COM/COMO/CUR all the time). So from memory I think my DCL was doing a MONITOR PROC/TOPCPU to an output file for a few seconds, reading the output file to get the top 2 or 3 processes, then looking at each process using f$getjpi to get the state and direct and buffered IOs, then storing those values, hibernating for a while then comparing the figures again. So my definition of a runaway was a process that, after x minutes, was a top 2 or 3 cpu user, was in com, como or cur state , and hadn't clocked any IOs in the intervening period.
Have fun!
PJ
Have fun,

Peejay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If it can't be done with a VT220, who needs it?
Duncan Morris
Honored Contributor

Re: DCL to detect runaway processes

Hi,

here is the missing routine as an attachment.

Regards,

Duncan
Steve Schultz_1
Advisor

Re: DCL to detect runaway processes

Here is a procedure I have been using. It is based on a process using the cpu more than half of the interval check time. For example, the interval of each check is 30 minutes. If during that time a process has used more than 15 minutes of cpu, then it is flagged. This seems to work well, but note that some backup processes can be cpu intensive.

Steve
Niall Godwin
Advisor

Re: DCL to detect runaway processes

Many thanks to all for your responses, and especially to Duncan and Steve for their solutions.
I have tested both procedures and they're exactly what I'm looking for.
Duncan's procedure is the more sophisticated, but Steve's is equally effective.
Nice work !
Niall